Skip to content

build(deps): embed age's translations in debug builds - #9410

Open
Zygimantass wants to merge 3 commits into
mainfrom
build/age-debug-embed
Open

Zygimantass wants to merge 3 commits into
mainfrom
build/age-debug-embed

Conversation

@Zygimantass

Copy link
Copy Markdown
Member

Enables rust-embed's debug-embed feature (no new packages). Without it, a debug build of age records the absolute path of its translation files and reads them at run time, so age and 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.

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.
@tempoxyz-bot

tempoxyz-bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

👁️ Cyclops Security Review

✅ Reviewed 91e7d1b (latest) · Coverage: partial · no open findings · report
⚠️ Not checked: rust-embed debug-embed feature enablement for age in tempo-consensus-config: ruled out without reading the cited code at this commit
⚠️ Not checked: Debug localization embedding and its effect on consensus signing-key loading: ruled out without reading the cited code at this commit

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread crates/consensus-config/Cargo.toml Resolved
Comment thread crates/consensus-config/Cargo.toml Resolved

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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's unused_crate_dependencies lint. rust-embed is now declared once in the workspace with default-features = false, and the crate inherits it, adding only debug-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 zepter feature-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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants