fix(generator): drop empty src/services/ placeholder (#75, closes #68) #77

Merged
timur merged 1 commit from issue-75-remove-services-placeholder-v2 into development 2026-05-19 23:43:41 +00:00
Owner

Summary

  • Removes the empty crates/<name>/src/services/mod.rs placeholder the scaffolder + build.rs codegen emit, plus the matching pub mod services; line in src/lib.rs.
  • Subsumes #68: with the placeholder gone, scaffolding with services as the domain name no longer collides.
  • Cleans up the committed placeholders in example/recipe_server + crates/server/examples/recipe_server.
  • Updates test_scaffold_core_and_sdk_crates_have_lib_rs to assert the placeholder is absent.

Test plan

  • cargo test -p hero_rpc_generator build::scaffold — 18/18 pass.
  • Fresh scaffold (hero_smoke75) — no src/services/, no pub mod services; anywhere.
  • Scaffold with domain literally named services (hero_svctest) — clean build; the only pub mod services; is the feature-gated one for the domain itself, and src/services/ is populated entirely by codegen.
  • example/recipe_server full workspace rebuilds clean.

Closes #75, closes #68.

## Summary - Removes the empty `crates/<name>/src/services/mod.rs` placeholder the scaffolder + build.rs codegen emit, plus the matching `pub mod services;` line in `src/lib.rs`. - Subsumes #68: with the placeholder gone, scaffolding with `services` as the domain name no longer collides. - Cleans up the committed placeholders in `example/recipe_server` + `crates/server/examples/recipe_server`. - Updates `test_scaffold_core_and_sdk_crates_have_lib_rs` to assert the placeholder is absent. ## Test plan - [x] `cargo test -p hero_rpc_generator build::scaffold` — 18/18 pass. - [x] Fresh scaffold (`hero_smoke75`) — no `src/services/`, no `pub mod services;` anywhere. - [x] Scaffold with domain literally named `services` (`hero_svctest`) — clean build; the only `pub mod services;` is the feature-gated one for the domain itself, and `src/services/` is populated entirely by codegen. - [x] `example/recipe_server` full workspace rebuilds clean. Closes #75, closes #68.
fix(generator): drop empty src/services/ placeholder (#75, closes #68)
Some checks failed
Test / test (push) Failing after 2m19s
Test / test (pull_request) Failing after 2m44s
1c2993df4b
The scaffolder + build.rs codegen emitted `crates/<name>/src/services/mod.rs`
with no real content, plus the matching `pub mod services;` line in
`src/lib.rs`. Contributors saw a one-file folder and had to guess its
purpose, and anyone picking `services` as a domain name hit a module
collision with the placeholder (issue #68).

The preserved trait impl lives in `_server/src/<domain>/rpc.rs` — there
is no need for a separate `services` namespace in the core lib.

Removed:
- scaffold.rs: `src/services/mod.rs` placeholder emission and
  `pub mod services;` line in the lib.rs stub
- builder.rs: `generate_services_placeholder` call + the `pub mod services;`
  push_str in `generate_lib_rs`
- emit/services.rs: the placeholder emitter module
- example placeholders in `example/recipe_server/crates/hero_recipes`
  and `crates/server/examples/recipe_server`

Updated `test_scaffold_core_and_sdk_crates_have_lib_rs` to assert the
placeholder is absent.

Acceptance verified:
- Fresh scaffold (`hero_smoke75`) has no `src/services/` dir, no
  `pub mod services;` anywhere.
- Scaffold with `services` as the domain name (`hero_svctest`) builds
  clean — the feature-gated `pub mod services;` for the domain itself
  is the only one, and `src/services/` is populated entirely by codegen.
- `example/recipe_server` full workspace rebuilds clean.

Closes #68 (placeholder/domain collision removed at the source).
timur merged commit 155768b107 into development 2026-05-19 23:43:41 +00:00
timur deleted branch issue-75-remove-services-placeholder-v2 2026-05-19 23:43:41 +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!77
No description provided.