hero_rpc_generator: two bugs prevent regen of OSIS server files #135
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_blueprint#135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Discovered while regenerating
osis_server_generated.rsfor hero_books (publishing domain). The generator at hero_rpc development tip (2b2aeb6c) emits code that does not compile:Bug 1:
super::coreshould besuper::super::coreGenerated header includes:
But server files live at
crates/<lib>/src/<domain>/server/osis_server_generated.rs, sosuper::is<domain>/server/. Thecoremodule is at<domain>/core/, reachable assuper::super::core::*(orcrate::<lib>::<domain>::core::*).The old generator output (still in git) has
super::super::core::*and worked correctly.Bug 2:
typefield name not escapedSchema:
Generator emits:
but
typeis a Rust reserved keyword. Must emitobj.r#type = input.r#type;when the schema field name collides with a keyword (suggested rustc fix).Repro
Any domain schema where a root object has a
typefield, regenerated with the v0.6.0 generator. For books specifically:Impact
Hand-patching the regenerated file works around both, but anyone who tries
cargo run hero_rpc_generatoragainst a real existing OSIS service workspace hits these immediately.2ffb0a0c61fd49d7aa082