Preserve the expected cgen path when the generated layer is absent#2532
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves how projmgr reports missing external-generator output by keeping the expected *.cgen.yml path in the generated *.cbuild-idx.yml even when the generated layer file is absent, while still failing conversion with the existing diagnostic.
Changes:
- Register the missing generator-import (
.cgen.yml) as a context clayer before returning failure so the cbuild index can surface the missing path. - Adjust generated-layer processing to add the generator-import clayer to the context before failing.
- Extend the
ExternalGenerator_NoCgenFileunit test to assert the missing cgen path appears underclayersin the generated cbuild index.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/projmgr/src/ProjMgrExtGenerator.cpp | On missing cgen file, logs the error and stores the expected path so it can be emitted into the cbuild index. |
| tools/projmgr/src/ProjMgrWorker.cpp | Ensures the generator-import clayer is registered in the context before returning failure for missing cgen. |
| tools/projmgr/test/src/ProjMgrUnitTests.cpp | Verifies the missing cgen path is present in the generated extgen.cbuild-idx.yml under clayers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 2 files - 37 14 suites - 107 14m 8s ⏱️ - 4m 31s Results for commit 21fc875. ± Comparison against base commit 633c10f. This pull request removes 451 tests. |
brondani
marked this pull request as ready for review
July 22, 2026 15:52
edriouk
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
*.cgen.ymlfile does not refresh CMSIS View or diagnostics vscode-cmsis-solution#394Changes
clayerbefore context processing returns an error. This allows the generated*.cbuild-idx.ymlfile to identify the missing generator output while conversion still fails with the existing diagnostic.ExternalGenerator_NoCgenFiletest case to verify that the missing cgen path is listed underclayersin the generated cbuild index.Risk
Low. The successful generator-import path is unchanged; only missing cgen handling and its partial index output are affected.
Checklist