Skip to content

Improve component selection diagnostic output - #2616

Draft
edriouk wants to merge 8 commits into
mainfrom
fix/2543
Draft

edriouk wants to merge 8 commits into
mainfrom
fix/2543

Conversation

@edriouk

@edriouk edriouk commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes

Changes

  • removed quotes surrounding condition expression
  • removed 'failed' before condition expression
  • for SELECTABLE and CONFLICT state display component description
  • remove 'selection' word

Examples:

  1. Unresolved dependencies
NetworkEx.cproject.yaml - warning csolution: dependency validation for context context 'NetworkEx.Release+Device' failed:
component: Keil::Network&MDK-Pro:Socket:TCP : Unresolved dependencies
  accept Network&MDK-Pro:CORE' : Select a component
    - component: Keil::Network&MDK-Pro # IPv4/IPv6 Networking Core for Cortex-M
  require Network:Interface : Select a component
    - component: Keil::Network&MDK-Pro:Interface:ETH # Network Ethernet Interface
    - component: Keil::Network&MDK-Pro:Interface:PPP # Network PPP over Serial Interface
    - component: Keil::Network&MDK-Pro:Interface:SLIP# Network SLIP Interface
  1. Conflicting exclusive components
Test/Validation/dependencies.csolution.yml - warning csolution: dependency validation for context 'conflict+CM0' failed:
API RteTest:ApiExclusive@1.0.0 : Conflict, select exactly one
  - component ARM::RteTest:ApiExclusive:S1 # RteTest Exclusive API component S1
  - component ARM::RteTest:ApiExclusive:S2 # RteTest Exclusive API component S2
  1. Incompatible components
Test/Validation/dependencies.csolution.yml - warning csolution: dependency validation for context 'incompatible+CM0' failed:
component ARM::RteTest:Check:Incompatible@0.9.9 : Incompatible dependency
  deny RteTest:Dependency:Incompatible_component : Select a compatible component
    - component ARM::RteTest:Dependency:Incompatible_component # incompatible
  1. Incompatible component variant
Test/Validation/dependencies.csolution.yml - warning csolution: dependency validation for context 'incompatible-variant+CM0' failed:
component ARM::RteTest:Check:IncompatibleVariant@0.9.9 : Incompatible dependency
  require RteTest:Dependency:Variant&Compatible : Select a compatible variant
    - component ARM::RteTest:Dependency:Variant # incompatible variant
  1. Missing component
Test/Validation/dependencies.csolution.yml - warning csolution: dependency validation for context 'missing+CM0' failed:
component ARM::RteTest:Check:Missing@0.9.9 : Unresolved dependencies
  require RteTest:Dependency:Missing : Install missing component

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).

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Test Results

  2 files   14 suites   14m 6s ⏱️
482 tests 482 ✅ 0 💤 0 ❌
964 runs  964 ✅ 0 💤 0 ❌

Results for commit 30949a6.

♻️ This comment has been updated with latest results.

@edriouk
edriouk marked this pull request as ready for review September 16, 2026 12:30
@brondani
brondani requested a lite review from Copilot September 16, 2026 12:32

Copilot AI 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.

🟡 Changes recommended

Unresolved diagnostic formatting and RPC description-propagation issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Improves component dependency diagnostics by simplifying wording and adding component descriptions.

Changes:

  • Captures descriptions for selectable and conflicting components.
  • Updates diagnostic wording and expected tests.
  • Adapts RPC aggregate handling.
File summaries
File Summary
tools/projmgr/test/src/ProjMgrUnitTests.cpp Updates diagnostic output expectations.
tools/projmgr/src/ProjMgrWorker.cpp Formats enhanced diagnostics; YAML component syntax and empty-description handling need correction.
tools/projmgr/src/ProjMgrRpcServer.cpp Adapts aggregate data; description propagation and the aggrehateIds identifier need correction.
tools/projmgr/include/ProjMgrWorker.h Updates aggregate storage to include descriptions.
libs/rtemodel/src/RteCondition.cpp Revises dependency explanation wording.
libs/rtemodel/include/RteCondition.h Updates the explanation API.
Review details

Suppressed comments (3)

tools/projmgr/src/ProjMgrRpcServer.cpp:752

  • This newly introduced local repeats the aggrehateIds typo; use aggregateIds here as well.
            auto aggrehateIds = key_set(condition.aggregates);

tools/projmgr/src/ProjMgrRpcServer.cpp:743

  • The formatter now relies on the map value to emit the PDSC description, but this conversion immediately discards every value and sends only IDs through ValidateComponents. As a result, the RPC/Components and Problems consumers cannot reproduce the new # <description> diagnostics (or the shared message text), so the terminal and RPC output remain unsynchronized as required by issue #2543; carry the description/message data through the RPC contract and update its consumers/tests.
        auto aggrehateIds = key_set(validation.aggregates);
        r.aggregates = vector<string>(aggrehateIds.begin(), aggrehateIds.end());

tools/projmgr/src/ProjMgrWorker.cpp:4808

  • This output is not pasteable into a .cproject.yml: component entries use the component: mapping key (see ProjMgrYamlParser::ParseComponents), but this emits - component <id>. Copying the suggested line therefore produces a scalar entry that ParseString(..., YAML_COMPONENT, ...) does not read. Emit - component: <id> # <description> and update the expected diagnostic accordingly.
    ss << "- component " <<  id << " # "  << RteDependencyResult::GetAggregateExplanationText(result, desc);
  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/projmgr/src/ProjMgrRpcServer.cpp Outdated
Comment thread tools/projmgr/src/ProjMgrWorker.cpp Outdated
edriouk and others added 3 commits September 16, 2026 14:45
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@edriouk
edriouk requested a review from jkrech September 16, 2026 13:05
@edriouk
edriouk marked this pull request as draft September 16, 2026 14:36
@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.39%. Comparing base (3c16c5c) to head (30949a6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tools/projmgr/src/ProjMgrWorker.cpp 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2616      +/-   ##
==========================================
- Coverage   78.68%   71.39%   -7.29%     
==========================================
  Files         197      185      -12     
  Lines       32778    29304    -3474     
  Branches    19152    17361    -1791     
==========================================
- Hits        25790    20923    -4867     
- Misses       4662     6072    +1410     
+ Partials     2326     2309      -17     
Flag Coverage Δ
buildmgr-cov 79.71% <ø> (ø)
packchk-cov 69.85% <ø> (ø)
projmgr-cov 87.96% <92.30%> (-0.01%) ⬇️

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.87% <ø> (ø)
tools/projmgr/src/ProjMgrRpcServer.cpp 85.89% <100.00%> (+0.04%) ⬆️
tools/projmgr/src/ProjMgrWorker.cpp 87.43% <88.88%> (-0.02%) ⬇️

... and 75 files with indirect coverage changes

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

This branch has not been deployed

No deployments
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