-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Make the IDE work under Windows #2776
Conversation
Classpath elements are separated by ';', not ':' on Windows
The DLS runs as many compiler instances as there are subprojects in the build . When a file is opened we need to decide which compiler instance should handle it, this is done by matching the file URI against the source directories configured for each subproject. This commit improves this matching in two way: - Use URI#getPath instead of URI#getRawPath to decode percent-encoded characters in the URI - Use File#getCanonicalPath instead of File#getAbsolutePath The first fix is necessary to get the DLS running in Windows, because URIs start with file:///C%3A/.../ and we need getPath to decode "C%3A" to "C:".
059711f
to
d6c674a
Compare
@smarter - it doesn't correctly open the project on macOS, it opens a new code instance with an "untitled" document. If I manually open the dotty dir it launches the dotty-language server, but seems to be missing a lot of features - only does "rename all occurrences" on right click, that means the servers not really running right? |
Yes, what do you see in the console? |
8760d26
to
44b2145
Compare
@felixmulder I've pushed a potential fix, let me know if it works now. |
Actually that's probably not going to help since this code is not run when using launchIDE from the dotty project itself. Can you please give me the output of your console? |
OK, thanks to @liufengyun I was able to debug the issue, I'll update the PR soon. Basically we cannot use |
On Windows, use "cmd.exe /C", this seems to be necessary. On every OS, pass "-n" to Code to start a new instance, this makes things more reproducible.
We cannot use "mkdir -p" because it doesn't work on Windows. Instead, add the vscode-dotty/out directory to git.
@felixmulder Updated, let me know if everything works OK on OS X now :) |
@smarter After setting VSCode in PATH, it works well for the dotty project on my Mac 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Also, when running under OS X, it should no longer be necessary to put
code
on your PATH asopen -a "Visual Studio Code"
will be used.Also, always pass
-n
to Code to always start a new instance, this makes things more reproducible.@felixmulder Can you check for me that everything still works OK under OS X? Just run
sbt launchIDE
in dotty and in dotty-example-project and check that they both work as expected.