hero_rpc#129: scaffolder examples/ + benches/ + serial_test dev-dep + osis_benches symmetry #139
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!139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-129-examples-benches"
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
Phase 1 + Phase 6 of hero_rpc#129 (lifecycle alignment, part 2). The scaffolder now emits two workspace-root crates the consumer-service layout sanctions (
examples/andbenches/) on every scaffold, pre-installsserial_testso contributors don't have to amendtests/Cargo.tomlfirst, and movescrates/osis_benches/→benches/for symmetry with the consumer layout (the crate keeps itshero_rpc_osis_benchespackage name).Sibling PRs landing alongside:
--example+--benchverbs + dual-home--testdispatch + skill docs.Scope per the issue body
examples/scaffolded at workspace root (01_connect.rs+ wrapper Cargo.toml, regen-once).benches/workspace member crate at root (re-exports<name>_tests::*for sharedspin_up_service).serial_test = "3"under[dev-dependencies]in scaffoldedtests/Cargo.toml.crates/osis_benches/→benches/move. Cosmetic-only; no functional change.--no-examples/--no-benchesflags surfaced on thehero_rpc_generatorCLI binary mirroring--no-tests/--no-web.Out of scope here (in sibling PRs):
--exampleverb), §3 (dual-home--test), §6 (--benchverb), §4 (skill text) — hero_skills PR.Tests
5 new scaffolder tests (29 total green; 0 ignored):
test_scaffold_tests_cargo_toml_has_serial_test_dev_deptest_scaffold_emits_examples_cratetest_scaffold_emits_benches_cratetest_workspace_cargo_toml_lists_examples_and_benchestest_workspace_cargo_toml_omits_examples_and_benches_when_disabledcargo check --workspacegreen including the relocatedhero_rpc_osis_benches(now atbenches/).Diff stat highlights
Decisions taken without confirmation
examples/is a real workspace member (withCargo.toml+src/lib.rs) rather than a bare directory at root. Cargo can only run examples that belong to a package, so a virtual workspace can't host a looseexamples/. The wrapper package (<name>_examples) is the smallest change that letscargo run -p <name>_examples --example <foo>work — which is what the lab--exampleverb dispatches through.[[example]]entries point at01_connect.rsdirectly so the file sits at the package root, not under a nestedexamples/examples/.benches/gated ongenerate_tests. The starter shape re-exports<name>_tests::spin_up_service; withouttests/that path dep would dangle.No lab CLI scaffold subcommand wiring. A grep across
hero_skills/crates/lab/src/turned up no scaffold invocation, so the new--no-examples/--no-benchesflags are only on the standalonehero_rpc_generatorbinary. When/if a lab scaffold verb lands, wiring the two flags is a one-line append per opt-out.Test plan
cargo test -p hero_rpc_generator --lib build::scaffold::— 29/29 greencargo check --workspace— green incl. relocatedhero_rpc_osis_bencheshero_rpc_generator --helpshows the two new--no-*flagsexamples/01_connect.rs+benches/Cargo.toml(see sibling hero_service PR)Closes part of hero_rpc#129 (Phase 1 + Phase 6).