Skip to content
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

Demote package override error to a warning #466

Merged
merged 2 commits into from
Dec 23, 2021

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Dec 23, 2021

Overriding packages in underlay workspaces appears to be more common than originally believed, so it's a good idea to let the dust settle as a warning rather than breaking builds at this point.

Overriding packages in underlay workspaces appears to be more common
than originally believed, so it's a good idea to let the dust settle as
a warning rather than breaking builds at this point.
@cottsay cottsay self-assigned this Dec 23, 2021
@codecov
Copy link

codecov bot commented Dec 23, 2021

Codecov Report

Merging #466 (a165214) into master (29303fb) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #466   +/-   ##
=======================================
  Coverage   80.81%   80.81%           
=======================================
  Files          59       59           
  Lines        3518     3518           
  Branches      668      668           
=======================================
  Hits         2843     2843           
  Misses        630      630           
  Partials       45       45           
Impacted Files Coverage Δ
colcon_core/verb/build.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29303fb...a165214. Read the comment docs.

@cottsay
Copy link
Member Author

cottsay commented Dec 23, 2021

Example invocation:

$ . /home/cottsay/colcon/install/setup.bash
$ colcon build --merge --packages-select colcon-core
[0.758s] colcon.colcon_core.verb WARNING Some selected packages are already built in one or more underlay workspaces:
	'colcon-core' is in: /home/cottsay/colcon/install
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
	--allow-overriding colcon-core

This will be promoted to an error in a future release of colcon-core.
Starting >>> colcon-core
Finished <<< colcon-core [0.76s]          

Summary: 1 package finished [1.15s]

Copy link
Contributor

@sloretz sloretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM while we investigate the fallout

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the fact that this should fix our infrastructure, I think that in general it is a good idea to make this a "soft" transition. That's mostly to see what everyone's reaction to this is. By making it a warning, we can gauge how many people complain about it and then revisit making it a hard error later on.

Additionally, I think it might be a good idea to put a page on https://docs.ros.org colcon docs explaining exactly how overlays can go wrong, and possible workarounds. Then we can link to that page from this warning.

@sloretz What do you think?

Co-authored-by: Chris Lalancette <[email protected]>
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.

@sloretz
Copy link
Contributor

sloretz commented Dec 23, 2021

Additionally, I think it might be a good idea to put a page on https://docs.ros.org colcon docs explaining exactly how overlays can go wrong, and possible workarounds.

Yeah, documentation on about overlays can go wrong definitely needs to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants