Extension incorrectly runs cached `.class` file from another class of same name with no `package`
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- java, typescript, vscode
调研方向
通过运行 folder1/Main.java,然后运行 folder2/Main.java 来重现该问题,同时包括 ./Main.java 和 ./folder/Main.java 的布局。跟踪扩展如何选择缓存的已编译类;完成的标准是每个不相关的 Main.java 都运行其自身的输出,包括在另一个文件已经运行之后。
由索引模型根据 Issue 内容生成。
描述
Bug report
Suppose there is a file structure:
folder1/
Main.java
folder2/
Main.java
// folder1/Main.java
public class Main {
public static void main(String[] args) {
System.out.println("Main 1");
}
}
// folder2/Main.java
public class Main {
public static void main(String[] args) {
System.out.println("Main 2");
}
}
No package statements; the projects are not connected at all.
When folder1/Main.java is run first, it gives the correct output Main 1.
But if folder2/Main.java is then run, it gives the wrong output of Main 1 instead of Main 2; the first built file is run instead.
folder1/Main.java 'shadows' folder2/Main.java, since the class name is the same and there are no package statements.
Another file structure that causes this is ./Main.java, ./folder/Main.java
This bug is inconvenient when multiple different, unrelated Java projects are in the same workspace.
- 主要语言
- TypeScript
- 星标
- 591
- 派生
- 429
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 19
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/vscode-java-debug 的其他 Issue
-
ai-triaged enhancement
难度 3/5 1-2 天 新手友好度 55/100
microsoft/vscode-java-debug#1689 · 2 条评论 ·
-
ai-triaged bug
microsoft/vscode-java-debug#1666 · 1 条评论 · 已指派 1 人 ·
-
ai-triaged bug
难度 3/5 1-2 天 新手友好度 48/100
microsoft/vscode-java-debug#1658 · 1 条评论 ·
-
ai-triaged enhancement
难度 4/5 3-5 天 新手友好度 45/100
microsoft/vscode-java-debug#1628 · 3 条评论 ·
-
Feature support. 未关闭ai-triaged enhancement
难度 5/5 一周以上 新手友好度 25/100
microsoft/vscode-java-debug#1616 · 1 条评论 ·
查看 microsoft/vscode-java-debug 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 75/100
fil-donadoni/tolaria#4409 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
corsairdev/corsair#1764 ·