24 May 2024 |
Tomasz Godzik | What happens in your logs? Metals output or extension host output? | 15:55:58 |
Tomasz Godzik | We should always show the first notification | 15:56:10 |
Tomasz Godzik | Which directory do you open? It should be the one with build.sbt | 15:56:34 |
edmisml | /Users/masonedmison/interest-rate-derivatives has a build.sbt file | 16:05:04 |
edmisml | So I'm not sure what's happening exactly, but if I manually run the "import build" it can connect to bloop and run doctor now reports mostly green 🤔 | 16:13:10 |
Tomasz Godzik | it should ask you to do it, otherwise nothing will work | 16:15:06 |
Tomasz Godzik | but there seems to not be anything asked | 16:15:21 |
edmisml | yeah it still isn't prompting me to import the build | 16:15:29 |
Tomasz Godzik | btw. newest version of metals is 1.3.1 | 16:15:33 |
Tomasz Godzik | -Dmetals.loglevel=debug should log if we are actually asking | 16:17:31 |
Tomasz Godzik | you can add it to the server properties | 16:17:41 |
edmisml | I will do that | 16:22:42 |
edmisml | so... I changed the metals version to 1.3.1 and it then consistently reported "build server not auto-connectable" (even when manually "import build"). Even switching it back (along with deleting the metals directory, reload the window, etc.) it still reports cannot to the build server 😵 | 16:25:04 |
edmisml | I'll try setting the logLevel to debug | 16:25:16 |
edmisml | adding that as a server property doesn't seem to generate any additional logs | 16:26:58 |
edmisml | In my settings.json I have added
"metals.serverProperties": [
"-Xmx1G",
"-Dmetals.loglevel=debug"
],... | 16:28:20 |
edmisml | ah, updated the version to 1.3.1 and now I see some debug logs | 16:29:11 |
edmisml | but, alas, all that's logged when running "import build" is
2024.05.24 11:29:21 WARN Build server is not auto-connectable. | 16:29:58 |
Tomasz Godzik | Are sure you are opening the project where the build sbt file is located | 16:46:31 |
edmisml | 100% sure | 16:49:23 |
edmisml | interest-rate-derivatives on dev via ☕ v21.0.3 via 🆂 v3.4.2
❯ ls . | rg build
build.sbt | 16:52:09 |
edmisml | in terms of debug logs all I see are flyway migration logs. Can share if that would be helpful | 16:52:57 |
edmisml | Metals doctor output:
Metals Doctor
Metals Java: 21.0.3 from Azul Systems, Inc. located at /Users/masonedmison/Library/Caches/Coursier/arc/https/cdn.azul.com/zulu/bin/zulu21.34.19-ca-jdk21.0.3-macosx_aarch64.tar.gz/zulu21.34.19-ca-jdk21.0.3-macosx_aarch64/zulu-21.jdk/Contents/Home
Metals Server version: 1.3.1
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.3 located at /Users/masonedmison/Library/Caches/Coursier/arc/https/cdn.azul.com/zulu/bin/zulu21.34.19-ca-jdk21.0.3-macosx_aarch64.tar.gz/zulu21.34.19-ca-jdk21.0.3-macosx_aarch64
No build server found. Try to run the generate-bsp-config command.
⚠️ No build targets were detected in this workspace so most functionality won't work.
Make sure the workspace directory '/Users/masonedmison/interest-rate-derivatives' matches the root of your build.
Try removing the directories .metals/ and .bloop/, then restart metals And import the build again. | 16:54:24 |
edmisml | So I'm thinking that it might be something within the build.sbt file? I created a dummy scala 3 project and it is able to connect with bloop (both with server versions 1.2.1 and 1.3.1) | 17:07:15 |
Tomasz Godzik | Would need to at least see the project structure | 18:15:01 |
edmisml | I think I've found the issue (or at least narrowed down the issue, ha): the project in question includes a java sub-project -- when I remove this "delete" this from the project (delete the directory containing the java code), things work as expected. | 19:00:40 |
edmisml | and it seems like the above isn't as issue in 0.11.12 | 19:01:06 |
Tomasz Godzik | Huh, that's highly unexpected | 19:01:30 |
edmisml | that we have a java project defined in the build file or that in an issue seems to be caused by having a java sub-project? | 19:14:04 |
edmisml | I would agree with the former 🙂 | 19:14:55 |