Skip to content

fix: id exporter now generates static UIDs for struct and property nodes#528

Open
SoundMatt wants to merge 1 commit into
COVESA:masterfrom
SoundMatt:fix/id-exporter-struct-support
Open

fix: id exporter now generates static UIDs for struct and property nodes#528
SoundMatt wants to merge 1 commit into
COVESA:masterfrom
SoundMatt:fix/id-exporter-struct-support

Conversation

@SoundMatt
Copy link
Copy Markdown

Summary

get_trees() returns a (tree, datatype_tree) tuple. The id exporter was discarding the second value, so struct (VSSDataStruct) and property (VSSDataProperty) nodes defined via --types never received static UIDs.

One-line fix: capture datatype_tree and run export_node on it after processing the main tree.

Resolves #439.

Test plan

  • uv run pytest tests/vspec/test_id_struct/ passes
  • vspec export id --types <types.vspec> -s <signals.vspec> -o out.yamlout.yaml contains Types.* entries with staticUID keys
  • Existing tests/vspec/test_static_uids/ tests unaffected (no --types used there)

The id exporter discarded the datatype tree returned by get_trees(),
so struct (VSSDataStruct) and property (VSSDataProperty) nodes never
received static UIDs.

Capture the datatype tree and run export_node on it after processing
the main signal tree.

Resolves COVESA#439.

Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
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.

id.py does not create identifiers for the specified structs.

1 participant