Skip to content

Make rules_python, rules_nodejs, rules_foreign_cc dev_dependencies#370

Merged
tinder-maxwellelliott merged 1 commit into
Tinder:masterfrom
thirtyseven:dev-deps-python-nodejs-foreign-cc
Jun 12, 2026
Merged

Make rules_python, rules_nodejs, rules_foreign_cc dev_dependencies#370
tinder-maxwellelliott merged 1 commit into
Tinder:masterfrom
thirtyseven:dev-deps-python-nodejs-foreign-cc

Conversation

@thirtyseven

@thirtyseven thirtyseven commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What

Marks rules_python, rules_nodejs, and rules_foreign_cc as dev_dependency = True in MODULE.bazel.

Why

Adding these non-dev bazel_deps is disruptive to downstream consumers and should only be added if necessary.

These bazel_deps exist only to override transitive dependencies to Bazel 9 compatible versions — a concern that only applies when building bazel-diff itself as the root module. bazel mod graph confirms all three are present transitively regardless, so the explicit edges only contribute a version pin (via MVS):

Module Pinned at root Transitive fallback when consumed
rules_python 1.8.4 1.7.0 (Bazel 9)
rules_nodejs 6.7.3 5.8.2
rules_foreign_cc 0.15.1 0.10.1

rules_nodejs and rules_foreign_cc are referenced by no bazel-diff target; rules_python is supplied transitively (proto codegen). Keeping them out of the non-dev graph reduces what downstream consumers inherit.

Testing

Verified with Bazel 9.1.0:

  • Root bazel build //... (dev deps active) — all 44 targets build.
  • Root bazel test //cli/... (mirrors BCR bcr_test_module) — 22/22 pass.
  • bazel build //:bazel-diff --ignore_dev_dependency (mirrors the BCR build_targets job: bazel-diff consumed as a non-root module, pins dropped, rules_python at 1.7.0) — builds successfully.

These three bazel_deps exist only to bump transitive dependencies to
Bazel 9 compatible versions, which only matters when building bazel-diff
as the root module. rules_nodejs and rules_foreign_cc are referenced by
no bazel-diff target; rules_python is pulled in transitively (proto
codegen) regardless of the explicit edge. Marking them dev_dependency
keeps them out of the dependency graph that downstream consumers inherit.

@tinder-maxwellelliott tinder-maxwellelliott left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks

@tinder-maxwellelliott tinder-maxwellelliott merged commit 1e13a5e into Tinder:master Jun 12, 2026
15 checks passed
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