redhat-developer / redhat-developer/vscode-java
Scala import cannot be resolved in Java project
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with a Java Play 2.6 project created with sbt, then compare VSCode's dependency resolution with the working Eclipse and console builds. The issue is done when the Java project resolves the scala.collection.Seq import in VSCode without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, scala, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100