Closed davidoskky closed 1 year ago
@EliotVU I may look into fixing this, but I'm unable to correctly compile the project, or at least to have it running for testing. Are all the instructions in the build section correct and complete or shall I do something else? Bear with me, I barely ever worked with javascript, let alone typescript.
@davidoskky The instructions should be working, at least on a Windows setup. I just updated the instructions to be more straight forward. Also the installation will require the Java SDK in order to compile the ANTLR grammar files.
Could you elaborate what exactly isn't working during the setup process?
When I run the debug mode a new window of vscode opens but a bunch of errors show up.
When I run manually npm run compile:grammar
i get
error(114): grammars/UCParser.g4:4:17: cannot find tokens file 'grammars/UCLexer.tokens'
followed by a bunch of errors regarding the implicit definition of tokens, I feel this is where the problem is coming from.
I can find that file under server/src/UC/antlr/generated/grammar/
but not under grammars/
Does running npm run compile:grammar
work? Perhaps the commandlines are invalid on a linux system.
No, it fails:
> uc@0.6.4 compile:grammar
> npx antlr4ts -visitor -no-listener grammars/UCLexer.g4 -o server/src/UC/antlr/generated && npx antlr4ts -visitor -no-listener grammars/UCParser.g4 -o server/src/UC/antlr/generated
Generating file '/home/user/Contributions/UnrealScript-Language-Service/server/src/UC/antlr/generated/grammars/UCLexer.interp' for grammar 'grammars/UCLexer.g4'
Generating file '/home/user/Contributions/UnrealScript-Language-Service/server/src/UC/antlr/generated/grammars/UCLexer.ts' for grammar 'grammars/UCLexer.g4'
Generating file '/home/user/Contributions/UnrealScript-Language-Service/server/src/UC/antlr/generated/grammars/UCLexer.tokens' for grammar 'grammars/UCLexer.g4'
error(114): grammars/UCParser.g4:4:17: cannot find tokens file 'grammars/UCLexer.tokens'
warning(125): grammars/UCParser.g4:38:6: implicit definition of token 'ID' in parser
warning(125): grammars/UCParser.g4:218:38: implicit definition of token 'DOT' in parser
warning(125): grammars/UCParser.g4:221:3: implicit definition of token 'SHARP' in parser
...
child process exited with code 1
I found this issue at https://github.com/tunnelvisionlabs/antlr4ts/issues/303 Apparently appending -Xexact-output-dir
to the cmd is a viable workaround.
Describe the bug
At startup the server crashes. The text is still marked up, but going to function definition and so on is impossible. I'm running vscode on linux.
If I add a directory named home in the folder I get the following error:
It's trying to traverse the project path twice. I'm unable to build the project by following your instructions, however I feel that it may be related to the globbing https://github.com/EliotVU/UnrealScript-Language-Service/blob/394fe7de4b93eba9310edfb543c263104960f80d/server/src/server.ts#L124
Screenshots
No response