25 May 2022 |
Bauhaus911#7350 | Is there a way to tell SBT to unload a dll that got loaded from running a scala app that loads a dll when it runs? Otherwise I have to continously exit sbt to the OS shell and re-launch SBT which is not efficient at all. | 14:29:20 |
Lasering#6803 | Bauhaus911 I would guess setting fork := true solves your problem. The sbt manual on forking https://www.scala-sbt.org/1.x/docs/Forking.html says:
By default, the run task runs in the same JVM as sbt.
Hence the dll will be loaded into the save JVM as sbt, but if you set fork then the application will be ran on a new JVM. | 14:32:51 |
Daenyth#7233 | in IJ there's a checkbox | 14:58:04 |
Daenyth#7233 | Preferences | Build, Execution, Deployment | Build Tools | sbt "sbt sources" under the download section | 14:58:38 |
Daenyth#7233 | your next sbt refresh should grab the sbt sources and then you can navigate them the same as library dependencies | 14:59:06 |
Daenyth#7233 | oh but if you're using BSP I'm not sure if that works | 14:59:31 |
Daenyth#7233 | or if it works but is different | 14:59:36 |
Daenyth#7233 | try it out in any case | 14:59:41 |
Lasering#6803 |  Download Screenshot_171018.png | 16:10:25 |
Lasering#6803 | the setting "sbt sources" only exists when the project is imported as a sbt project. If the project is imported as a BSP project you get this: | 16:10:26 |
Daenyth#7233 | ah in that case you're hosed | 16:11:28 |
Lasering#6803 |  Download Screenshot_171119.png | 16:11:30 |
Lasering#6803 | if I try to navigate to a sbt source I get this | 16:11:30 |
Daenyth#7233 | IMO if you're using BSP you might as well use vscode instead of intellij | 16:11:37 |
Daenyth#7233 | you're losing a lot of the IDE power anyway | 16:11:44 |
Lasering#6803 | and usually I can click in attach sources and point to the correct location, however I can't find the sources of sbt on my computer, nor how to download them | 16:12:07 |
Lasering#6803 | I run, build, test, etc on a terminal outside of IntelliJ. The refactors, syntax highlight, Go to implementation, etc all work well. I'm using BSP because my projects are in Scala 3 and when I was using sbt IntelliJ was having problems | 16:14:22 |
Lasering#6803 | sometimes I need to use vscode because metals has a better support for Scala 3, but I much rather use IntelliJ instead of vscode | 16:15:13 |
Lasering#6803 | finally found them. Specifically for the "Keys.scala" the sources are at ~/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/main_2.12/1.6.2/main_2.12-1.6.2-sources.jar | 16:30:29 |
Lasering#6803 | for any other file the way to get there is to execute ("Keys" is the file we want to get the sources for):
cd ~/.sbt/boot/scala-2.12.15/org.scala-sbt/sbt/1.6.2
for file in ./*.jar; do echo $file; unzip -Z1 $file | grep "Keys"; done | 16:31:35 |
| Billzabob joined the room. | 17:24:03 |
| maxo changed their display name from maxo to maxo#0417. | 21:24:45 |
| maxo changed their display name from maxo#0417 to maxo. | 21:24:51 |
| ACE81 joined the room. | 23:08:52 |
26 May 2022 |
| milestobudapest joined the room. | 09:21:27 |
| tgodzik#4885 joined the room. | 09:40:45 |
tgodzik#4885 | Lasering have you tried reaching out to the jetbrains folks on their discord server? They should be able to help out. | 09:40:45 |
| Nicolas joined the room. | 12:12:15 |
darkfrog#6530 | I'm trying to find documentation on running each test in its own forked process while allowing several concurrent test to run simultaneously. Unfortunately, most of the results I find online are for very old versions of SBT that don't work anymore. | 12:13:18 |
Lasering#6803 | That is a very good idea. Gonna give it a try. Thanks! | 13:39:51 |