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

Missing proxy settings for Coursier when resolving Java Home #1538

Open
unlsycn opened this issue Sep 12, 2024 · 3 comments · Fixed by #1539
Open

Missing proxy settings for Coursier when resolving Java Home #1538

unlsycn opened this issue Sep 12, 2024 · 3 comments · Fixed by #1539

Comments

@unlsycn
Copy link

unlsycn commented Sep 12, 2024

Describe the bug

To Reproduce Steps to reproduce the behavior:

Start metals-vscode in a environment without JDK, and then coursier will try to fetch JDK while running coursier java --jvm temurin:${javaVersion} -version.

Expected behavior

Pass proxy settings when running coursier.

Installation:

  • Operating system: Linux
  • VSCode version: 1.92.2
  • VSCode extension version: 1.39.0
  • Metals version: 1.3.5
@unlsycn
Copy link
Author

unlsycn commented Oct 25, 2024

Thanks for your fix, but this problem still seems to exist in 1.40.0.
When I start metals-vscode with either $JAVA_OPTS or .jvmopts, it executes ~/.metals/cs java --jvm temurin:17 -version without proper arguments.

@unlsycn
Copy link
Author

unlsycn commented Oct 25, 2024

Thanks for your fix, but this problem still seems to exist in 1.40.0. When I start metals-vscode with either $JAVA_OPTS or .jvmopts, it executes ~/.metals/cs java --jvm temurin:17 -version without proper arguments.

Oh, I think I figured out what the problem is:
Only the getJavaOptions function tries to get $JAVA_OPTS and .jvmopts, but this function was never called and setupCoursier only gets the settings from the configuration item serverProperties. I don't konw if this behavior is reasonable.

@tgodzik tgodzik reopened this Oct 25, 2024
@tgodzik
Copy link
Contributor

tgodzik commented Oct 25, 2024

Ach, right, let's try #1547

Once it's merged you can try out the prerelease version.

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

Successfully merging a pull request may close this issue.

2 participants