redhat-developer / redhat-developer/vscode-java
Scala import cannot be resolved in Java project
還沒有人認領這個 Issue。
- 主要語言
- TypeScript
- 星號
- 2.3k
- 分支
- 547
- 平均合併
- 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