generator: escape Rust reserved keywords in obj.field/input.field emission #136

Merged
zaelgohary merged 2 commits from development_fix_generator_escape_keyword into development 2026-05-24 15:15:42 +00:00
Member

Summary

Fix one of the two bugs in #135. Rust reserved keyword (type) field names in OSIS schemas now emit as obj.r#type = input.r#type; instead of obj.type = input.type; (which does not compile).

Closes half of #135.

Changes

Added crate::rust::util::escape_rust_keyword helper; applied at both rust_osis.rs field-copy emit sites.

Test Results

Regenerated hero_books publishing/server with the patched generator: obj.r#type lands at the two expected sites.

## Summary Fix one of the two bugs in #135. Rust reserved keyword (type) field names in OSIS schemas now emit as obj.r#type = input.r#type; instead of obj.type = input.type; (which does not compile). ## Related Issue Closes half of #135. ## Changes Added crate::rust::util::escape_rust_keyword helper; applied at both rust_osis.rs field-copy emit sites. ## Test Results Regenerated hero_books publishing/server with the patched generator: obj.r#type lands at the two expected sites.
generator: escape Rust reserved keywords in obj.field/input.field emission
Some checks failed
Test / test (push) Has been cancelled
Test / test (pull_request) Has been cancelled
2ffb0a09b3
generator: dedupe escape_rust_keyword (now shared via rust::util)
Some checks failed
Test / test (push) Failing after 2m9s
Test / test (pull_request) Failing after 2m16s
c61fd49dd1
zaelgohary merged commit d7aa082ecc into development 2026-05-24 15:15:42 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_blueprint!136
No description provided.