scalameta / metals

Scala language server with rich IDE features 🚀
https://scalameta.org/metals/
Apache License 2.0
2.1k stars 336 forks source link

cant' code navigation #4065

Open fuyou001 opened 2 years ago

fuyou001 commented 2 years ago

Describe the bug

  1. git clone https://github.com/apache/kafka.git
  2. cd kakfa
  3. code . //code is Visual Studio Code
  4. install Metals (Visual Studio Code Extension)
  5. open Timer.scala
  6. ctrl+click -->advanceClock method
  7. but not code navigation to advanceClock method

Expected behavior

expected to code navigation is work.

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.17.0

Extra context or search terms

Visual Studio Code version info

Version: 1.68.1
Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630
Date: 2022-06-14T12:52:13.188Z (1 wk ago)
Electron: 17.4.7
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Darwin x64 21.3.0

the log info

2022.06.25 21:16:03 INFO  logging to file /Users/fuyubao/study/kafka/.metals/metals.log
2022.06.25 21:16:03 INFO  Started: Metals version 0.11.6 in workspace '/Users/fuyubao/study/kafka' for client Visual Studio Code 1.68.1.
2022.06.25 21:16:05 INFO  time: initialize in 1.19s
2022.06.25 21:16:05 WARN  Flyway upgrade recommended: H2 2.1.212 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 2.1.210.
2022.06.25 21:16:06 INFO  Attempting to connect to the build server...
2022.06.25 21:16:07 INFO  skipping build import with status 'Installed'
2022.06.25 21:16:10 INFO  no build target found for /Users/fuyubao/study/kafka/core/src/main/scala/kafka/utils/timer/Timer.scala. Using presentation compiler with project's scala-library version: 3.1.2
2022.06.25 21:16:13 INFO  tracing is disabled for protocol BSP, to enable tracing of incoming and outgoing JSON messages create an empty file at /Users/fuyubao/study/kafka/.metals/bsp.trace.json or /Users/fuyubao/Library/Caches/org.scalameta.metals/bsp.trace.json
2022.06.25 21:16:13 INFO  time: Connected to build server in 7.79s
2022.06.25 21:16:13 INFO  Connected to Build server: Bloop v1.5.0-18-003e6c7b
2022.06.25 21:16:14 INFO  time: Imported build in 0.93s
2022.06.25 21:16:15 INFO  time: code lens generation in 7.76s
2022.06.25 21:16:16 INFO  no build target found for /Users/fuyubao/study/kafka/core/src/main/scala/kafka/utils/timer/Timer.scala. Using presentation compiler with project's scala-library version: 3.1.2
2022.06.25 21:16:16 INFO  time: code lens generation in 4.04s
2022.06.25 21:16:25 INFO  time: indexed workspace in 10s
2022.06.25 21:16:26 INFO  compiling clients (932 java sources)
2022.06.25 21:16:36 INFO  某些消息已经过简化; 请使用 -Xdiags:verbose 重新编译以获得完整输出
2022.06.25 21:16:36 INFO  time: compiled clients in 10s
2022.06.25 21:16:58 INFO  compiling clients (932 java sources)
2022.06.25 21:17:02 INFO  running '/Users/fuyubao/study/kafka/gradlew --console=plain --init-script /var/folders/6r/j89fwnns1yn_6l87np254mkw0000gp/T/metals1575949910759321194/init-script.gradle bloopInstall'
2022.06.25 21:17:02 INFO  running '/Users/fuyubao/study/kafka/gradlew --console=plain --init-script /var/folders/6r/j89fwnns1yn_6l87np254mkw0000gp/T/metals7284278453197952672/init-script.gradle bloopInstall'
2022.06.25 21:17:03 INFO  Starting a Gradle Daemon (subsequent builds will be faster)
2022.06.25 21:17:04 INFO  Starting a Gradle Daemon (subsequent builds will be faster)
2022.06.25 21:17:05 INFO  某些消息已经过简化; 请使用 -Xdiags:verbose 重新编译以获得完整输出
2022.06.25 21:17:05 INFO  time: compiled clients in 6.14s
2022.06.25 21:17:13 INFO
2022.06.25 21:17:13 INFO
2022.06.25 21:17:13 INFO  > Configure project :
2022.06.25 21:17:13 INFO  > Configure project :
2022.06.25 21:17:13 INFO  Starting build with version 3.3.0-SNAPSHOT (commit id 08e27914) using Gradle 7.4.2, Java 1.8 and Scala 2.13.8
2022.06.25 21:17:13 INFO  Starting build with version 3.3.0-SNAPSHOT (commit id 08e27914) using Gradle 7.4.2, Java 1.8 and Scala 2.13.8
2022.06.25 21:17:13 INFO  Build properties: maxParallelForks=12, maxScalacThreads=8, maxTestRetries=0
2022.06.25 21:17:13 INFO  Build properties: maxParallelForks=12, maxScalacThreads=8, maxTestRetries=0
2022.06.25 21:17:19 INFO
2022.06.25 21:17:19 INFO  > Task :configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :connect:configureBloopInstall
2022.06.25 21:17:19 INFO
2022.06.25 21:17:19 INFO  > Task :connect:configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :generator:configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :clients:configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :examples:configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :server-common:configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :log4j-appender:configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :jmh-benchmarks:configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :raft:configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :shell:configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :metadata:configureBloopInstall
2022.06.25 21:17:19 INFO  > Task :core:configureBloopInstall
2022.06.25 21:17:20 INFO  > Task :generator:configureBloopInstall
2022.06.25 21:17:20 INFO  > Task :clients:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:bloopInstall
2022.06.25 21:17:21 INFO  > Task :bloopInstall
2022.06.25 21:17:21 INFO  > Task :examples:bloopInstall
2022.06.25 21:17:21 INFO  > Task :storage:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :tools:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :jmh-benchmarks:bloopInstall
2022.06.25 21:17:21 INFO  > Task :streams:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :trogdor:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :generator:bloopInstall
2022.06.25 21:17:21 INFO  > Task :server-common:bloopInstall
2022.06.25 21:17:21 INFO  > Task :raft:bloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:api:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:file:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:basic-auth-extension:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :log4j-appender:bloopInstall
2022.06.25 21:17:21 INFO  > Task :metadata:bloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:json:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :shell:bloopInstall
2022.06.25 21:17:21 INFO  > Task :clients:bloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:mirror-client:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:mirror:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :tools:bloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:transforms:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :core:bloopInstall
2022.06.25 21:17:21 INFO  > Task :storage:bloopInstall
2022.06.25 21:17:21 INFO  > Task :storage:api:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :streams:examples:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:runtime:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:api:bloopInstall
2022.06.25 21:17:21 INFO  > Task :streams:streams-scala:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :streams:bloopInstall
2022.06.25 21:17:21 INFO  > Task :trogdor:bloopInstall
2022.06.25 21:17:21 INFO  > Task :streams:test-utils:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :streams:upgrade-system-tests-0100:configureBloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:mirror-client:bloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:file:bloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:transforms:bloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:json:bloopInstall
2022.06.25 21:17:21 INFO  > Task :connect:basic-auth-extension:bloopInstall
2022.06.25 21:17:21 INFO  > Task :streams:examples:bloopInstall
2022.06.25 21:17:21 INFO  > Task :streams:upgrade-system-tests-0102:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-0101:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-0110:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-11:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-20:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-10:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :storage:api:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-21:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:test-utils:bloopInstall
2022.06.25 21:17:22 INFO  > Task :connect:mirror:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:streams-scala:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-22:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-24:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-23:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-25:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-0100:bloopInstall
2022.06.25 21:17:22 ERROR code navigation does not work for the file '/Users/fuyubao/study/kafka/core/src/main/scala/kafka/utils/timer/Timer.scala' because the SemanticDB file '/Users/fuyubao/study/kafka/.bloop/core/build/bloop-bsp-clients-classes/classes-Metals-L8pm29uzQS-lFHd0bEhpeQ==/META-INF/semanticdb/core/src/main/scala/kafka/utils/timer/Timer.scala.semanticdb' doesn't exist. There can be many reasons for this error.
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-10:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-0110:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-0101:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-0102:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-30:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-27:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-28:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-26:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :connect:runtime:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-31:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-24:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-32:configureBloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-23:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-11:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-20:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-30:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-25:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-21:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-27:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-22:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-28:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-26:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-32:bloopInstall
2022.06.25 21:17:22 INFO  > Task :streams:upgrade-system-tests-31:bloopInstall
2022.06.25 21:17:22 INFO
2022.06.25 21:17:22 INFO  Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
2022.06.25 21:17:22 INFO
2022.06.25 21:17:22 INFO  You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
2022.06.25 21:17:22 INFO
2022.06.25 21:17:22 INFO  See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings
2022.06.25 21:17:22 INFO
2022.06.25 21:17:22 INFO  BUILD SUCCESSFUL in 20s
2022.06.25 21:17:22 INFO  92 actionable tasks: 92 executed
2022.06.25 21:17:23 INFO  > Task :examples:configureBloopInstall
2022.06.25 21:17:23 INFO  > Task :server-common:configureBloopInstall
2022.06.25 21:17:23 INFO  > Task :log4j-appender:configureBloopInstall
2022.06.25 21:17:23 INFO  > Task :jmh-benchmarks:configureBloopInstall
2022.06.25 21:17:23 INFO  > Task :raft:configureBloopInstall
2022.06.25 21:17:23 INFO  > Task :shell:configureBloopInstall
2022.06.25 21:17:23 INFO  > Task :metadata:configureBloopInstall
2022.06.25 21:17:23 INFO  > Task :core:configureBloopInstall
2022.06.25 21:17:23 INFO  time: ran 'gradle bloopInstall' in 21s
2022.06.25 21:17:23 INFO  Disconnecting from Bloop session...
2022.06.25 21:17:23 INFO  Shut down connection with build server.
2022.06.25 21:17:23 INFO  Attempting to connect to the build server...
2022.06.25 21:17:24 INFO  tracing is disabled for protocol BSP, to enable tracing of incoming and outgoing JSON messages create an empty file at /Users/fuyubao/study/kafka/.metals/bsp.trace.json or /Users/fuyubao/Library/Caches/org.scalameta.metals/bsp.trace.json
2022.06.25 21:17:24 INFO  time: Connected to build server in 0.2s
2022.06.25 21:17:24 INFO  Connected to Build server: Bloop v1.5.0-18-003e6c7b
2022.06.25 21:17:23 INFO  > Task :connect:bloopInstall
2022.06.25 21:17:23 INFO  > Task :bloopInstall
2022.06.25 21:17:23 INFO  > Task :storage:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :streams:configureBloopInstall
2022.06.25 21:17:23 INFO  time: Imported build in 0.49s
2022.06.25 21:17:24 INFO  > Task :log4j-appender:bloopInstall
2022.06.25 21:17:24 INFO  > Task :server-common:bloopInstall
2022.06.25 21:17:24 INFO  > Task :tools:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :examples:bloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:api:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :trogdor:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :jmh-benchmarks:bloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:basic-auth-extension:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :shell:bloopInstall
2022.06.25 21:17:24 INFO  > Task :clients:bloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:file:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:json:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :metadata:bloopInstall
2022.06.25 21:17:24 INFO  > Task :raft:bloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:mirror-client:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:mirror:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :generator:bloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:api:bloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:transforms:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :tools:bloopInstall
2022.06.25 21:17:24 INFO  > Task :storage:api:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:runtime:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :core:bloopInstall
2022.06.25 21:17:24 INFO  > Task :streams:bloopInstall
2022.06.25 21:17:24 INFO  > Task :streams:examples:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :streams:streams-scala:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:mirror-client:bloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:file:bloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:json:bloopInstall
2022.06.25 21:17:24 INFO  > Task :connect:basic-auth-extension:bloopInstall
2022.06.25 21:17:24 INFO  > Task :streams:test-utils:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :storage:bloopInstall
2022.06.25 21:17:24 INFO  > Task :streams:upgrade-system-tests-0102:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :streams:upgrade-system-tests-0100:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :streams:upgrade-system-tests-0101:configureBloopInstall
2022.06.25 21:17:24 INFO  > Task :streams:upgrade-system-tests-0110:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :trogdor:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-10:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :connect:transforms:bloopInstall
2022.06.25 21:17:25 INFO  > Task :storage:api:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-11:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:examples:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-20:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-21:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :connect:mirror:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-22:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :connect:runtime:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-23:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-0102:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-0101:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-0110:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-10:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-0100:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:test-utils:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-25:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-24:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:streams-scala:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-26:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-30:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-27:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-28:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-31:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-20:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-11:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-22:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-26:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-21:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-32:configureBloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-25:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-23:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-27:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-30:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-31:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-28:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-24:bloopInstall
2022.06.25 21:17:25 INFO  > Task :streams:upgrade-system-tests-32:bloopInstall
2022.06.25 21:17:25 INFO
2022.06.25 21:17:25 INFO  Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
2022.06.25 21:17:25 INFO
2022.06.25 21:17:25 INFO  You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
2022.06.25 21:17:25 INFO
2022.06.25 21:17:25 INFO  See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings
2022.06.25 21:17:25 INFO
2022.06.25 21:17:25 INFO  BUILD SUCCESSFUL in 23s
2022.06.25 21:17:25 INFO  92 actionable tasks: 92 executed
2022.06.25 21:17:26 INFO  time: ran 'gradle bloopInstall' in 23s
2022.06.25 21:17:26 INFO  Disconnecting from Bloop session...
2022.06.25 21:17:26 INFO  Shut down connection with build server.
2022.06.25 21:17:26 INFO  Attempting to connect to the build server...
2022.06.25 21:17:26 INFO  tracing is disabled for protocol BSP, to enable tracing of incoming and outgoing JSON messages create an empty file at /Users/fuyubao/study/kafka/.metals/bsp.trace.json or /Users/fuyubao/Library/Caches/org.scalameta.metals/bsp.trace.json
2022.06.25 21:17:26 INFO  time: Connected to build server in 0.11s
2022.06.25 21:17:26 INFO  Connected to Build server: Bloop v1.5.0-18-003e6c7b
2022.06.25 21:17:26 INFO  time: Imported build in 0.34s
2022.06.25 21:17:33 INFO  time: indexed workspace in 8.54s
2022.06.25 21:17:34 INFO  time: indexed workspace in 7.11s
2022.06.25 21:20:22 INFO  compiling clients (932 java sources)
2022.06.25 21:20:26 INFO  某些消息已经过简化; 请使用 -Xdiags:verbose 重新编译以获得完整输出
2022.06.25 21:20:26 INFO  time: compiled clients in 3.88s
2022.06.25 21:26:00 ERROR code navigation does not work for the file '/Users/fuyubao/study/kafka/core/src/main/scala/kafka/utils/timer/Timer.scala' because the SemanticDB file '/Users/fuyubao/study/kafka/.bloop/core/build/bloop-bsp-clients-classes/classes-Metals-h7Am9qbaQKGk6qnyAlZHmA==/META-INF/semanticdb/core/src/main/scala/kafka/utils/timer/Timer.scala.semanticdb' doesn't exist. There can be many reasons for this error.
2022.06.25 21:26:00 ERROR code navigation does not work for the file '/Users/fuyubao/study/kafka/core/src/main/scala/kafka/utils/timer/Timer.scala' because the SemanticDB file '/Users/fuyubao/study/kafka/.bloop/core/build/bloop-bsp-clients-classes/classes-Metals-h7Am9qbaQKGk6qnyAlZHmA==/META-INF/semanticdb/core/src/main/scala/kafka/utils/timer/Timer.scala.semanticdb' doesn't exist. There can be many reasons for this error.
2022.06.25 21:26:00 ERROR code navigation does not work for the file '/Users/fuyubao/study/kafka/core/src/main/scala/kafka/utils/timer/Timer.scala' because the SemanticDB file '/Users/fuyubao/study/kafka/.bloop/core/build/bloop-bsp-clients-classes/classes-Metals-h7Am9qbaQKGk6qnyAlZHmA==/META-INF/semanticdb/core/src/main/scala/kafka/utils/timer/Timer.scala.semanticdb' doesn't exist. There can be many reasons for this error.
2022.06.25 21:26:01 ERROR code navigation does not work for the file '/Users/fuyubao/study/kafka/core/src/main/scala/kafka/utils/timer/Timer.scala' because the SemanticDB file '/Users/fuyubao/study/kafka/.bloop/core/build/bloop-bsp-clients-classes/classes-Metals-h7Am9qbaQKGk6qnyAlZHmA==/META-INF/semanticdb/core/src/main/scala/kafka/utils/timer/Timer.scala.semanticdb' doesn't exist. There can be many reasons for this error.
2022.06.25 21:28:10 ERROR code navigation does not work for the file '/Users/fuyubao/study/kafka/core/src/main/scala/kafka/utils/timer/Timer.scala' because the SemanticDB file '/Users/fuyubao/study/kafka/.bloop/core/build/bloop-bsp-clients-classes/classes-Metals-h7Am9qbaQKGk6qnyAlZHmA==/META-INF/semanticdb/core/src/main/scala/kafka/utils/timer/Timer.scala.semanticdb' doesn't exist. There can be many reasons for this error.
2022.06.25 21:28:48 ERROR code navigation does not work for the file '/Users/fuyubao/study/kafka/core/src/main/scala/kafka/utils/timer/Timer.scala' because the SemanticDB file '/Users/fuyubao/study/kafka/.bloop/core/build/bloop-bsp-clients-classes/classes-Metals-h7Am9qbaQKGk6qnyAlZHmA==/META-INF/semanticdb/core/src/main/scala/kafka/utils/timer/Timer.scala.semanticdb' doesn't exist. There can be many reasons for this error.
Arthurm1 commented 2 years ago

