Metals Doctor信息
Metals Doctor
Metals Java: 21.0.4 from Arch Linux located at /usr/lib/jvm/java-21-openjdk
Metals Server version: 1.3.5+171-b77fedf0-SNAPSHOT
Below are listed the build targets for this workspace. One build target corresponds to one classpath. For example, normally one sbt project maps to two build targets: main and test.
Project’s Java: 21.0.4 located at /usr/lib/jvm/java-21-openjdk
Build definition is coming from scala-cli.
Build server currently being used is scala-cli v1.5.0. (Reset)
Build target Type Compilation status Diagnostics Interactive Semanticdb Debugging Java support Error reports Recommendation
scala-cli-demo_f1b25db0ce Scala 3.4.2 ✅ ✅ ✅ ✅ ✅ ✅ ✅
scala-cli-demo_f1b25db0ce-test Scala 3.4.2 ✅ ✅ ✅ ⚠️ ✅ ✅ ✅
Compilation status:
✅ - code is compiling
Diagnostics:
✅ - diagnostics correctly being reported by the build server
Interactive features (completions, hover):
✅ - supported Scala version
Semanticdb features (references, renames, go to implementation):
✅ - build tool automatically creating needed semanticdb files
⚠️ - semanticdb index files not present currently
❌ - semanticdb index not being produced
Debugging (run/test, breakpoints, evaluation):
✅ - users can run or test their code with debugging capabilities
Java Support:
✅ - hover, completions and index based features supported
Error reports:
You can attach a single error report or a couple or reports in a zip file (create a zip file from anonymized reports) to your GitHub issue (create a github issue) to help with debugging.
问题原因
因我之前是直接在项目文件夹scala-cli-demo下创建文件的,没有分目录导致编译后的test文件夹没有文件,也就生成不出Semanticdb 文件来,所以doctor报出scala-cli-demo_f1b25db0ce-test文件夹的 Semanticdb 有问题
调整目录结构
├── META-INF
└── src
└── main
├── java
├── scala
└── test
├── java
└── scala
注意src/main/test/scala下要建一个scala文件