-
Notifications
You must be signed in to change notification settings - Fork 223
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
Assembly no longer creating directories defined in assemblyOutputPath #486
Comments
Stack trace seems to point here: Stack Trace seems to point here: https://github.com/sbt/sbt-assembly/blame/v2.0.0/src/main/scala/sbtassembly/Assembly.scala#L67 Perhaps its not a "not creating directories" issue, but perhaps the refactor introduced a dependency on these paths prior to the jar creation. |
I have the same issue about creating not yet existing directory when setting the custom output path with Our ESMeta project uses addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.0") and the assembly / assemblyOutputPath := file("bin/esmeta") It throws a
I think it is related to the directory creation because it works well after manually creating the |
Same here, and sbt-assembly 1.2.0 is able to create the directory by itself. |
I believe this was introduced with ZipFileSystem usage (in memory processing).
Because newFileSystem of ZipFileSystemProvider doesn't create paths https://github.com/openjdk/jdk/blob/21867c929a2f2c961148f2cd1e79d672ac278d27/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java#L95 and ZipFileSystem itself just tries to open FileOutputStream https://github.com/openjdk/jdk/blob/21867c929a2f2c961148f2cd1e79d672ac278d27/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java#L162 which will not create the parent directories. I will try to compose PR later on. |
Hello -
So I have a plugin that I have for managing my project's docker image, which uses sbt-assembly. I set the assemblyOutputPath to a different value, here:
https://github.com/etspaceman/kinesis-mock/blob/main/project/DockerImagePlugin.scala#L59
However, with the upgrade to 2.0.0 I've been getting errors like this:
[error] java.nio.file.NoSuchFileException: /home/runner/work/kinesis-mock/kinesis-mock/docker/image/lib/kinesis-mock.jar
etspaceman/kinesis-mock#362
https://github.com/etspaceman/kinesis-mock/actions/runs/3322302608/jobs/5491131628
I was able to resolve this by creating the path docker/image/lib. If the path doesn't exist, the error is thrown. So basically, sbt-asembly isn't creating the directory structure like I'd expect anymore.
Is there a good way around this? Ideally i'd like to have the command itself have the old behavior. Any way i can do that in the plugin? And does anyone have context as to why this may have changed?
The text was updated successfully, but these errors were encountered: