Closed
Fix sq module bzlmod resolution: invalid crate.annotation, wrong-crate features, and non-hermetic crypto backend#8
Conversation
Signed-off-by: Ryan Northey <ryan@synca.io>
…ction Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issues in sq Bazel module configuration
Fix sq module bzlmod resolution: invalid crate.annotation, wrong-crate features, and non-hermetic crypto backend
Sep 7, 2026
phlax
force-pushed
the
sq
branch
8 times, most recently
from
September 7, 2026 09:39
03a55f7 to
03bf319
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consuming
sqvia bzlmod failed at analysis withunknown attribute default_features providedoncrate.annotation— that attribute (andfeatures) doesn't exist oncrate_universe's bzlmod annotation tag, onlycrate_featuresdoes. The crypto features were also attached to the wrong crate, and the overlayBUILD.bazeldepended on a targetcrate_universenever generates.MODULE.bazelcrate.annotation(default_features = False, features = [...])onsequoia-sqwithcrate.annotation(crate = "sequoia-openpgp", crate_features = [...])—crypto-rust/allow-experimental-crypto/allow-variable-time-cryptoaresequoia-openpgpfeatures thatsequoia-sqmerely forwards.bazel_deps onbazel_skylibandrules_cc(not referenced directly; already transitive viarules_rust).overlay/BUILD.bazelsequoia-sqis the workspace-root package being indexed, not a cratecrate_universegenerates a target for — switcheddeps = ["@sequoia_sq_crate_index//:sequoia-sq"]toall_crate_deps()/aliases()from@sequoia_sq_crate_index//:defs.bzl.compile_data = ["README.md"]sincesrc/main.rsdoesinclude_str!("../README.md").Crypto backend
crate.annotationcan't disable default features, and upstream's default (crypto-nettle) pullsnettle-sys, requiring a system Nettle/GMP install — non-hermetic. Addedpatches/sq-default-crypto-rust.patchflippingsequoia-sq'sCargo.toml:registered in
source.json(patch_strip: 1+ sha256). Verifiednettle/nettle-sysno longer appear anywhere indeps(@sq//:sq).source.jsonRecomputed the overlay hash for the changed
BUILD.bazeland added the new patch entry;url/integrity/strip_prefixuntouched.Known follow-up (not addressed here): a transitive dependency,
sequoia-keystore-backend, has abuild.rsthat bakes build-script-local absolute paths into generated sources viainclude_bytes!; those paths don't survive into the crate's own compile action under Bazel's per-action sandboxing, so a fullbazel build @sq//:sqstill fails deeper in the graph. This is a pre-existing upstream/Bazel-compatibility issue, unrelated to thecrate.annotation/feature/overlay problems fixed here.