-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown error in vscode plugin #374
Comments
@pszmagaj any chance you could make a public example repo so I can investigate? |
@jaredly I cannot share the repo but I can try to create a new project with the same dependencies to reproduce the problem. I may also try to debug the issue by myself but I would need some advice on how it can be done. |
@jaredly @pszmagaj I think I've managed to track down the issue. In our project we have two source directories listed in bsconfig.json.
When I remove one of them, the plugin works again. I will try to create minimal reproducible example later. Edit: After further investigation I've noticed that it's more related to number of directories, not sources. I created empty project with 2 files and 2600 empty directories and RLS stopped working. With 2400 directories it was still doing fine. |
Similar issue in spirit (integration wit bsb): #414 |
@selenir do you have a repo with that test? |
There it is: https://github.com/selenir/rls-374-repro |
I've managed to reproduce the issue on Windows 10, there are some logs in the "Output" tab, which didn't appear on Linux: Also while checking logs I've noticed that each directory in project is passed as -I paramter to bsc. Maybe it could be related to max command length in cmd/bash. |
@jaredly Hello. I have investigated a problem and it seems to be linux / ubuntu specific problem. The problem can be recreated using https://github.com/selenir/rls-374-repro. It seems that bsc exits 127 code when run by RLS. The command that RLS uses to compile the project works perfectly when run from command line. The repro repo causes a problem on Windows and WSL as well however it seems that the cause is different. [Edit] |
I can see that OCaml compiler has "args" option (http://caml.inria.fr/pub/docs/manual-ocaml/comp.html#s%3Acomp-options). According to https://bucklescript.github.io/docs/en/extended-compiler-options BSC should inherit options from OCAML compiler but I cannot see args option in BSC. @bobzhang Perhaps you can help us with that? Can BSC expose "-args" OCAML compiler option? |
Can some1 fix this in the reason-language-server :)? |
@pszmagaj Any idea why the command line is that long? 128KB seems a lot |
@bobzhang It's because BSB passes paths of all subdirectories in the project to the compiler. You can easily reach the 128KB mark when you have bigger project. |
@bobzhang I confirm. The project is really big. We have hundreds of Reason and JS modules in a project what makes compiler command very long (~150kB). |
@pszmagaj I guess you meant hundreds of directories? |
@bobzhang Yes. There are hundreds directories. |
Hi,
I have got an unknown error when using vscode plugin.
Plugin version 1.7.4
bs-platform: 5.2.1 but also tried on 7.0.1 with the same effect.
bsconfig.json
The plugin doesn't work. It seems that it cannot compile the code but gets no error. I found in debug log only "type error here " but with no details.
Or something like below (many times for multiple different modules)
The project builds and works when compiling by using npx bsb -make-world
Any ideas what it can be?
The text was updated successfully, but these errors were encountered: