Skip to content

Conversation

@not-matthias
Copy link
Member

@not-matthias not-matthias commented Oct 16, 2025

Root cause: The Github release doesn't contain the instrument-hooks submodule, which leads to errors when including a non-existent file. The same can happen for CMake.

What changed:

  • Replaced the git submodule with FetchContent (CMake)
  • Test multiple bazel versions

EDIT: The bazel issue can be fixed using git_repository instead of http_archive.

@not-matthias not-matthias force-pushed the cod-1510-bazel-build-is-broken-on-v130 branch 2 times, most recently from 042628b to 624e319 Compare October 16, 2025 09:00
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 16, 2025

CodSpeed Performance Report

Merging #24 will degrade performances by 39.19%

Comparing cod-1510-bazel-build-is-broken-on-v130 (f615ab6) with main (480ebd8)

Summary

❌ 4 regressions
✅ 148 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Mode Benchmark BASE HEAD Change
Instrumentation BM_sleep_100ms 435.6 µs 706.1 µs -38.32%
Instrumentation BM_sleep_10ms 43.8 µs 70.2 µs -37.55%
Instrumentation BM_sleep_1ms 4.1 µs 6.3 µs -34.99%
Instrumentation BM_sleep_50ms 216.1 µs 355.3 µs -39.19%

@not-matthias not-matthias force-pushed the cod-1510-bazel-build-is-broken-on-v130 branch 3 times, most recently from 6700d5e to 5edaebc Compare October 16, 2025 09:56
@not-matthias not-matthias requested a review from Copilot October 16, 2025 10:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a build failure with Bazel 8 by replacing the instrument-hooks git submodule with proper dependency fetching mechanisms. The root cause was that GitHub releases don't include submodule content, leading to build failures when trying to include non-existent files.

Key Changes:

  • Replaced git submodule with FetchContent for CMake and a Bazel module extension
  • Removed recursive submodule cloning from CI workflows to catch this issue in the future
  • Added testing across multiple Bazel versions (7.6.2, 8.4.2, and 9.0.0 pre-release)

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
core/instrument-hooks Removed the git submodule reference
core/CMakeLists.txt Added FetchContent to dynamically fetch instrument-hooks dependency
core/BUILD Removed local instrument_hooks library definition, now references external dependency
MODULE.bazel Replaced git_override with module extension for instrument_hooks
third_party/extensions.bzl Created Bazel extension to fetch instrument-hooks via git_repository
third_party/instrument_hooks.BUILD Added BUILD file for instrument-hooks external dependency
third_party/BUILD Created package to export third-party configuration files
.github/workflows/ci.yml Removed recursive submodule checkout and added Bazel version matrix testing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@not-matthias not-matthias force-pushed the cod-1510-bazel-build-is-broken-on-v130 branch from 52c41d9 to ec447a9 Compare October 16, 2025 10:34
Copy link
Contributor

@GuillaumeLagrange GuillaumeLagrange left a comment

Choose a reason for hiding this comment

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

olgtm, have we tested on workerd ?

Also, AFAI understand, ci did not fail because we were fetching with the submodule, so
--incompatible_disallow_empty_glob was not triggered right ?

@not-matthias not-matthias force-pushed the cod-1510-bazel-build-is-broken-on-v130 branch 4 times, most recently from 7ee2167 to e7f89ca Compare October 16, 2025 14:53
@anonrig
Copy link
Contributor

anonrig commented Oct 16, 2025

I recommend updating Bazel to the latest version as well (in bazel version file)

@anonrig
Copy link
Contributor

anonrig commented Oct 16, 2025

olgtm, have we tested on workerd ?

Also, AFAI understand, ci did not fail because we were fetching with the submodule, so --incompatible_disallow_empty_glob was not triggered right ?

It didn't probably catch it because bazel version used in this repository is 7, not 8.

@not-matthias not-matthias force-pushed the cod-1510-bazel-build-is-broken-on-v130 branch 2 times, most recently from ecde422 to 5bccea4 Compare October 16, 2025 16:13
@GuillaumeLagrange
Copy link
Contributor

olgtm, have we tested on workerd ?
Also, AFAI understand, ci did not fail because we were fetching with the submodule, so --incompatible_disallow_empty_glob was not triggered right ?

It didn't probably catch it because bazel version used in this repository is 7, not 8.

Yeah, but we do have a .bazelrc rule to explicitly enable this error, because we had the issue in the past 🤔

@not-matthias not-matthias force-pushed the cod-1510-bazel-build-is-broken-on-v130 branch 3 times, most recently from ef11ae1 to 86049c6 Compare October 17, 2025 14:18
@not-matthias not-matthias force-pushed the cod-1510-bazel-build-is-broken-on-v130 branch from 86049c6 to f615ab6 Compare October 20, 2025 12:45
@not-matthias not-matthias merged commit f615ab6 into main Oct 20, 2025
24 of 25 checks passed
@not-matthias not-matthias deleted the cod-1510-bazel-build-is-broken-on-v130 branch October 20, 2025 13:35
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.

4 participants