intellij-crystal
intellij-crystal copied to clipboard
Error when building from source
/usr/bin/gradle build
> Task :generateCrystalLexer
Reading skeleton file "lib/jflex/idea-flex.skeleton".
Reading "/home/unshadow/Desktop/git-projects/intellij-crystal/src/main/grammars/CrystalLexer.flex"
Warning : Macro "EOL" has been declared but never used.
Constructing NFA : 342 states in NFA
Converting NFA to DFA :
...................................................................................................................................................................
Warning in file "/home/unshadow/Desktop/git-projects/intellij-crystal/src/main/grammars/CrystalLexer.flex" (line 123):
Rule can never be matched:
{SPACE} { return SPACE; }
165 states before minimization, 153 states in minimized DFA
Old file "/home/unshadow/Desktop/git-projects/intellij-crystal/src/gen/org/crystal/lang/core/parser/_CrystalLexer.java" saved as "/home/unshadow/Desktop/git-projects/intellij-crystal/src/gen/org/crystal/lang/core/parser/_CrystalLexer.java~"
Writing code to "/home/unshadow/Desktop/git-projects/intellij-crystal/src/gen/org/crystal/lang/core/parser/_CrystalLexer.java"
> Task :generateCrystalParser
java.lang.ExceptionInInitializerError
at org.intellij.grammar.Main.main(Main.java:64)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'value' of com/intellij/openapi/util/UserDataHolderBase.putUserDataIfAbsent must not be null
at org.intellij.grammar.LightPsi.<clinit>(LightPsi.java:100)
... 1 more
Caused by: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'value' of com/intellij/openapi/util/UserDataHolderBase.putUserDataIfAbsent must not be null
at com.intellij.openapi.util.UserDataHolderBase.putUserDataIfAbsent(UserDataHolderBase.java)
at com.intellij.openapi.util.NotNullLazyKey.getValue(NotNullLazyKey.java:42)
at com.intellij.openapi.project.DumbService.getInstance(DumbService.java:168)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.<init>(PsiSearchHelperImpl.java:100)
at org.intellij.grammar.LightPsi$Init.initExtensions(LightPsi.java:221)
at org.intellij.grammar.LightPsi$MyParsing.<init>(LightPsi.java:182)
at org.intellij.grammar.LightPsi.<clinit>(LightPsi.java:97)
... 1 more
FAILURE: Build failed with an exception.
* What went wrong:
Cannot convert the provided notation to a File or URI: directory '/home/unshadow/Desktop/git-projects/intellij-crystal/src/gen/org/crystal/lang/core/parser/CrystalParser'.
The following types/formats are supported:
- A String or CharSequence path, for example 'src/main/java' or '/usr/include'.
- A String or CharSequence URI, for example 'file:/usr/include'.
- A File instance.
- A Path instance.
- A URI or URL instance.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
2 actionable tasks: 2 executed
I guess https://plugins.jetbrains.com/plugin/10213-crystal-language-plugin is a better option now. See: https://github.com/crystal-lang-tools/intellij-crystal-lang