Subroutine 'say' is not declared on CommaIde - raku

I have this simple script opened with CommaIde:
#!/usr/bin/env perl6
my $str = 'foobar';
say $str;
The IDE is highlighting the word 'say' with the error:
Subroutine say is not defined
But, If I execute the script, it runs OK.
The same happens with other core methods like print, printf, etc.
Why are they not recognized?
Software versions:
Rakudo Star 2020.05.
Comma IDE 2020.04 Community Edition
Thank you.

I see this behavior with the IntelliJ plugin when I change the SDK File -> Project Structure -> Project -> SDK and then edit a file. But a IntelliJ restart does normally fix it.

Related

Debugging an Erlang code with Makefile in IntelliJ

Setup: OTP 26. IntelliJ 2022.3.1 with plugins Erlang 0.11.1162 and Makefile 223.8214.6
Code under preview: The test suite ct_netconfc_SUITE. We could run it from CLI using the command make common_test_test ARGS="-suite ct_netconfc_SUITE".
Goal: I want to debug test suite ct_netconfc_SUITE.
I have set breakpoints in the code. I have created a configuration using Run-->Edit Configurations for the make command specified above. I tried to debug using Run-->Debug-->Makefile-->Run. It successfully runs the configuration. But it did not stop at the breakpoint.
How to stop at the breakpoint?
Other than IntelliJ, what are the other options to debug an Erlang application with Makefile?
Installed Plugins
Debug Configurations created for the make command
Debugging command
I think you can use io:format function to debug what you want in the code, for example, print out List attribute:
io:format("I_want_to_print_this_List_~p", [List]).
In erlang, not like other programming languages (java, c#, c++) that can add breakpoints in there, with erlang if you have a million processes are running every second and over a hundred functions, that means impossible to add breakpoins to debug one by one.
As the comment of MadScientist, Makefile just helps us stop/start/build... application or which tool or script.

Program compiles fine in javac but not in IntelliJ

I am trying to test a java library I found online. I'm testing each component separately, and they work correctly on the command line when I do javac *.java followed by java test. This works perfectly fine, but if I try to build the same test.java file in IntelliJ 2017, it seems to build other irrelevant source files also present in the project and fails since they require dependencies that are not present (but I just want to compile and run test.java.)
How can I resolve this?
I don't know anything about the library you are using, so this may or may not work for you...
In the Project panel of Intellij IDEA select the class of the *.java file you want to compile/run.
Right-click, and on the popup menu you should see a couple of entries that look something like this:
Recompile 'Test.java' (That entry may or may not be present.)
Run 'Test.main()' (That entry will be present as long as you have a main() method.)
See the screen shot below for clarification.
Do you see similar entries?...
If so, what happens when you select them?
If not, please update the OP with more information on the error you are getting.

IntelliJ doesn't work [duplicate]

I'm trying to run my android application on IntelliJ. I created a project from existing source, and I've attached the SDK correctly, everything runs ok until there, but when I try to run, it logs messages saying:
Error: MyClass.class (No such file or directory)
And this happens with all classes I've created.
Any idea of what might be happening? Maybe some settings I must set in the IDE.
Thanks.
Solved it! In intelliJ go in Settings > Compiler > Java Compiler and in the Use Compiler choose javac in-process (Java6+ only).

XCode Build Results: why is it so amazingly complex even for a hello world console app?

I have looked at build result for a simple hello world console app to see command line for compilation. Why is it so complex ? How can I then automate things if it is such complex ?
If you intend to automate builds of Xcode projects, use xcodebuild(1).
Your xcodeproj file contains all of the settings that you would need to specify on the command line if you were to call gcc directly. If you run xcodebuild all you need to do is specify your xcodeproj file, the target, the configuration, and the SDK to use. Everything else is done automatically.
Run "man xcodebuild" for more information.
XCode specifies an immense number of command line options for the compiler and linker with fully qualified path names. When working at the command line you'll frequently use defaults instead of specifying all the options the IDE does. Make or some other build tool is your friend for automation.

IntelliJ creating error when refactoring sample package

I just started learning Javafx with Java11
I created a project in IntelliJ and it gave the standard structure.
In src file when I change the package name for the package "sample" to anything else, IntelliJ gives the following error.
Error:Kotlin: The Kotlin standard library is not found in the module graph. Please ensure you have the 'requires kotlin.stdlib' clause in your module definition
The error disappears when I refactor the package back to "sample".
how do I rename without getting this problem.
this might be helpfull
Javac gives this error, when lint is enabled and you use Java 9 module in Kotlin. You have to declare "requires kotlin.stdlib" in your module-info.java.
Ran into the same issue. For me, I'm using a module-info file in the src folder that looks like this:
module javafx {
requires javafx.fxml;
requires javafx.controls;
requires javafx.graphics;
opens sample;
}
If you rename your package to foo, then you need to change the last line to "opens foo". Otherwise it's still gonna look for and try to open a package named "sample". I have no idea what this has to do with kotlin.
I had the same problem and I solved it disabling "Kotlin migration detection". I have already response here:
https://stackoverflow.com/a/59628873/2350799
I had the same problem. But as long as you are not using Kotlin in the project there is a workaround : disable the Kotlin plugin, under settings.