Skip to content

Commit b4c03f1

Browse files
committed
refactor: extract product identity literals into homeboy-product-identity crate
Moves the ProductIdentity struct and PRODUCT_IDENTITY constant (homeboy's product name, binary name, config/env/artifact/run-dir prefixes) into a new zero-dependency path-only crate. It's a pristine leaf (std only, 36 LOC) used by 9 modules including run_dir, whose 26 references to product_identity blocked its own extraction in the previous engine-primitives cut. Extracting product_identity now unblocks a future run_dir/temp/paths extraction without dragging those literals along prematurely. The 30 PRODUCT_IDENTITY call sites are unchanged — core/mod.rs re-exports the crate as product_identity. Not published to crates.io; still ships as the single homeboy binary. cargo check --lib passes.
1 parent e625752 commit b4c03f1

5 files changed

Lines changed: 23 additions & 1 deletion

File tree

Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ path = "src/bin/bench-audit-self.rs"
3838
[dependencies]
3939
# Internal workspace crates (path-only, not published)
4040
homeboy-error = { path = "crates/homeboy-error" }
41+
homeboy-product-identity = { path = "crates/homeboy-product-identity" }
4142
homeboy-engine-primitives = { path = "crates/homeboy-engine-primitives" }
4243
homeboy-redaction = { path = "crates/homeboy-redaction" }
4344

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "homeboy-product-identity"
3+
version = "0.1.0"
4+
edition = "2021"
5+
license = "MIT"
6+
authors = ["Chris Huber <chubes@extrachill.com>"]
7+
description = "Homeboy-owned product literals (name, binary, config/env/artifact prefixes)"
8+
repository = "https://github.com/Extra-Chill/homeboy"
9+
10+
[lib]
11+
name = "homeboy_product_identity"
12+
path = "src/lib.rs"
13+
14+
[dependencies]
File renamed without changes.

src/core/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ pub mod preview_ingress;
121121
#[cfg(test)]
122122
mod preview_ingress_tests;
123123
pub mod process;
124-
pub mod product_identity;
124+
// product_identity moved to the internal `homeboy-product-identity` crate.
125+
// Re-exported so `crate::core::product_identity::*` call sites keep working.
126+
pub use homeboy_product_identity as product_identity;
125127
pub mod project;
126128
pub mod proof;
127129
pub mod publication_artifacts;

0 commit comments

Comments
 (0)