-
Notifications
You must be signed in to change notification settings - Fork 213
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
Incremental builds #345
Comments
Without having the knowledge of the actual inputs for each plugin, I don' think there's any safe way to say that a plugin (or even module) can be safely skipped. When optimizing the camel build time, I made sure that each plugin we were using could do a quick check and bypass the execution if the input had not changed. I'm working on a Test Impact Analysis tool for maven so that the build could skip the tests that aren't affected by changes. It's still a prototype currently: https://github.com/mvndaemon/mvntia |
I was thinking of simply adding some timestamp of the last build to the target directory and then skipping a rebuild of an entire module if nothing has changed in places other than target (maybe also IDE settings?) |
@michalszynkiewicz I'm not sure storing the timestamp in each build is a good idea |
While working with Quarkus, I often modify multiple modules. It's a big project and I want a fast feedback loop so I usually handwrite a command like I started thinking of writing a small tool/shell that would figure out the list of modules for me automatically. |
@michalszynkiewicz No, I definitely agree something has to be done. Until maven supports it, I agree it could be done in mvnd, but I'd rather do it the same way than maven: analyse the output, store the list of failed/skipped projects into a |
@gnodet : Isn't there a difference between an incremental build and resuming a build? For me, when I say "incremental" I normally mean only building modules that have been changed, not just resuming from a failure. |
@jjlharrison yes, there's a difference, but I think the workflow described by @michalszynkiewicz is more a resume than incremental |
Modifying a parent pom is indeed an example of a non-trivial change that should cause a rebuild. In my experience BOM or parent pom changes are much less frequent than code changes that I'd like to test, so ignoring them for now (so that one has to do a full rebuild in this case) would be an acceptable start. |
@gnodet: Yes, I understand that it is very complex and there can even be external dependencies that might change to affect things. If there were a true incremental option, it would need some major caveats and the user would need to be responsible for knowing when they can use that option. I imagine it would be a lot of work to support as well. |
To be clear, I did experiment a bit with the takari lifecycle https://github.com/takari/takari-lifecycle which provides a real incremental replacement of the core maven. However, my experiments were not really conclusive, especially if you have an existing build which is quite complex with non basic plugins. At the end, I optimised all the plugins that were used so that they can be really fast if nothing has changed (basically, doing incremental build at the plugin level). This is much easier than implementing a truly increment build for maven.
|
Don't want to lure anyone away from (In fact, there is some WIP to integrate it into the Quarkus build setup: quarkusio/quarkus#13243) |
I'm going to close this issue. I'm not opposed to an incremental build, but it should be evaluated in the light of https://github.com/takari/takari-lifecycle, the https://github.com/vackosar/gitflow-incremental-builder. Also, it would be better as a separate maven extension, which could be hosted in this organisation if the existing ones are not satisfying (provided they can't be easily enhanced). |
It would be great if
mvnd
had an option to rebuild only the modules that have been modified since they were last built successfully.@gnodet, @ppalaga mentioned that you may be already looking into it.
If not, I might be interested in implementing it (if I have time ;) )
The text was updated successfully, but these errors were encountered: