Each crate's service.toml duplicates all 4 binary declarations (should be one-binary-per-file, per hero_collab) #47
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?
Summary
All four hero_livekit crates ship a
service.tomlthat redundantly declares all four binaries (hero_livekit_server,hero_livekit_admin,lk-backend,hero_do_hero_livekit), instead of each crate declaring only its own binary. The four files are near-duplicates and have already drifted.Evidence
crates/{hero_livekit_server,hero_livekit_admin,hero_livekit_backend,hero_livekit_rhai}/service.tomleach contain the same four[[binaries]]blocks. They differ only in:[service] crate = "..."line, andhero_livekit_admin/service.tomlcarries a[[dependencies]]block the other three lack.Each binary embeds its own crate's copy via
SERVICE_TOML(include_str!) andvalidate_service_toml(SERVICE_TOML)inmain.rs. lab registers per binary and looks up that binary's entry in its own crate's file — so the other three copies of each binary's entry are never read for it. They are dead, drift-prone duplication.Canonical pattern (hero_collab)
hero_collab declares one binary per
service.toml, co-located with the crate that builds it:Why it matters
lk-backend[[binaries.tcp]] port = 8080in all four files, butDEFAULT_BACKEND_PORT = 8081in code (rpc.rs:27); the[[dependencies]]exists only in the admin copy.lk-backendkindchange is only authoritative inhero_livekit_backend/service.toml(the copy embedded in thelk-backendbinary). The three other copies would still saykind = "server", misleading any reader.--infoself-description is wrong: every binary prints all four binaries as if it owned them.Fix
Make each crate's
service.tomldeclare only its own binary (plus that binary's own sockets/tcp/env/[[dependencies]]), mirroring hero_collab. This is also the precondition that makes #41 (setlk-backendinstall-only) and #46 (admin dep) edit exactly one authoritative file each.Related