!hVYkPByWdqNfJKveFs:matrix.org

scalameta/general

419 Members
Discord bridge for scalameta/general5 Servers

Load older messages


SenderMessageTime
28 Feb 2024
@_discord_518111661866090507:t2bot.ioVMetals changed their display name from kurro#9452 to kurro9452.08:47:23
@_discord_233683447992811521:t2bot.iouff0 joined the room.12:50:39
@_discord_233683447992811521:t2bot.iouff0 changed their profile picture.12:50:40
@_discord_233683447992811521:t2bot.iouff0 Hello everyone! I'm look for recommendations of a library/tool/project which could produce a call graph from scala source code. Does anyone have any suggestions? 12:50:41
@_discord_392428121342869534:t2bot.ioTomasz Godzik There is a functionality in LSP that you should be able to use. Call hierarchy I think it's called 12:52:13
@_discord_392428121342869534:t2bot.ioTomasz Godzik Probably needs some love, since I don't think a lot of users know about it 12:52:39
@_discord_583167330566275072:t2bot.iosethtisue this might interest you: https://github.com/lightbend-labs/scala-sculpt 14:16:31
@_discord_583167330566275072:t2bot.iosethtisue (for Scala 2 only, though) 14:16:54
@_discord_632303296094142464:t2bot.iompilquist changed their profile picture.16:35:20
@_discord_632729825647525922:t2bot.ioekrich changed their profile picture.18:03:04
29 Feb 2024
@_discord_787647294610472981:t2bot.iojimka2001 joined the room.10:40:45
@_discord_659458872486002691:t2bot.iofel_her Hey all. Sorry for posting here, I have a more involved question, somewhere at the intersection of metals, sbt as a build server, and scalajs. Feel free to redirect me where ever you see fit.

In a lot of projects that have both a web-interface as well as a backend, I use scalajs and laminar for the frontend and normal scala/jvm for the backend. I often start 2 sbts in parallel. In the first, I'm doing:
project projectJVM
~reStart

using sbt revolver to restart my process when a file used by the JVM project changes

In the second I'm doing
sbt
project projectJS
~fastLinkJS


regenerating my website when the UI files change.

I don't want to do something like ~fastLinkJS;reStart in the root project because that would restart my server even though only JS files changed.

Now when switching from bloop to sbt as the buildserver for metals, things seem to go awry. Sometimes one or both of the sbts stop compiling. Sometimes spurious errors pop up. Sometimes I get errors like this:
[error] ## Exception when compiling 165 sources to ...../inheritance/jvm/target/scala-3.3.1/classes
[error] java.nio.file.NoSuchFileException: ....../inheritance/jvm/target/scala-3.3.1/classes.bak/sbt10842950307439078630.class


Is it just a bad idea to use sbt as a build server when you have started two sbt in parallel? Should I change the way I do it because there is a better way to only restart the server on JVM changes?
11:10:38
@_discord_659458872486002691:t2bot.iofel_her (sorry for the novel) 11:10:46
@_discord_392428121342869534:t2bot.ioTomasz Godzik In reality there is only one SBT server running and it seems that it's not copying well with having metals connect to it and also SBT revolver running 11:43:30
@_discord_392428121342869534:t2bot.ioTomasz Godzik We actually almost have hot code reload ready via both bloop and SBT, which might work better. Not 100% sure but that's just a guess 11:44:44
@_discord_392428121342869534:t2bot.ioTomasz Godzik For bloop we need to release it, but SBT should actually work when running via metals 11:45:14
@_discord_392428121342869534:t2bot.ioTomasz Godzik It's all new and untested so keep on mind it might not solve your problems 11:45:41
@_discord_392428121342869534:t2bot.ioTomasz Godzik And it's not released so you would need to switch to Prerelease etc. 11:46:06
@_discord_659458872486002691:t2bot.iofel_her Tomasz Godzik Oh, wow! Hot code reload is really exiting. Anywhere I can read up on it? I don't mind switching to prerelease 🙂 11:56:07
@_discord_594749312123142149:t2bot.ioquafadas fel_her As a quick check, I've recently been burned on similar with mill. Is there any chance, that bloop / sbt / metals are using different JVMs?

In my case metals / mill targeted different JVMs and continuously invalidated caching / compilation. If you know they are all targeting the same, it's one potential source of confusion down.
12:23:14
@_discord_392428121342869534:t2bot.ioTomasz Godzik The way it's compiled it should always use the same JVM 12:32:09
@_discord_392428121342869534:t2bot.ioTomasz Godzik Metals itself doesn't compile anything 12:32:25
@_discord_392428121342869534:t2bot.ioTomasz Godzik We don't have any article yet about hot code reload, but it's basically a new button in the debug console 12:32:53
@_discord_659458872486002691:t2bot.iofel_her 🙏 👍 12:50:23
@_discord_659458872486002691:t2bot.iofel_her That's interesting. I only have one JVM installed and not done any special configuration, so I assume everything should use/target the same one 🙂 12:54:19
@_discord_1212749040186560612:t2bot.iokris_17822 joined the room.13:47:15
@_discord_233683447992811521:t2bot.iouff0 Thank you! Looks useful. But I had some trouble with it due to the Scala signature package having the wrong version 16:10:00
@_discord_233683447992811521:t2bot.iouff0 * Thank you! Looks useful. But I'm having some trouble with it due to the Scala signature package having a wrong version 16:17:19
@_discord_233683447992811521:t2bot.iouff0 * Thank you! Looks useful. But I'm having some trouble with it due to the Scala signature package having the wrong version (in com/lightbend/tools/sculpt/cmd/package.class) 16:18:28
@_discord_218540750013464576:t2bot.iobeem812 joined the room.18:57:07

Show newer messages


Back to Room ListRoom Version: 9