-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add verb for tracking and staging source changes in workspace #44
Conversation
Signed-off-by: ruffsl <[email protected]>
There may be room for optimization, but it's not too slow currently. Using |
My previous comment from #25 still applied to this proof of concept: I don't think it is a good / convenient interface for user to manually having to invoke |
I'm guessing you're referring to this:
I was operating under the use case where the user wants to carefully control and mark which package with recent changes should be tared. Using a top level verb also allows users to use the same package selection features for other criteria, e.g. tare changes for all packages now with passing builds and tests, and that are above some package I'm done working on, e.g:
Edit: those select build and test passed arguments don't exist, so expressing this kind of selection set could be cumbersome. With the single return code value file, I'm not sure how to denote if a build for the latest changes was successful vs. tests with the latest changes was successful. By having it as a verb + package select queries, the user can decide when to tare package changes for subsequent commands to filter on. Do you have a recommendation on how the build or test verbs could be extended to tare package changes upon success automatically? Is that something a E.g. a successful build for a changed package would mark the package as |
It just feels to me if the user has to do all this manually the gain isn't very high over just explicitly specifying the packages directly. Maybe I have unreasonable expectations.
Yes, an event handler could be used to trigger behavior based on return codes of executed jobs. E.g. all console output showing successful / failed packages is generated by event handlers using those return codes.
Maybe this page helps: https://colcon.readthedocs.io/en/released/developer/extension-point.html
https://colcon.readthedocs.io/en/released/developer/program-flow.html unfortunately doesn't go into enough detail which extension points are ultimately used for a specific job 😒 |
Hmm, I will look into how to use event handlers to stage a package's source tree changes after successful builds and tests, but I'm still not sure how then to name/structure the package selection arguments to reflect such previous events. How about:
An issue of this use pattern is that computing the hashdir for packages would have to be done when computing the set of selected packages at runtime, rather than just reading the return code a dedicated |
Oh! Ok, I think I have a complete use pattern
This way, the user can still control when the staging/hashdir for a package is ratcheted forward, but the build/test verb's also automatically update what is needed for package selection upon verb success. |
@tylerjw , with #44 (comment) I think I have a better use pattern for this colcon staging idea, but not sure if it yet covers the use case you had with |
Closing in favor of ruffsl/colcon-cache#12 . |
Fixs #25
This seeks to add a new verb for tracking source file changes in a workspace using dirhash by staging checksums of each package directory. This ignores all dot files and dot folders and also includes new package select arguments.
Example
TODO:
.gitignore
Related: