Skip to content

Allow specification of additional packages in workspaces - #66

Merged
mxgrey merged 1 commit into
mainfrom
cottsay/additional-members
Oct 21, 2025
Merged

Allow specification of additional packages in workspaces#66
mxgrey merged 1 commit into
mainfrom
cottsay/additional-members

Conversation

@cottsay

@cottsay cottsay commented Sep 18, 2025

Copy link
Copy Markdown
Member

When cargo itself encounters a workspace, it inspects member directories for crates and does not search any other subdirectories of the workspace. The workspace support in colcon behaves the same.

It may be desirable to include additional packages in colcon's discovery which are not members of the workspace. This change adds a metadata value at workspace.metadata.colcon.additional-packages which behaves similarly to workspace.members so that packages under those paths are discovered by colcon. The packages need not be cargo packages themselves but if they are, they will not be treated as cargo workspace members but rather as independent packages.

Closes #63

When cargo itself encounters a workspace, it inspects member directories
for crates and does not search any other subdirectories of the workspace
for packages. The workspace support in colcon behaves the same.

It may be desirable to include additional packages in colcon's discovery
which are not members of the workspace. This change adds a metadata
value at `workspace.metadata.colcon.additional-packages` which behaves
similarly to `workspace.members` so that packages under those paths are
discovered by colcon. The packages need not be cargo packages themselves
but if they are, they will not be treated as cargo workspace members but
rather as independent packages.
@cottsay
cottsay requested review from esteve and mxgrey September 18, 2025 23:46
@cottsay cottsay self-assigned this Sep 18, 2025
@codecov-commenter

codecov-commenter commented Sep 18, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.46%. Comparing base (ec2b28b) to head (9d6e7d3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
+ Coverage   72.22%   72.46%   +0.24%     
==========================================
  Files           9        9              
  Lines         342      345       +3     
  Branches       59       60       +1     
==========================================
+ Hits          247      250       +3     
  Misses         61       61              
  Partials       34       34              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mxgrey mxgrey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've tested this out with a cargo package that had a nested cmake package in it. Everything worked as expected. Thanks, @cottsay !

I'll merge this by the end of next week unless @esteve wants more time to look at it.

@mxgrey
mxgrey merged commit 4c4d526 into main Oct 21, 2025
19 checks passed
@mxgrey
mxgrey deleted the cottsay/additional-members branch October 21, 2025 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: package discovery nested cmake project

3 participants