Skip to content
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

Clarify workingDirectory in JvmEnvironmentItem #351

Open
eed3si9n opened this issue Jul 29, 2022 · 2 comments
Open

Clarify workingDirectory in JvmEnvironmentItem #351

eed3si9n opened this issue Jul 29, 2022 · 2 comments

Comments

@eed3si9n
Copy link
Contributor

Ref sbt/sbt#6982
Ref https://youtrack.jetbrains.com/issue/SCL-20275/Cannot-start-process-the-working-directory-filexxxxyyyy-does-not-exist-when-running-the-main-method-in-an-object-sbt-171

steps

JVM extension contains JvmEnvironmentItem#workingDirectory, which is a String:

export interface JvmEnvironmentItem{
target: BuildTargetIdentifier;
classpath: Uri[];
jvmOptions: String[];
workingDirectory: String;
environmentVariables: Map<String, String>;
}

problem

The spec isn't clear about what the String is supposed to be.
sbt 1.7.1 sends Keys.baseDirectory.value.toURI().toString(), which apparently broke the expectation by IntelliJ Scala Plugin.

expectation

There's now a PR fixing this as sbt/sbt#6983, and I am happy to move that forward, but I also wonder if spec should clarify that it represents an absolute path of the local filesystem, or preferably an absolute path or an URI since most things on LSP are URI-based.

@jastice
Copy link
Member

jastice commented Jul 30, 2022

I've already pushed a fix for the Scala plugin so that it works with both file URIs and paths. I think really this should be an URI for consistency, but now we have a state where a raw path is the default, so I suppose we should clarify that in the spec.

@abrams27
Copy link
Contributor

i think that we should address this inconsistency in bsp 3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants