redhat-developer / redhat-developer/vscode-java
Scala import cannot be resolved in Java project
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
I am working on a Java Play 2.6 project and wanted to switch from eclipse (ScalaIDE) to VSCode (because I use VSCode for everything else and I largely prefer to work with it rather than eclipse).
In Eclipse, I have no problem importing a Scala source ( scala.collection.Seq ) but in VScode, opening the same Eclipse project and having no problem with all other external librairies, it cannot resolve the scala.collection.Seq import. (more precisely it's the scala.collection import ).
When compiling my project in the console using sbt, I have no problem.
Also Eclipse is able to resolve that import. Maybe it has to do with the "Scala library container" exlipse plugins of ScalaIDE
Environment
- Linux Ubuntu 16.04
- JDK version: 1.8
- Visual Studio Code version: 1.23.1
- Java extension version: Language support for Java(TM) by Red Hat 0.26.0
Steps To Reproduce
- Create a Java play project using sbt
- Import it in ScalaIDE
- Create a class that imports
scala.collection.Seq - Open the project in VSCode.
Logs : No errors in the logs.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,使用 sbt 创建一个 Java Play 2.6 项目并复现该问题,然后将 VSCode 的依赖解析与正常工作的 Eclipse 和控制台构建进行比较。当 Java 项目能够在 VSCode 中无错误地解析 scala.collection.Seq import 时,问题就算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, scala, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100