Repository navigation
build(deps): embed age's translations in debug builds - #9410
Zygimantass wants to merge 3 commits into
Conversation
Without rust-embed's debug-embed feature, age's debug build records the absolute path of its translations and reads them at run time, so age and every crate above it compile differently for each cargo home. With it, debug builds embed them as release builds do.
👁️ Cyclops Security Review✅ Reviewed 91e7d1b (latest) · Coverage: partial · no open findings · report |
There was a problem hiding this comment.
Apart from the inline findings, I checked whether the new dependency adds a second copy of rust-embed. It doesn't: Cargo.lock still has only rust-embed 8.12.0, so the debug-embed feature lands on the same crate that age uses, and the only lockfile change is the one-line dependency entry.
Extended reasoning...
The only rust-embed in Cargo.lock is 8.12.0, together with its impl and utils crates at the same version. The direct version = "8" requirement therefore unifies with age's transitive copy and pulls in no new package.
Findings marked 🟡 are optional suggestions and need no follow-up push.
There was a problem hiding this comment.
The latest commit fixes both of my earlier points, and I found no new bugs. A human should still look, because the CODEOWNERS file assigns owners to the root Cargo.toml, Cargo.lock and crates/consensus-config/.
What was reviewed:
use rust_embed as _;in lib.rs satisfies the crate'sunused_crate_dependencieslint. rust-embed is now declared once in the workspace withdefault-features = false, and the crate inherits it, adding onlydebug-embed.- Cargo.lock has a single rust-embed version (8.12.0). The only lock change is the new entry in consensus-config's dependency list, so no second major version comes in.
- Not done: I did not run the
zepterfeature-propagation check that the repo's Rust style skill asks for after Cargo.toml edits, and I did not build the crate.
Extended reasoning...
The change adds 9 lines across the root Cargo.toml, Cargo.lock, crates/consensus-config/Cargo.toml and its lib.rs. It turns on rust-embed's debug-embed feature through feature unification so that age embeds its translation files in debug builds. It touches no auth, crypto or data-handling logic. The new commit 91e7d1b fixes both of my earlier comments: the unused-dependency lint and the dependency being declared outside the workspace. I deferred instead of approving because every changed path has assigned owners in .github/CODEOWNERS.
Enables rust-embed's
debug-embedfeature (no new packages). Without it, a debug build ofagerecords the absolute path of its translation files and reads them at run time, soageand everything that depends on it (consensus, node, binaries) compiles differently for every cargo home location, which defeats shared compile caches. Debug builds now embed the files the way release builds already do.