Restructure SDK outputs into top-level sdk/{rust,python,rhai,js}/ #70
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#70
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?
Problem
Generated SDK output is inconsistent. In a scaffolded service (e.g.
hero_service):crates/<name>_sdk/(workspace member)crates/<name>_rhai/(workspace member)sdk/js/(loose files, not a crate)recipe_sdk_rpc2)Four different homes for the same conceptual thing.
Expected
One umbrella with one folder per language target:
Keeping the Rust + Rhai crates as members of the top workspace stays fine — they just live under
sdk/rust/andsdk/rhai/instead ofcrates/. Thecrates/directory keeps only the binaries + core lib (hero_<name>,_server,_admin,_examples).What to do
_sdk→sdk/rust/,_rhai→sdk/rhai/. Update workspace member paths + buildenv.sh + tests.sdk/python/.sdk/js/*.jsto a proper package shape (sdk/js/package.json+ sources).Cargo.toml,hero_service_scaffold.mdskill, and the recipe_server example.Acceptance
sdk/{rust,rhai,python,js}/; none of the SDK output lives undercrates/.cargo build --workspacestill clean.lab infocheckclean.hero_servicetemplate repo regenerated to match (or updated in-place).Related
Picked this up. Working in branch
issue-70-sdk-restructureat worktree/tmp/hero_rpc_70againstorigin/development.Scope plan:
_sdk→sdk/rust/and_rhai→sdk/rhai/(workspace member paths + scaffoldedbuild.rsclient_crate_dir+ examples crate path)..with_python_sdk()into the scaffoldedbuild.rsso a fresh scaffold also producessdk/python/.sdk/js/src/types_generated.js+ emit a minimalsdk/js/package.json.example/recipe_server/against the new layout (Cargo.toml workspace, in-tree patches, build.rs paths, regenerate SDK trees).cargo build --workspaceclean,lab infocheckclean,<hero-api-docs>still resolves.The
hero_service_scaffold.mdskill update +hero_servicetemplate repo regen will land as separate PRs (inhero_skillsandhero_servicerespectively) — out of scope for this hero_rpc PR but referenced from the description.PR #89 is up against
development: #89All acceptance checks green:
sdk/{rust,rhai,python,js}/(covered by newtest_scaffold_unified_sdk_layout+test_scaffold_build_rs_opts_into_python_and_sdk_rust).crates/keeps only binaries + core lib + examples — no SDK output left under it.cargo build --workspaceclean (1 pre-existing unused-imports warning, untouched).cargo test -p hero_rpc_generator --lib— 131 passed.lab infocheck— identical todevelopment(4 clean, 2 with pre-existing §5 boilerplate findings incrates/generator+crates/hero_lifecycle, unrelated to #70).<hero-api-docs>still resolves —docs/openrpc.jsonregeneration intact andrecipes_admin/src/main.rsstillinclude_str!s it.Drive-by fix included: the Python emitter was double-prefixing
hero_whensdk_types_crate("hero_<svc>")was set (the value the scaffolder always emits), so it was writing tosdk/python/hero_hero_<svc>_sdk/. The leading prefix is now stripped before being re-applied; new test covers both bare and prefixed inputs.Follow-ups (out of scope here, will land separately as the task spec called out):
hero_skills—hero_service_scaffold.mdskill update PR.hero_servicetemplate repo — regen PR.