sbt / sbt-launcher-package

Packaging for sbt so you can run it.
http://scala-sbt.org/download.html
Apache License 2.0
89 stars 92 forks source link

Fix #5181 - add -Xss to java_options ignore #346

Closed ericdotdata closed 3 years ago

ericdotdata commented 3 years ago

Fixes https://github.com/sbt/sbt/issues/5181

before

> cat .jvmopts
cat .jvmopts
-Dfile.encoding=UTF8
-Xms1G
-Xmx5G
-Xss6M
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC

❯ sbt -d -mem 5632 'testOnly foo'
[addSbt] arg = '-debug'
[addMemory] arg = '5632'
[addJava] arg = '-Xms5632m'
[addJava] arg = '-Xmx5632m'
[addJava] arg = '-Xss4M'
[addJava] arg = '-XX:ReservedCodeCacheSize=512m'
...
# Executing command line:
java
-Dfile.encoding=UTF8
-Xss6M
-XX:+UseG1GC
-Xms5632m
-Xmx5632m
-Xss4M
-XX:ReservedCodeCacheSize=512m
-jar
/Users/eric/.sdkman/candidates/sbt/1.4.6/bin/sbt-launch.jar
-debug

after

❯ cat .jvmopts
-Dfile.encoding=UTF8
-Xms1G
-Xmx5G
-Xss6M
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC
❯ sbt -d -mem 5632 'testOnly foo'
[addSbt] arg = '-debug'
[addMemory] arg = '5632'
[addJava] arg = '-Xms5632m'
[addJava] arg = '-Xmx5632m'
[addJava] arg = '-Xss4M'
[addJava] arg = '-XX:ReservedCodeCacheSize=512m'
...
# Executing command line:
java
-Dfile.encoding=UTF8
-XX:+UseG1GC
-Xms5632m
-Xmx5632m
-Xss4M
-XX:ReservedCodeCacheSize=512m
-jar
/Users/eric/.sdkman/candidates/sbt/1.4.6/bin/sbt-launch.jar
-debug
ericdotdata commented 3 years ago

@eed3si9n just added the sbt.bat for windows changes

ericdotdata commented 3 years ago

@eed3si9n shit I missed something in the windows.bat converting to draft and I'll see about adding tests

ericdotdata commented 3 years ago

@eed3si9n back to active PR & CI passing, LMKWYT about the test refactoring

eed3si9n commented 3 years ago

@ericdotdata I'm 👍 on test refactoring.