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.
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
Initial implementation #1
Initial implementation #1
Changes from all commits
9cc8697
465be52
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The way leaf packages are calculated looks fine to me. IIUC leaf packages eliminates the concern about ABI/API incompatibilities in the overridden package, but it doesn't eliminate the include directory search order problem. ros2/ros2#1150 is working to mitigate that for a lot of packages, but colcon doesn't have a way to know if a package has mitigated it. Since it can also lead to undefined behavior at runtime, I would recommend keeping the warning even when overridden packages are leaf packages in the underlay.
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.
I'm concerned that we'd be introducing a warning for what could be a valid workflow without giving the developer any way to resolve it properly, forcing them to suppress it. So even if the underlying packages have mitigated the problem, they'd still have to suppress the warning. That doesn't seem like a very good user experience, and will probably cause developers to simply ignore or disable these warnings because they "can't be fixed."
I think we need to come up with a plan for how to detect or declare "safe" packages before we do that, but I'm open to other thoughts.
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.
That makes sense. Its unfortunate that it means it won't warn in the example that motivated ros2/ros2#1150 https://github.com/jacobperron/overlay_bug_reproduction , but I suppose all the include directory stuff mitigates that.
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.
The fact that it's actually bit us in the wild is a strong case for maintaining some kind of warning for leafy sub-trees like that. I'm having trouble weighing the utility of warning in that case against a boy-who-cried-wolf sort of mentality being established regarding this warning.
Maybe we should disable this part and over-warn until we can come up with a way to detect or declare safe packages? Do we actually have any plans to do that?
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.
I don't think we have any plans. Given the volume of feedback against the first implementation of the warning, I think this PR strikes a good balance.