feat(generator): route codegen into per-domain generated/ subfolders (#96) #101
No reviewers
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_rpc!101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-96-generated-folders"
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?
Summary
generated/subfolders and gitignores it (closes #96)_generated.rssuffix everywhere — folder name carries the signalmod.rs+types.rsinclude!()wrapper +rpc.rstrait impl as once-only files contributors ownexample/recipe_serverto the new layout;git statusis empty aftercargo build --workspaceWhat changed per emitter
<domain>/types_generated.rs,types_wasm_generated.rs<domain>/generated/{types,types_wasm}.rs<domain>/osis_server_generated.rs,rpc_generated.rs<domain>/generated/{server,rpc}.rsdocs/openrpc.json,docs/<domain>/openrpc.jsonsdk/js/src/<domain>.js,index.js<domain>/rhai_types_generated.rs<domain>/generated/rhai_types.rssdk/python/hero_<svc>_sdk/*.py<domain>/tests.rs<domain>/generated/tests.rssdk/rust/src/<domain>.rssdk/rust/src/generated/<domain>.rsModule shape (consumer crate)
Module shape (server crate)
generated/mod.rsdeclaresmod rpc;privately (so the parent'smod rpc;can claim the name) and re-exports the trait + error types via
pub use rpc::*.Gitignore
Per-crate
.gitignorenext to each domain:Repo-root additions (also added to the scaffolder so freshly scaffolded
services pick them up):
Build ordering
sdk/rust/and<svc>_admin/get a tinybuild.rsshim with[build-dependencies] hero_<svc> = { path = ... }. The dep edge forces cargoto run the core crate's
build.rs(which writes the SDK + docs) beforecompiling these downstream crates. Without the edge, gitignored codegen
output isn't present when downstream compilation starts.
Acceptance check on
example/recipe_serverNo
_generated.rsfilenames remain inexample/recipe_server/.Out of scope (per the issue body)
recipe_server+hero_service— those land in #90 phase 3.hero_service_scaffold.mdskill — separate PRs againsthero_serviceandhero_skills.🤖 Generated with Claude Code
Phase 1: emitter path changes only. - rust_types: writes to <domain>/generated/{types,types_wasm,rhai_types}.rs; scaffolds parent mod.rs + types.rs include!() wrapper once - rust_server: writes to <domain>/generated/{server,rpc}.rs; scaffolds parent rpc.rs (trait impl) once - tests_emit: writes to <domain>/generated/tests.rs - rhai: writes to <domain>/generated/rhai_types.rs - build/emit/rust_server: writes server crate's <domain>/generated/mod.rs every build, scaffolds parent mod.rs once - build/emit/rust_rpc2: writes sdk/rust/src/generated/{<domain>,mod}.rs; scaffolds lib.rs + src/.gitignore once Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>generated/subfolders + gitignore #96generated/subfolders + gitignore #96