Skip to content

[cbuild2cmake] Improve zephyr module generation#473

Merged
brondani merged 1 commit into
mainfrom
rework-zephyr-module-generation
May 20, 2026
Merged

[cbuild2cmake] Improve zephyr module generation#473
brondani merged 1 commit into
mainfrom
rework-zephyr-module-generation

Conversation

@brondani

@brondani brondani commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Fixes

Changes

  • Kconfig source line simplified
  • Deterministic pack ordering, making pack-dependent output ordering stable across runs
  • Update test cases

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 May 19, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@qltysh

qltysh Bot commented May 19, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

This PR will not change total coverage.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
pkg/maker/zephyr.go100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@github-actions

github-actions Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Test Results

  6 files  ±0   18 suites  ±0   1s ⏱️ -1s
109 tests ±0  109 ✅ ±0  0 💤 ±0  0 ❌ ±0 
654 runs  ±0  654 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit d28d688. ± Comparison against base commit 2bf2069.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reworks zephyr module file generation so that output paths are anchored to the current working directory (where generation runs) rather than the solution input root, making output deterministic and workspace-driven. Also simplifies the Kconfig Source: field and stabilizes pack ordering in the generated sources.cmake.

Changes:

  • Introduce ZephyrMaker.BaseDir (set from os.Getwd()) and replace m.SolutionRoot with it in all output path computations (module.yml, Kconfig, CMakeLists.txt, sources.cmake, copied constructed files, and pack-path relative computation).
  • Replace the relative Source: path in Kconfig with just filepath.Base(zephyrLayer.Clayer.File).
  • Iterate PackPaths via sortedmap.AsSortedMap to produce deterministic pack ordering in the generated CMake.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pkg/maker/zephyr.go Adds BaseDir, switches output anchoring from SolutionRoot to BaseDir, simplifies Kconfig source line, and sorts pack iteration.
pkg/maker/zephyr_test.go Sets BaseDir in unit tests, updates expected Kconfig Source: value, adds an os.Chdir to the integration test, and adds a pack-ordering assertion.

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

Comment thread pkg/maker/zephyr.go Outdated
@brondani brondani marked this pull request as ready for review May 19, 2026 13:35
@brondani brondani requested a review from soumeh01 May 19, 2026 13:35
@brondani brondani marked this pull request as draft May 19, 2026 16:12
@brondani brondani removed the request for review from soumeh01 May 19, 2026 16:12
@brondani brondani force-pushed the rework-zephyr-module-generation branch from 04d3d7b to d28d688 Compare May 20, 2026 07:32
@brondani brondani changed the title [cbuild2cmake] Rework zephyr module generation for better orchestration [cbuild2cmake] Improve zephyr module generation May 20, 2026
@brondani brondani marked this pull request as ready for review May 20, 2026 07:54
@brondani brondani requested a review from soumeh01 May 20, 2026 07:54

@soumeh01 soumeh01 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 a9bdd8c into main May 20, 2026
41 of 42 checks passed
@brondani brondani deleted the rework-zephyr-module-generation branch May 20, 2026 08:04
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