Skip to content

fix(bazel): support consumers with compatible registry dependencies - #428

Draft
AlexanderLanin wants to merge 1 commit into
mainfrom
fix/consumable-module-dependencies
Draft

AlexanderLanin wants to merge 1 commit into
mainfrom
fix/consumable-module-dependencies

Conversation

@AlexanderLanin

@AlexanderLanin AlexanderLanin commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Why

Allow reference integration to consume Crypto without pulling in incompatible Python rules or a yanked Protobuf release. Bazel ignores dependency overrides outside the root module, so Crypto’s declared versions must also work when another workspace consumes it.

Use rules_python 1.8.5, gRPC 1.76.0 (matching the existing standalone archive), and a Protobuf minimum of 33.0. Apply the existing gRPC and Protobuf QNX patches with single_version_override so the registry’s Bazel metadata and patches are preserved and version resolution remains available. Refresh the lockfile for the resulting dependency graph.

This is a POC commit to show what is required for Crypto to be integrated into reference integration (ref-int). Please solve this in whichever way makes the most sense to you :-)

Copilot AI 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.

🟡 Changes recommended

An active moderate issue remains in MODULE.bazel because the override and lockfile still force rules_python 1.5.4 instead of the requested 1.8.5.

1 open issue
What changed in this PR

Updates Bazel dependency declarations so Crypto can be consumed with compatible registry dependencies while preserving QNX-specific gRPC and Protobuf patches.

Changes:

  • Updates declared rules_python, gRPC, and Protobuf versions.
  • Applies QNX patches through registry-preserving single_version_override settings.
  • Refreshes the Bazel module lockfile.
  • The existing rules_python override still forces version 1.5.4 instead of the requested 1.8.5.
File Description
MODULE.bazel.lock Refreshes registry hashes, module metadata, extension state, and dependency graph information.
MODULE.bazel Updates dependency versions and applies QNX patches through registry-preserving overrides.

Review effort: Lite

Comment thread MODULE.bazel Resolved
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: a9cf6443-def7-47bb-b433-7853ef24fb56
Computing main repo mapping: 
Computing main repo mapping: 
DEBUG: Rule 'abseil-cpp+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-m3oGQwXp/ZTRJP+mzDWFkutCtdpYj7TgfQklSqQAhts="
DEBUG: Repository abseil-cpp+ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:431:31: in <toplevel>
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'score_bazel_platforms', the root module requires module version score_bazel_platforms@0.1.2, but got score_bazel_platforms@1.1.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_cc', the root module requires module version rules_cc@0.2.22, but got rules_cc@0.2.25 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'protobuf', the root module requires module version protobuf@33.0, but got protobuf@33.4 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'flatbuffers', the root module requires module version flatbuffers@25.12.19, but got flatbuffers@25.12.19.bcr.1 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'score_process_description', the root module requires module version score_process_description@2.2.2, but got score_process_description@2.2.4 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 1 packages loaded
Loading: 1 packages loaded
    currently loading: 
Loading: 1 packages loaded
    currently loading: 
Loading: 1 packages loaded
    currently loading: 
Loading: 1 packages loaded
    currently loading: 
Loading: 1 packages loaded
    currently loading: 
Loading: 1 packages loaded
    currently loading: 
WARNING: Target pattern parsing failed.
ERROR: Skipping '//:license-check': no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/inc_security_crypto/inc_security_crypto/BUILD
ERROR: no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/inc_security_crypto/inc_security_crypto/BUILD
INFO: Elapsed time: 18.466s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@AlexanderLanin
AlexanderLanin force-pushed the fix/consumable-module-dependencies branch from c27380f to c4eba45 Compare November 16, 2026 20:00
Copilot AI lite review requested due to automatic review settings November 16, 2026 20:00
Comment thread MODULE.bazel
# FlatBuffers in the future
# *******************************************************************************
bazel_dep(name = "grpc", version = "1.83.0")
bazel_dep(name = "grpc", version = "1.76.0")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will become obsolete with merge of #372.
Merge is targeted for Wednesday.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a POC commit to show what is required for crypto to be integrated into ref int. Solve whichever way makes most sense to you :-)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, thank you!

Copilot AI 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.

🔵 Needs a closer look

The change affects Bzlmod dependency resolution and QNX patching across external sources, but validating registry compatibility and target-toolchain linking requires unavailable Bazel and QNX integration builds.

No open issues 🎉

1 resolved since last review

Review effort: Lite

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-428: https://eclipse-score.github.io/inc_security_crypto/pr-428/

Comment thread MODULE.bazel

bazel_dep(name = "score_crates", version = "0.0.15")

crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate", isolate = True)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove of crate_universe usage, is also planned as for ref_int integration.
We assume that the experimental feature usage isolate is not allowed.

Signed-off-by: Alexander Lanin <Alexander.Lanin@etas.com>
@AlexanderLanin
AlexanderLanin force-pushed the fix/consumable-module-dependencies branch from c4eba45 to 810143b Compare November 16, 2026 20:08
Copilot AI lite review requested due to automatic review settings November 16, 2026 20:08

Copilot AI 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.

🟡 Changes recommended

The Abseil QNX override remains root-only, so downstream consumers may omit its patch and retain the incompatible -pthread linker option.

1 open issue

Review effort: Lite

Comment thread MODULE.bazel
Comment on lines +220 to 224
single_version_override(
module_name = "grpc",
patch_strip = 1,
patches = ["//third_party/grpc:grpc_qnx_pthread.patch"],
strip_prefix = "grpc-1.76.0",
urls = ["https://github.com/grpc/grpc/archive/refs/tags/v1.76.0.tar.gz"],
)

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

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants