Skip to content

[projmgr] Improve duplicate components in cproject/clayer.yml#2396

Merged
brondani merged 6 commits into
Open-CMSIS-Pack:mainfrom
jthuangarm:csolution-duplicated-components
Mar 16, 2026
Merged

[projmgr] Improve duplicate components in cproject/clayer.yml#2396
brondani merged 6 commits into
Open-CMSIS-Pack:mainfrom
jthuangarm:csolution-duplicated-components

Conversation

@jthuangarm

@jthuangarm jthuangarm commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

Fix for #1197

  • As the error message from YmlSchemaChecker is triggered before the error message from AddComponent() in ProjMgrWorker.cpp, remove the uniqueItems constraint from ComponentsType in common.schema.json. This enables duplicate components to be handled explicitly in the code, resulting in a more detailed message.

  • Added a new unit test (DuplicateComponents) in ProjMgrUnitTests.cpp. Two use cases with and without --no-check-schema:

    • duplicateComponents_cproject: duplicate components in the same YAML file (both in cproject.yml)
    • duplicateComponents_clayer: duplicate components in the different YAML files (one in cproject.yml, the other in clayer.yml)

@jthuangarm jthuangarm marked this pull request as draft March 13, 2026 14:57
@github-actions

github-actions Bot commented Mar 13, 2026

Copy link
Copy Markdown

Test Results

    3 files     21 suites   16m 34s ⏱️
  452 tests   452 ✅ 0 💤 0 ❌
1 356 runs  1 356 ✅ 0 💤 0 ❌

Results for commit 463e19d.

♻️ This comment has been updated with latest results.

@jthuangarm jthuangarm force-pushed the csolution-duplicated-components branch from f2fa330 to 8b5da3f Compare March 13, 2026 16:00
@jthuangarm jthuangarm marked this pull request as ready for review March 16, 2026 08:22
@brondani brondani self-requested a review March 16, 2026 08:41
Comment thread tools/projmgr/test/src/ProjMgrUnitTests.cpp

@brondani brondani left a comment

Copy link
Copy Markdown
Collaborator

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 c779cb3 into Open-CMSIS-Pack:main Mar 16, 2026
32 of 33 checks passed
@codecov

codecov Bot commented Mar 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.64%. Comparing base (214348b) to head (463e19d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2396      +/-   ##
==========================================
- Coverage   64.66%   64.64%   -0.03%     
==========================================
  Files         145      145              
  Lines       26097    26093       -4     
  Branches    15747    15743       -4     
==========================================
- Hits        16876    16868       -8     
+ Misses       7069     7065       -4     
- Partials     2152     2160       +8     
Flag Coverage Δ
projmgr-cov 87.71% <100.00%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
tools/projmgr/src/ProjMgrWorker.cpp 88.03% <100.00%> (+0.05%) ⬆️

... and 3 files with indirect coverage changes

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

@jthuangarm jthuangarm deleted the csolution-duplicated-components branch March 16, 2026 09:34
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.

2 participants