Skip to content

[projmgr] Accept listing same component multiple times in clayers#2441

Merged
brondani merged 1 commit intomainfrom
projmgr-accept-same-component-layers
Apr 17, 2026
Merged

[projmgr] Accept listing same component multiple times in clayers#2441
brondani merged 1 commit intomainfrom
projmgr-accept-same-component-layers

Conversation

@brondani
Copy link
Copy Markdown
Collaborator

@brondani brondani commented Apr 16, 2026

Fixes

Changes

  • Tolerates component being listed multiple times in clayers (set a warning instead of error in this case)
  • Update test case

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates projmgr’s component conflict handling so that duplicate component listings coming from c-layers no longer fail processing, aligning with the need to tolerate repeated component references during layer-based conversions.

Changes:

  • Downgrade “duplicate component” conflicts to warnings when duplicates originate from clayers (while keeping cproject duplicates as errors).
  • Extend ProjMgrWorker::AddComponent with an ignoreDuplicates flag and use it for clayer-sourced components.
  • Update the unit test to validate the new error vs warning behavior across the two contexts.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tools/projmgr/src/ProjMgrWorker.cpp Adds ignoreDuplicates handling for clayer component addition and logs a warning instead of failing on duplicates.
tools/projmgr/include/ProjMgrWorker.h Updates AddComponent signature to include ignoreDuplicates (defaulting to false).
tools/projmgr/test/src/ProjMgrUnitTests.cpp Adjusts DuplicateComponents test expectations: cproject duplicates still error, clayer duplicates now warn and succeed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/projmgr/src/ProjMgrWorker.cpp
@github-actions
Copy link
Copy Markdown

Test Results

    3 files     21 suites   14m 56s ⏱️
  456 tests   456 ✅ 0 💤 0 ❌
1 368 runs  1 368 ✅ 0 💤 0 ❌

Results for commit a8143f3.

Comment thread tools/projmgr/src/ProjMgrWorker.cpp Dismissed
@brondani brondani marked this pull request as ready for review April 16, 2026 10:54
@brondani brondani requested a review from edriouk April 16, 2026 10:55
Copy link
Copy Markdown
Contributor

@edriouk edriouk left a comment

Choose a reason for hiding this comment

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

LGTM

@brondani brondani merged commit 741d013 into main Apr 17, 2026
36 of 37 checks passed
@brondani brondani deleted the projmgr-accept-same-component-layers branch April 17, 2026 14:13
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 64.75%. Comparing base (c2e5f7d) to head (a8143f3).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
tools/projmgr/src/ProjMgrWorker.cpp 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2441      +/-   ##
==========================================
- Coverage   64.75%   64.75%   -0.01%     
==========================================
  Files         145      145              
  Lines       26168    26171       +3     
  Branches    15799    15801       +2     
==========================================
  Hits        16946    16946              
- Misses       7066     7068       +2     
- Partials     2156     2157       +1     
Flag Coverage Δ
projmgr-cov 87.74% <80.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tools/projmgr/include/ProjMgrWorker.h 83.33% <ø> (ø)
tools/projmgr/src/ProjMgrWorker.cpp 88.13% <80.00%> (-0.08%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

4 participants