Deprecate service-authoring API in herolib_core::base (moved to hero_lifecycle::base per hero_rpc#142) #145
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_lib#145
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?
Context
hero_rpc#142 consolidated the service-authoring primitives (
ServiceTomlschema + closed enums,validate_service_toml,handle_info_flag,print_startup_banner,prepare_sockets, socket resolvers, the newpeer_socket_pathhelper) intohero_lifecycle::baseand called for a#[deprecated]shim to remain inherolib_core::basefor one release cycle so consumer repos can migrate at their own cadence.Without the shim, downstream services (hero_osis, hero_proxy, hero_compute, hero_os, hero_router, hero_voice, hero_inspector, …) silently keep using
herolib_core::base::*with no migration signal, and the two implementations risk diverging over the release cycle.Goals
#[deprecated]attributes to the service-authoringpub usestatements incrates/core/src/base/mod.rs. Note text points athero_lifecycle::baseand references hero_rpc#142.paths.rsre-exports (path_root / path_var / hero_var_dir / hero_bin / parse_git_url / scan_local_repos / ensure_env / …) untouched — those are lab-specific path/repo helpers, not service-authoring primitives, and stay in herolib_core.service_base!()macro definition in place; the deprecation onvalidate_service_tomlandhandle_info_flag(which the macro calls) is the migration signal for every macro user.cargo build --workspaceclean (no other internal hero_lib code uses these deprecated re-exports — they're consumed by downstream repos).crates/core/src/base/service.rsstay as-is — no removal in this PR. Removal happens one release cycle after hero_rpc#142 lands, in a follow-up.Out of scope
hero_lifecycle::base(full re-export shim). Adds a cross-repo git dep, requires a wasm32 conditional split, and risks pulling tokio/hyper transitively into anything that touches herolib_core. Filed separately if drift between the two impls becomes a real problem during the deprecation window.hero_service_refactor.Merged in PR #146 (commit
5cfc08d8a2) ondevelopment.Changes
#[deprecated]attributes to the service-authoringpub usestatements incrates/core/src/base/mod.rscoveringServiceToml+ closed enums (Kind,Category,Protocol,SockType),Binary,Socket,TcpEntry,Dependency,EnvVar,ServiceMeta,SocketPrep,validate_service_toml,handle_info_flag,print_startup_banner,prepare_sockets,resolve_socket_dir,resolve_socket_path,resolve_socket_path_with_override,resolve_domain_socket_path.hero_lifecycle::basewith the hero_rpc#142 link.service_base!()macro internal call gets#[allow(deprecated)]so the macro itself stays usable without forcing every existing call site into the deprecation churn — direct imports still see the warning.paths.rsuntouched (lab-specific path/repo helpers stay in herolib_core).cargo build --workspaceclean.Follow-up
hero_lifecycle::baserather than in-place deprecate) deferred per the issue spec — file if drift between the two implementations becomes a real problem during the deprecation window.hero_service_refactor.