Allow sharing of cargo target directory between builds#71
Open
Allow sharing of cargo target directory between builds#71
Conversation
This flag will cause all colcon-cargo invocations of the 'cargo' executable to use a shared target directory, thereby sharing build artifacts between builds. I don't yet understand all of the nuances of this change and what dragons be yet lurking, so for now the change is hidden behind the colcon feature flag 'shared_cargo_target_dir'.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #71 +/- ##
==========================================
- Coverage 72.46% 71.63% -0.84%
==========================================
Files 9 9
Lines 345 349 +4
Branches 60 62 +2
==========================================
Hits 250 250
- Misses 61 64 +3
- Partials 34 35 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Blast545
approved these changes
Mar 2, 2026
Contributor
|
@cottsay doesn't this break the assumption that package builds are isolated? e.g. if we build them in a chroot a la Debian. Not actually against it, but it'd be good to document it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This flag will cause all colcon-cargo invocations of the 'cargo' executable to use a shared target directory, thereby sharing build artifacts between builds.
I don't yet understand all of the nuances of this change and what dragons be yet lurking, so for now the change is hidden behind the colcon feature flag 'shared_cargo_target_dir'.
To avoid breaking the
_build_cmdand_install_cmdsignatures withcolcon-ros-cargo, I saved the build directory as an attribute. We may need to untangle that relationship in the future.