-
Notifications
You must be signed in to change notification settings - Fork 43
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
Implement a cache based on hashing of the inputs of bundleTask #100
Conversation
…and has been produced using identical inputs
Please do not merge yet. I am going to implement alternative cache strategy based on hash or on lastModified... |
@romainreuillon Is this PR being worked on? |
Hi @mdedetrich, it is actually complete. There are 2 caching modes: modification time based or hash based. I'll implement an hybrid mode, checking modification time and then hash at some point but it requires way more work. I'll do that in a new PR. This one is ready to merge. |
@romainreuillon Released as |
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.
Thanks for the great work, leave some compatibility suggestions.
import _root_.java.nio.file._ | ||
import _root_.scala.collection.JavaConverters._ | ||
val path = tmpArtifactDirectoryPath.toPath | ||
Files.walk(path).iterator.asScala.map(f => f.toFile -> path.relativize(f).toString).filterNot { case (_, p) => p == "META-INF/MANIFEST.MF" }.toTraversable |
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.
@mdedetrich This "META-INF/MANIFEST.MF"
maybe cause an issue on Windows.
could you change to this like #115 does?
Files.walk(path).iterator.asScala.map(f => f.toFile -> path.relativize(f))
.collect { case (f, p) if p != (file("META-INF") / "MANIFEST.MF").toPath => (f, p.toString) }
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.
NVM, I walked into the wrong CR path, this is an outdated comment.
In case no file and no settings have been modified and the bundle exist do no generate it.
Add an opt-in key to avoid breaking things...
It solves #27