redhat-developer / redhat-developer/vscode-java

Extension overwrites JAVA_HOME set by Nix with SDKMAN!

未关闭
#4,143 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
2.3k
派生
546
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

I use Nix to manage my JDKs. All Nix packages for the different JDK distributions also configure the JAVA_HOME environment variable. This configuration takes precedence over SDKMAN!. In fact, from a Terminal window, everything works correctly. However, when opening the project in Visual Studio Code, the "Language Support for Java(TM) by Red Hat" extension seems to overwrite the value set by Nix with the one from SDKMAN!, even if there's no .sdkmanrc file in that project and the whole session is within the Nix environment context.

I have created a repo with a minimal setup and detailed instructions to reproduce the error (issue number 2 in the README).

https://github.com/ThomasVitale/vscode-java-nix-issue

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 issue 中链接的最小复现仓库开始,按照其 README 中的 issue 2 操作。比较终端中的 JAVA_HOME 与在 Visual Studio Code 中打开项目时的值,同时包括 session 的 Nix 上下文以及不存在 .sdkmanrc 文件这一点。完成的标准是,在此设置下 extension 不再覆盖 Nix 的 JAVA_HOME。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, nixos, typescript, vscode
领域
developer-experience, tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。