Skip to content

Fix malformed child sections and prologue loss in CPSW export#1147

Merged
bengineerd merged 1 commit into
pre-releasefrom
bugfix/cpsw-export
Mar 19, 2026
Merged

Fix malformed child sections and prologue loss in CPSW export#1147
bengineerd merged 1 commit into
pre-releasefrom
bugfix/cpsw-export

Conversation

@bengineerd

@bengineerd bengineerd commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Bug Fixes

  1. CPSW child-device export omitted the : after the device name

    What was broken:

    • Child-device sections were emitted without valid YAML mapping syntax.

    Inputs that triggered it:

    • Exporting nested devices with the CPSW utilities.

    Result:

    • Malformed output for child-device sections.

    Fix:

    • Added the missing : after child device names.
  2. CPSW export overwrote the generated file prologue

    What was broken:

    • Header/prologue content such as #once and #include was accumulated and then overwritten by later body assignment.

    Inputs that triggered it:

    • Full-file/root CPSW export.

    Result:

    • Generated files missing the expected header/include prologue.

    Fix:

    • Preserved the accumulated prefix and appended body content instead of overwriting it.

These bugs were found by the new cpsw test script.

@ruck314 ruck314 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.

@bengineerd Obviously no one is using this API that's broken :-p

@bengineerd bengineerd merged commit b91ee61 into pre-release Mar 19, 2026
6 checks passed
@bengineerd bengineerd deleted the bugfix/cpsw-export branch March 19, 2026 06:17
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