-
Notifications
You must be signed in to change notification settings - Fork 436
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
Custom options for XZ Tarball not working #1426
Comments
Hi @dEajL3kA Thanks for your issue. I can't reproduce this with simple enablePlugins(JavaAppPackaging)
Universal / packageXzTarball / universalArchiveOptions := Seq("-3") The command line says:
Can you share an example project that fails for you? |
This comment has been minimized.
This comment has been minimized.
I am working on a project based on Play Framework that uses SBT as build system. In the
Running Note that xz with option (The build process failed for me several times because the OOM killer ended up killing my processes) Please see here: |
I looked closer at the code and I wasn't aware the the "archive" and "compression" phase are separated. The sbt-native-packager/src/main/scala/com/typesafe/sbt/packager/universal/Archives.scala Line 274 in 6583d70
sbt-native-packager/src/main/scala/com/typesafe/sbt/packager/universal/Archives.scala Line 281 in 6583d70
So what we actually need is a val universalCompressorOptions =
SettingKey[Seq[String]]("universal-compressor-options", "Options passed to the compression command. Scope by task") So that a user can configure Universal / universalCompressionOptions / packageXzTarball := Seq("-3") |
I see. Makes a lot of sense why setting the (This wasn't clear to me from the docs. Only by looking at the source codes I found that xz compressor options are hard-coded)
Yeah, that would be much appreciated 🥳 (Even with this solution, I suggest changing the default from Best regards. |
Release |
Thanks! But how do I actually use that version in my project? |
1.9.2 isn't published for sbt 0.13. You'll need to upgrade to sbt 1.x. (1.5.5 just came out yesterday.) |
Never mind, after migrating to Play Framework 2.8.8 the sbt-native-packager v1.9.2 is working as expected now 🥳 (Still don't know why previous versions of Play Framework apprently used the old version, even though sbt-native-packager v1.9.2 was explicitely set in the |
Expected behaviour
Accoridng to manual it should be possible to set the XZ options to be used by packageXzTarball via:
So I added this to my "build.sbt" file:
Expected behavior:
Intead of the packageXzTarball default XZ options, which are
-9e
(extremely slow!), it should now be using option-3
.Actual behaviour
It is easy to verify, e.g. via htop, that packageXzTarball still is using
xz -9e
, rather than the desiredxz -3
😞This completey locks up my system due to immense memory usage!
It appears that option
universalArchiveOptions in (Universal, packageXzTarball)
is ignored or documentation is wrong.Or am I doing something wrong?
Information
The text was updated successfully, but these errors were encountered: