-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sbt-paradox docs #139
Add sbt-paradox docs #139
Conversation
Pull Request Test Coverage Report for Build 1962932619
💛 - Coveralls |
@@ -0,0 +1,3 @@ | |||
-XX:+IgnoreUnrecognizedVMOptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need -XX:+IgnoreUnrecognizedVMOptions
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that file some options only apply to specific versions of JVM and by default if you pass an option into the JVM that doesn't exist it will immediately terminate. --illegal-access=permit
only works on JVM 16 and --add-opens java.base/java.lang=ALL-UNNAMED
only works on JVM 17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we could do better?
- provide a runnable script which properly assemble command line options
- adopt https://www.elastic.co/guide/en/elasticsearch/reference/current/advanced-configuration.html#jvm-options-syntax
Why I am concerned: we should not silence invalid JVM command line options / flags, the users should be aware of any mismatches here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought of this originally but the issue here is the typical way/s that SBT is used. For example a lot of people (myself included) use Intellij's SBT integration when working with Scala projects. When using sbt like this the only possible way to pass JVM arguments is with .jvmopts
since Intellij behind the scenes uses the sbt directly via a jar for its integration. The same applies to the official sbt launcher script which is included when you install sbt via your operating systems package manager (homebrew, apt, pacman etc etc).
Ideally sbt should have support for dynamically supporting different JVM options depending the JVM option but this doesn't exist yet. Note the complication here is that the JVM args are designed for the build tool, not the runtime of the project that gets compiled. Its trivial for SBT to support different JVM arguments when you run tests/programs compiled by SBT (sbt supports forking the JVM with different JVM args when running tests) but in this case the JVM arguments are actually needed for the build tool itself (the document generation is done via a SBT plugin)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 all set!
About this change - What it does
This PR adds documentation using sbt-paradox
Resolves: #50 , #28 , #19
Why this way
The PR does quite a few changes many of which is already documented in the docs which this PR providers. Here are some additional notes
-XX:+IgnoreUnrecognizedVMOptions
doesn't work fully in JDK 8 and using-XX:+IgnoreUnrecognizedVMOptions
is the only way to make sbt-paradox work with multiple JDK versions