Skip to content

Preserve the expected cgen path when the generated layer is absent#2532

Merged
brondani merged 1 commit into
mainfrom
projmgr-preserve-cgen-path
Jul 23, 2026
Merged

Preserve the expected cgen path when the generated layer is absent#2532
brondani merged 1 commit into
mainfrom
projmgr-preserve-cgen-path

Conversation

@brondani

@brondani brondani commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes

Changes

  • Preserve the expected cgen path when a generated layer file is absent. The missing cgen is registered as a clayer before context processing returns an error. This allows the generated *.cbuild-idx.yml file to identify the missing generator output while conversion still fails with the existing diagnostic.
  • Extended ExternalGenerator_NoCgenFile test case to verify that the missing cgen path is listed under clayers in 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

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

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.

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_NoCgenFile unit test to assert the missing cgen path appears under clayers in 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.

Comment thread tools/projmgr/src/ProjMgrExtGenerator.cpp
@github-actions

Copy link
Copy Markdown

Test Results

  2 files   -    37   14 suites   - 107   14m 8s ⏱️ - 4m 31s
475 tests  -   451  475 ✅  - 434  0 💤  - 17  0 ❌ ±0 
950 runs   - 1 041  950 ✅  - 990  0 💤  - 51  0 ❌ ±0 

Results for commit 21fc875. ± Comparison against base commit 633c10f.

This pull request removes 451 tests.
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
…

@brondani
brondani marked this pull request as ready for review July 22, 2026 15:52
@brondani
brondani requested a review from edriouk July 22, 2026 15:52
@brondani
brondani merged commit aeee696 into main Jul 23, 2026
26 checks passed
@brondani
brondani deleted the projmgr-preserve-cgen-path branch July 23, 2026 06:49
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.

3 participants