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

java.project.referencedLibraries should resolve paths leading with ~ #1735

Closed
fbricon opened this issue Apr 20, 2021 · 2 comments · Fixed by #1739
Closed

java.project.referencedLibraries should resolve paths leading with ~ #1735

fbricon opened this issue Apr 20, 2021 · 2 comments · Fixed by #1739
Assignees

Comments

@fbricon
Copy link
Contributor

fbricon commented Apr 20, 2021

If I define a referenced library such as:

"java.project.referencedLibraries": [
        "/Users/fbricon/Downloads/javafx-sdk-11.0.2/lib/*.jar"
 ]

My no-build-tool project compiles. However, if you change it to

"java.project.referencedLibraries": [
        "~/Downloads/javafx-sdk-11.0.2/lib/*.jar"
 ]

It fails. Using ~ is more portable so would be good to resolve it automatically

@rgrunber
Copy link
Contributor

rgrunber commented Apr 21, 2021

Seems like a nice touch. Do we have a general "path resolution" class that we could apply to all path settings that get sent to the LS and take a filesystem path, so we could benefit everywhere from this ?

I'm thinking even things like ${user.dir}, ${user.home}, ${java.home} (if existing) from system properties/env ?

@snjeza
Copy link
Contributor

snjeza commented Apr 21, 2021

I'm thinking even things like ${user.dir}, ${user.home}, ${java.home} (if existing) from system properties/env ?

I will try to do it.

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

Successfully merging a pull request may close this issue.

3 participants