3 Dec 2023 |
aly.fish | Idk anything about .jvmopts (´・ω・`) | 22:31:52 |
aly.fish | 1. does it work with an empty jvmopts? 2. does it work with no jvmopts? | 22:35:23 |
sethtisue | the problem doesn't reproduce for me. I'm on MacOS fwiw
% mkdir 20231203
% cd 20231203
% echo '--add-exports java.base/sun.nio.ch=ALL-UNNAMED' > .jvmopts
% sbt
[warn] No sbt.version set in project/build.properties, base directory: /Users/tisue/tmp/20231203
[info] welcome to sbt 1.9.7 (Eclipse Adoptium Java 17.0.9)
[info] set current project to root-20231203 (in build file:/Users/tisue/tmp/20231203/)
[info] sbt server started at local:///Users/tisue/.sbt/1.0/server/aa3dab4deffbb8fc9293/sock
[info] started sbt server
sbt:root-20231203> | 22:36:48 |
kamilk9525 | yes, sbt witj empty .jvmoptions works, but the app does not | 22:37:40 |
sethtisue | sbt is just a script — on Windows, a batch file (sbt.bat ) you could look at it and see for yourself how it's handling .jvmopts | 22:38:16 |
sethtisue | .jvmopts handling has to be in the script, because by the time a JVM is running, it's too late to control its options | 22:38:50 |
aly.fish | Does your project directory path have any spaces in it? | 22:39:50 |
aly.fish | I.e. C:\Users\space here\blah\.jvmopts | 22:40:05 |
sethtisue | possibly related, or not: https://github.com/sbt/sbt/issues/5425 | 22:40:17 |
kamilk9525 | no, nothing like that | 22:40:28 |
aly.fish | Yeah idk anything about the SBT MSI installer :( I wonder if the same thing happens with Coursier | 22:42:14 |
yoshord | I just tried a few things, and for me (windows; using a coursier-installed sbt), while a .jvmopts file of
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
resulted in sbt refusing to start up with
Error: --add-exports requires modules to be specified
The filename, directory name, or volume label syntax is incorrect.
Error: --add-exports requires modules to be specified
Error: --add-exports requires modules to be specified
Using a .jvmopts with each option on a separate line instead, i.e.
--add-exports
java.base/sun.nio.ch=ALL-UNNAMED
, resulted in sbt starting up normally, although I'm not sure how to check whether the package was actually exported | 22:47:31 |
kamilk9525 | it's sooo frustrating when the single enter blocks you for the few hours | 22:52:12 |
kamilk9525 | Thank you a lot yoshord and thank you All guys!! | 22:52:50 |
aly.fish | grrr I thought of the newline thing, I should've said it 😩 | 22:53:46 |
| ergomorphic joined the room. | 23:12:23 |
4 Dec 2023 |
| zackf8020 joined the room. | 02:52:46 |
| larios.eduardo joined the room. | 03:00:46 |
| javadocmd joined the room. | 07:40:37 |
| shardulc | 09:01:50 |
| bradleywave joined the room. | 12:03:42 |
| laderlappen7409 joined the room. | 12:24:07 |
sherpal | Not sure it's very sbt-ish as a request, but I need to depend on the library scalastyle, while my project is in Scala 3, and I have this:
[error] Modules were resolved with conflicting cross-version suffixes in ProjectRef(uri("file:..."), "..."):
[error] org.scala-lang.modules:scala-xml _2.13, _3
[error] stack trace is suppressed; run last update for the full output
[error] (update) Conflicting cross-version suffixes in: org.scala-lang.modules:scala-xml
This is how it's imported:
("com.beautiful-scala" %% "scalastyle" % scalastyleVersion excludeAll (
ExclusionRule(organization = "org.scala-lang", name = "scala-library"),
ExclusionRule(organization = "org.scala-lang.modules", name = "scala-xml"),
)).cross(CrossVersion.for3Use2_13),
any way to fix this? 🙏 🤞 | 14:04:49 |
velvetbaldmime | hm, I always thought you have to fully qualify module name in exclusion rules - e.g. scala-xml_2.13 | 14:10:04 |
velvetbaldmime | you can even just do it with shorthand exclude : https://sourcegraph.com/github.com/wartremover/wartremover@4ea57facdce7a0257621bad5a3ad5c459e1fc663/-/blob/build.sbt?L256 | 14:10:54 |
sherpal | ah! it worked | 14:11:56 |
sherpal | thanks! | 14:12:05 |
| dixine joined the room. | 15:46:50 |
| davis z changed their display name from davis z#5561 to davis z. | 17:04:15 |
| nicu.soare joined the room. | 22:56:25 |