Skip to content

[csolution-rpc] Extend PackReference with optional locked and missing nodes#2490

Open
brondani wants to merge 3 commits into
mainfrom
projmgr-rpc-extend-pack-reference
Open

[csolution-rpc] Extend PackReference with optional locked and missing nodes#2490
brondani wants to merge 3 commits into
mainfrom
projmgr-rpc-extend-pack-reference

Conversation

@brondani
Copy link
Copy Markdown
Collaborator

@brondani brondani commented May 28, 2026

Fixes

Changes

Example response for a GetUsedItems RPC request with a locked but not installed pack:

{
  "id": 20,
  "jsonrpc": "2.0",
  "result": {
    "components": [
      ...
    ],
    "packs": [
      {
        "locked": "ARM::CMSIS-Compiler@2.2.0-dev",
        "missing": true,
        "origin": "D:/examples/csolution-examples-wip/DualCore/HelloWorld.csolution.yml",
        "pack": "ARM::CMSIS-Compiler@^2.2.0-0",
        "selected": true,
        "upgrade": "2.2.0"
      },
      ...
    ]
  },
  "success":true
}

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
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

Test Results

    3 files   -    55     21 suites   - 155   17m 31s ⏱️ - 7m 52s
  466 tests  -   449    466 ✅  -   432  0 💤  - 17  0 ❌ ±0 
1 398 runs   - 1 484  1 398 ✅  - 1 416  0 💤  - 68  0 ❌ ±0 

Results for commit a4f778a. ± Comparison against base commit 0b16215.

This pull request removes 451 and adds 2 tests. Note that renamed tests count towards both.
AuxCmdTests ‑ MkdirCmdTest
AuxCmdTests ‑ RmdirCmdTest
AuxCmdTests ‑ TouchCmdTest
BuildSystemGeneratorTests ‑ GenAuditFile
BuildSystemGeneratorTests ‑ GenAuditFile_WithOut_Existing_Audit_File
BuildSystemGeneratorTests ‑ GenAuditFile_With_Existing_Audit_File
BuildSystemGeneratorTests ‑ GetString
BuildSystemGeneratorTests ‑ StrConv
BuildSystemGeneratorTests ‑ StrNorm
CBuildGCCTests ‑ Asm
…
ProjMgrRpcTests ‑ PackReferenceLocked
ProjMgrRpcTests ‑ PackReferenceMissing

♻️ This comment has been updated with latest results.

Comment thread tools/projmgr/CMakeLists.txt Outdated
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 extends pack reference handling in the project manager RPC flow so GetUsedItems can report locked-but-unresolved packs and missing pack references.

Changes:

  • Adds missing tracking to PackageItem and lockedPacks tracking to ContextItem.
  • Updates RPC pack reference generation to emit optional locked and missing fields.
  • Bumps the fetched RPC interface and adds tests/test data for locked and missing pack references.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/projmgr/CMakeLists.txt Updates the fetched csolution-rpc package version/source.
tools/projmgr/include/ProjMgrWorker.h Adds storage for missing pack state and locked pack IDs.
tools/projmgr/src/ProjMgrWorker.cpp Populates missing state and tracks locked packs during pack resolution.
tools/projmgr/src/ProjMgrRpcServer.cpp Emits locked and missing fields in PackReference responses.
tools/projmgr/test/src/ProjMgrRpcTests.cpp Adds RPC tests for locked and missing pack reference fields.
tools/projmgr/test/data/TestSolution/PackLocking/pack_reference_locked.csolution.yml Adds test solution data for a locked pack reference case.
tools/projmgr/test/data/TestSolution/PackLocking/pack_reference_locked.cbuild-pack.yml Adds cbuild-pack lock data for an unavailable locked pack version.

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

Comment thread tools/projmgr/CMakeLists.txt Outdated
Comment thread tools/projmgr/test/src/ProjMgrRpcTests.cpp Outdated
@brondani brondani marked this pull request as ready for review May 29, 2026 07:21
@brondani brondani changed the title Extend PackReference with locked and missing nodes [csolution-rpc] Extend PackReference with optional locked and missing nodes May 29, 2026
@brondani brondani requested a review from edriouk May 29, 2026 07:22
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 65.24%. Comparing base (0b16215) to head (a4f778a).

Files with missing lines Patch % Lines
tools/projmgr/src/ProjMgrWorker.cpp 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2490   +/-   ##
=======================================
  Coverage   65.24%   65.24%           
=======================================
  Files         147      147           
  Lines       26666    26674    +8     
  Branches    16159    16166    +7     
=======================================
+ Hits        17397    17404    +7     
  Misses       7074     7074           
- Partials     2195     2196    +1     
Flag Coverage Δ
projmgr-cov 87.93% <91.66%> (-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.33% <ø> (ø)
tools/projmgr/src/ProjMgrRpcServer.cpp 85.57% <100.00%> (-0.05%) ⬇️
tools/projmgr/src/ProjMgrWorker.cpp 87.41% <75.00%> (+<0.01%) ⬆️
🚀 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.

2 participants