!VduNnCmIzFzrSqbgFs:matrix.org

scalameta/vscode-users

463 Members
Discord bridge for scalameta/vscode-users4 Servers

Load older messages


SenderMessageTime
24 May 2024
@_discord_683010390145368169:t2bot.iospamegg1 I have SDKMAN installed which lets me easily install and switch between many JVM versions. 09:48:05
@_discord_683010390145368169:t2bot.iospamegg1 https://sdkman.io/ 09:48:14
@_discord_683010390145368169:t2bot.iospamegg1 I think cs (Coursier) can also do it but I'm not sure. 09:48:32
@_discord_683010390145368169:t2bot.iospamegg1 * I think cs (Coursier) or scala-cli can also do it but I'm not sure. 09:48:48
@_discord_683010390145368169:t2bot.iospamegg1Screenshot_from_2024-05-24_12-49-03.png
Download Screenshot_from_2024-05-24_12-49-03.png
09:49:25
@_discord_683010390145368169:t2bot.iospamegg1 I have these JVMs installed 09:49:26
@_discord_683010390145368169:t2bot.iospamegg1 I set it to 17. Then I set the VS Code settings like in the screenshots above. 09:49:51
@_discord_683010390145368169:t2bot.iospamegg1 Anyway you should consider updating stuff in your project. Get the latest Sbt 1.10, update Scala to 2.13.14, update the dependencies, and so on. 09:50:52
@_discord_843896430917320714:t2bot.ioim_bharadwajj ok thank you, i will go through it 09:51:15
@_discord_883806656755019787:t2bot.ioedmismlRedacted or Malformed Event13:45:46
@_discord_883806656755019787:t2bot.ioedmismlRedacted or Malformed Event13:46:06
@_discord_883806656755019787:t2bot.ioedmisml Hi there, I'm trying to update to metals 1.21.1 on my work machine which uses ZScaler. Is there anyway to download the dependencies metals needs from the command line? In the past I've needed to install dependencies with courser doing something like this
java -noverify -jar "/Users/masonedmison/Library/Application Support/Coursier/bin/coursier" java --jvm zulu:17.0.9 --setup

to force it to use my default java that includes all necessary certs.
14:13:59
@_discord_883806656755019787:t2bot.ioedmisml It seems I have installed Metals 1.2.1 now but it now reports build server is not "auto-connectable"
Metals version: 1.2.1
Using coursier located at /Users/masonedmison/Library/Application Support/Coursier/bin/coursier
/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/bin/java -version:
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Zulu21.34+19-CA (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Zulu21.34+19-CA (build 21.0.3+9-LTS, mixed mode, sharing)
Using Java Home: /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
2024.05.24 09:30:46 INFO  logging to files /Users/masonedmison/scalaprojects/interest-rate-derivatives/.metals/metals.log
2024.05.24 09:30:46 INFO  Started: Metals version 1.2.1 in folders '/Users/masonedmison/scalaprojects/interest-rate-derivatives' for client Visual Studio Code 1.89.1.
Initializing Scala Debugger
Release notes was not shown: not showing release notes since they've already been seen for your current version
2024.05.24 09:31:00 WARN  Build server is not auto-connectable.
14:31:59
@_discord_883806656755019787:t2bot.ioedmisml it seems as though a generate bsp-config command did the trick 14:44:12
@_discord_883806656755019787:t2bot.ioedmisml apologies for blowing this thread up but it seems like Metals still reports

2024.05.24 10:11:03 WARN Build server is not auto-connectable.

regardless if I use JDK 17 or 21. If I manually run the generate bsp-config command it appears to use sbt as the build server. I find this confusing as when I was using version 0.11.12 it was using bloop as the build server.
15:12:56
@_discord_883806656755019787:t2bot.ioedmisml Note there is a build.sbt file present in the current working directory 15:13:37
@_discord_883806656755019787:t2bot.ioedmisml If it's helpful the Run Doctor output is
Metals Doctor
Metals Java: 17.0.11 from Azul Systems, Inc. located at /Users/masonedmison/Library/Caches/Coursier/arc/https/cdn.azul.com/zulu/bin/zulu17.50.19-ca-jdk17.0.11-macosx_aarch64.tar.gz/zulu17.50.19-ca-jdk17.0.11-macosx_aarch64/zulu-17.jdk/Contents/Home

Metals Server version: 1.2.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.

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.
15:16:35
@_discord_392428121342869534:t2bot.ioTomasz Godzik You should not need to run anything manually. Maybe best to reset the workspace and it should ask to auto import from sbt 15:19:01
@_discord_883806656755019787:t2bot.ioedmisml by reset the workspace, do you mean something like "reload the window" 15:19:13
@_discord_392428121342869534:t2bot.ioTomasz Godzik there is a reset workspace command 15:20:28
@_discord_392428121342869534:t2bot.ioTomasz Godzik also available in the metals view 15:20:33
@_discord_392428121342869534:t2bot.ioTomasz Godzik or you can do it manually removing .metals .bloop and .bsp folders 15:20:56
@_discord_883806656755019787:t2bot.ioedmisml Hrm I don't see this command 15:23:46
@_discord_883806656755019787:t2bot.ioedmisml Deleted the .metals dir. There were not (and haven't been any automatically created) bsp or bloop directories 15:26:30
@_discord_392428121342869534:t2bot.ioTomasz Godzik if you reload the window does it suggest to import things? 15:28:45
@_discord_883806656755019787:t2bot.ioedmisml it does not 15:28:51
@_discord_883806656755019787:t2bot.ioedmisml what's strange is that when I switch the metals version to 0.11.12 and "import build" it "works". It creates the .bloop directory and everything compiles as expected 15:30:17
@_discord_883806656755019787:t2bot.ioedmisml In 0.11.12 it seems to successfully connect to bloop 1.5.6 (reported by run doctor) 15:32:44
@_discord_883806656755019787:t2bot.ioedmisml Is the VSCode extension known to work with Metals version 1.2.1? 15:36:19
@_discord_392428121342869534:t2bot.ioTomasz Godzik Yes, I mean I am using it 😅 15:55:02

Show newer messages


Back to Room ListRoom Version: 9