-
Notifications
You must be signed in to change notification settings - Fork 323
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
Installation problems in VSCode #383
Comments
Can you try and see whether manually executing the "Import build" command gives the same error? You can run it from the command palette. |
Thanks, that definitely helped with getting better diagnostics.
Log shows that my problem on this particular project is that it's launching I tried on an open source project (fs2) and things are working great after disabling the other language server plugins. |
@mpilquist are you behind a proxy? You may need to configure system properties to make it work then. It's undocumented at the moment, I've been meaning to add a section on proxies for a while. |
Not behind a proxy exactly -- rather, I have to launch sbt with these args:
Where |
That would explain it, Metals uses an embedded sbt launcher by default since that helped out on Windows. We should support executing the user's 'sbt' command, but it's not implemented at the moment. |
Adding configurable sbt options similarly to the Java options we already have should be easy, wdyt @olafurpg? |
I opened #387 adding support for If that doesn't do the trick we probably need another option to run the user's |
I think I’d need custom launcher support as I want to use the regular SBT launcher for open source projects and a special launcher for work stuff. I normally do this via a launcher launcher which checks the directory structure and passes the right args to the sbt launcher — either no args or overridden -sbt-dir and Ivy home.
… On Dec 8, 2018, at 12:00 PM, Ólafur Páll Geirsson ***@***.***> wrote:
I opened #387 adding support for .sbtopts, .jvmopts and allowing users add custom JVM options when metals launches sbt. I'm not sure if this fixes your problem @mpilquist but it's a good first step.
If that doesn't do the trick we probably need another option to run the user's sbt command directly, but I'm hesitant to go that route since it didn't work reliably on Windows when I tried.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@mpilquist from what I can tell, #387 also allows to provide a custom sbt launcher: That should satisfy your use case, right? |
@gabro That customizable launcher is a jar file, not 'sbt' script.
@mpilquist how does this setup work for a larger team, do everyone need the
same custom 'sbt' script? I thought the idiomatic solution in this
situation was to declare custom options in '.sbtopts' that's checked into
the repo. I want to support this use case but I'd like to understand it a
bit better first.
…On Sat, 8 Dec 2018 at 19:16, Gabriele Petronella ***@***.***> wrote:
@mpilquist <https://github.com/mpilquist> from what I can tell, #387
<#387> also allows to provide a
custom sbt launcher:
https://github.com/olafurpg/metals/blob/2d201096264182f20e56b3e29837739c4f6a6a7f/metals/src/main/scala/scala/meta/internal/metals/UserConfiguration.scala#L34
That should satisfy your use case, right?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#383 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABV8XUP6SuxDSVU0-Nljjp0ql4R_nodWks5u3AILgaJpZM4ZI90s>
.
|
@olafurpg Yeah, either everyone needs a copy of the launcher script or everyone needs to configure ~/.sbt/repositories to point to the corporate proxy. The latter works fine if you aren't doing open source work on the same machine. My launcher script is sort of a lightweight equivalent to The |
@mpilquist Thanks for the context. I'll update #387 to support executing a custom |
I tried installing 0.3.1 in to VSCode -- disabled other Scala language servers.
Restarting the Metals server & reconnecting to the server results in the same errors as above. Note my default Java is OpenJDK 11 but I have the path to JDK 8 specified in Metals settings.
The text was updated successfully, but these errors were encountered: