Skip to content

Conversation

@mmorel-35
Copy link
Contributor

@mmorel-35 mmorel-35 commented Dec 15, 2025

Major Changes

Bazel Upgrade

  • Bazel: 6.5.0 → 7.7.1

Linting System Modernization

  • Replaced: bazel_clang_tidy with aspect_rules_lint v1.12.0
  • Added: tools/lint/ directory with BUILD and linters.bzl for hermetic clang-tidy configuration
  • Updated: .bazelrc to use new linter aspect (//tools/lint:linters.bzl%clang_tidy)

Bzlmod Preparation (from native-bind and platforms branches)

  • Removed native.bind(): All native.bind() calls removed from bazel/repositories.bzl. BUILD file now references dependencies directly using canonical labels (e.g., @v8//:wee8 instead of //external:wee8)
  • Updated platforms: 0.0.10 → 1.0.0 (bzlmod compatible)

Dependency Updates

  • rules_foreign_cc: 0.15.1 → 0.7.1 (stable version compatible with Bazel 7)
  • rules_python: 0.34.0 (stable, no wheel extraction issues)
  • rules_rust: 0.42.1 (Bazel 7 compatible with patch)
  • rules_cc: 0.0.9 (compatible with rules_rust 0.42.1)
  • bazel_features: 1.21.0 (stable)
  • protobuf: 3.17.3 (stable)
  • rules_fuzzing: 0.5.2 (stable version)
  • platforms: 0.0.10 → 1.0.0 (bzlmod ready)
  • proxy-wasm-cpp-sdk: 7465dee8 (latest WORKSPACE-compatible version)
  • Python version: 3.9 (stable)

New Dependencies for Modern Linting

  • aspect_rules_lint: v1.12.0 (modern clang-tidy integration for Bazel 7)
  • bazel_lib: v3.0.1 (required by aspect_rules_lint)
  • aspect_bazel_lib: v3.0.1 (alias for aspect_rules_js compatibility)
  • aspect_rules_js: v2.1.2 (required by aspect_rules_lint)

WORKSPACE Configuration

Standard load order maintained:

proxy_wasm_cpp_host_repositories()
proxy_wasm_cpp_host_dependencies()
setup_bazel_features()

Infrastructure Changes

  • Created tools/lint/BUILD with hermetic clang-tidy binary configuration
  • Created tools/lint/linters.bzl with clang_tidy aspect configuration
  • Fixed V8 shallow_since syntax for Bazel 7 compatibility (removed timezone)
  • Updated .bazelrc clang-tidy configuration to use aspect_rules_lint
  • Removed all native.bind() calls and updated BUILD file to use canonical dependency labels
  • Updated rules_rust patch for Bazel 7 compatibility

Build Validation

Bazel Upgrade: Successfully upgraded to 7.7.1

Linting Infrastructure: Modern aspect_rules_lint integration configured

Main Library Build: bazel build --config clang-tidy //:lib completes successfully

C++ Tests: Build successfully with clang-tidy

Bzlmod Preparation: native.bind() removed, direct dependency references working

⚠️ Known Limitation: wasm_rust_binary targets (test data) encounter whitelist_function_transition errors with rules_rust 0.42.1 on Bazel 7. This is a known compatibility issue that would require rules_rust 0.67.0+, which in turn requires rules_cc 0.2.x that creates dependency cycles in WORKSPACE mode. Upgrading to rules_rust 0.67.0+ requires migrating to bzlmod (MODULE.bazel). The issue only affects test data generation and does not impact the main library or clang-tidy functionality.

Fixes #466
Fixes #467
Fixes #468

url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.7.1.tar.gz",
sha256 = "32759728913c376ba45b0116869b71b68b1c2ebf8f2bcf7b41222bc07b773d73",
strip_prefix = "rules_foreign_cc-0.15.1",
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.15.1.tar.gz",
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like foreign_cc >=0.14.0 requires multiple additional external dependencies.

0.13.0 appears to be a drop-in replacement without additional dependencies, if that is new enough for macos 15.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

0.13.0 needs bazel feature too it seems

@mmorel-35 mmorel-35 force-pushed the macos-15 branch 9 times, most recently from 896c6af to b7f9cdc Compare December 16, 2025 20:38
@mmorel-35 mmorel-35 changed the title update macos from 13 to 15 Upgrade to Bazel 7.7.1 with modern clang-tidy integration and bzlmod-ready dependencies Dec 16, 2025
…ready dependencies

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@mmorel-35 mmorel-35 marked this pull request as draft December 17, 2025 16:44
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