apache / daffodil-sbt

Apache Daffodil SBT Plugin
https://daffodil.apache.org/
Apache License 2.0
1 stars 3 forks source link

Get JVM options from packageDaffodilBin/javaOptions instead of environment variables #52

Closed stevedlawrence closed 1 month ago

stevedlawrence commented 1 month ago

Some schema are so large and complex that they need to specify additional JVM options to increase memory/stack size when forking the DaffodilSaver to compile and save processors using packageDaffodilBin task. The plugin already supports this by incorporating options from DAFFODIL_JAVA_OPTS or JAVA_OPTS, but that causes projects to rely on often undocumented memory requirements or environment settings. This can make it difficult to compile schemas if you don't know what settings are needed, or could lead to unexpected errors if invalid values are added to environment variables. This is fragile and probably not something we should support.

To fix this, this removes support for DAFFODIL_JAVA_OPTS and JAVA_OPTS, and instead gets additional JVM options from the packageDaffodilBin/javaOptions SBT setting. This way any additional JVM options must be specified and documented in build.sbt and should work anywhere without the need to configure the environment.

Closes #51