-
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
Caching for Osgi-bundles. #6
Conversation
…nifest, properties, etc of the bundle has changed.
I don't understand why this is necessary, because – at least by default – a bundle is only created when running |
My project must run publish-local every time a compile happens due to the way it's set up. Even if I managed to remove the publish-local requirement, it would still require osgi-bundle to be called on 40-45 subprojects each compile. That osgi-bundle step ends up costing me 30-40 seconds per rebuild, no matter if anything has changed. The caching I added reduces our minimum build time from 45s to 15s, so yes it's a pretty necessary speed up for our project. I'm fairly certain it works since my project has been relying on this functionality for every build for about 2 months, but I can try to develop some tests to prove it's safe. |
Caching tasks like this is a good idea. Maybe only |
This PR conflicts significantly with the two other PR's I just merged (which conflicted with each other, but only by 1 line). From looking at the code, the conflict shouldn't be difficult to resolve (you just need to modify your code to account for the 1 character my PR removed, and the half-line the other PR added). Additionally, this change needs unit tests to verify that it works correctly. Please rebase your branch and add some tests. |
I'll get it done. Would a unit test showing the inputs to the bundle function are properly converted to a Set[File] to be fed to FileFunction.cached be fine? |
Good question. The existing unit tests for the plugin are woefully inadequate. Currently, nothing tests the |
I've just submitted issue #11 to try to address this to some degree. |
Maybe on my vacation :) On Sunday, November 17, 2013 09:42:55 AM Richard W. Eggert II wrote:
|
Conflicts: build.sbt src/main/scala/com/typesafe/sbt/osgi/Osgi.scala src/main/scala/com/typesafe/sbt/osgi/SbtOsgi.scala modified: project/plugins.sbt
…ncies to Dependencies.scala
I've fixed the merge conflicts and better documented my code. I can help split up the bundle function soon, cause it's getting really complex. |
Hi, any new on this caching functionality being merged ? Cheers, |
I'm not really familiar enough with the sbt build process to understand the implications of this change to be comfortable with merging this. Maybe Mark or one of the Typesafe guys could take a look at it and verify that's it not going to cause the universe to implode or anything like that? I'm mainly concerned that there may be edge cases where this would prevent the bundle from being rebuilt when it should be. |
I'm very sorry that this has been dropped like this. Truth is, no one has maintained this plugin over the last years. With the Akka team occassionally stepping in to fix bugs that impacted our build... I have to close this, as it's been a number of years, I'm not comfortable merging it, and it is currently conflicting. Please reopen if you'd like to give it another shot though. |
This is a modification I made to your plugin a couple of months back to speed up builds of my project. It makes the bundler regenerate a bundle if and only if the following have changed:
If the bundle doesn't exist it will be generated no matter what.