I'm using JDK 17 and this won't compile for me because of various bad path element warnings and -Werror being set in the javac options.

The upgrade-system-tests-XX projects have no sources under main, only under test so Bloop doesn't create the output classes dir so javac, for dependent projects, complains that classes dir doesn't exist.

To fix this for now I... 1) removed "-Werror", from all the .bloop/*.json files 2) ran restart build server 3) ran clean, compile workspace

It now has issues with missing files - which is down to source generation not having run so I... 1) ran ./gradlew processMessages processTestMessages 2) ran clean, compile workspace

Now I'm getting bad option: '-release' so I... 1) removed "-release", "8", from the scala section of all the .bloop/*.json files that had it in. 2) ran restart build server 3) ran clean, compile workspace

I then had to introduce an error into Timer.scala and fix it to get it to properly recompile. I shouldn't have to do this and it's probably due to all the changes I've made to the build files.

Now I can navigate round that file. Clicking on advanceClock in timingWheel.advanceClock(bucket.getExpiration) will take me to TimingWheel.scala

I think there are 3 issues here... 1) The javac compilation errors didn't appear on the Problems tab - only in the logs so it's difficult to know the project isn't compiling. I don't know why this is. 2) How is the scala -release flag working in Gradle but not in Bloop? I've no idea 3) Maybe the Gradle plugin should completely ignore empty directories when it exports to Bloop. This is the only way round -Werror that I can see. Gradle gets round this issue by always creating a jar or a test.jar and Kafka gets round this issue by specifically naming the jar so the test jar and non test jar have the same name. Downside of this would be that bloopInstall would have to be re-run if a new file was created in a directory that didn't exist before but the user expected it to be part of the build e.g. test/resources.

I'll look into no. 3

tgodzik commented 2 years ago

The javac compilation errors didn't appear on the Problems tab - only in the logs so it's difficult to know the project isn't compiling. I don't know why this is.

I think exceptions don't show up properly, but we should be able to fix it in Bloop.

How is the scala -release flag working in Gradle but not in Bloop? I've no idea

That should really work, I think ScalaCLI uses that flag.

fuyou001 commented 2 years ago

what's the plan to fix it ?

tgodzik commented 2 years ago

There is no progress currently, we haven't been able to look into it unfortunately.