Skip to content

[build] Update perfetto, enable proto toolchain resolution#6245

Merged
fhanau merged 1 commit intomainfrom
felix/030326-build-perfetto
Mar 10, 2026
Merged

[build] Update perfetto, enable proto toolchain resolution#6245
fhanau merged 1 commit intomainfrom
felix/030326-build-perfetto

Conversation

@fhanau
Copy link
Contributor

@fhanau fhanau commented Mar 4, 2026

This matches what we have downstream, will allow us to use pre-compiled protoc instead of having to compile it ourselves on builds that use perfetto.

This matches what we have downstream, will allow us to use pre-compiled protoc
instead of having to compile it ourselves on builds that use perfetto.
@fhanau fhanau requested review from a team as code owners March 4, 2026 23:16
@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 4, 2026

ResolveMessage: Cannot find module '@opencode-ai/plugin' from '/home/runner/work/workerd/workerd/.opencode/tools/bazel-deps.ts'

github run

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 4, 2026

@fhanau Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@fhanau fhanau mentioned this pull request Mar 4, 2026
@fhanau fhanau requested a review from npaun March 10, 2026 19:27
@fhanau
Copy link
Contributor Author

fhanau commented Mar 10, 2026

This should unblock automated dependency updates – the perfetto patch issues were what caused the job to fail in https://github.com/cloudflare/workerd/actions/runs/22869275300/job/66344435692.

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 10, 2026

Now I have the full picture. The protobuf BCR version "33.4" is what the PR uses for perfetto_cfg. The .bazelrc comment says "starting with protobuf v34.0" for prebuilt protoc - but the flag --incompatible_enable_proto_toolchain_resolution was actually introduced earlier (around v29.0/BCR numbering). The comment about "v34.0" likely refers to when prebuilt protoc becomes fully supported/default. Let me verify whether 33.4 actually has prebuilt protoc support with this flag:

The key question is: does protobuf 33.4 properly support --incompatible_enable_proto_toolchain_resolution? Looking at the v29.0 release notes, this flag was supported starting v29.0, so 33.4 should be fine. The comment in .bazelrc says "starting with protobuf v34.0" which might be slightly misleading about the minimum version, but since 34.0 is when it will become better integrated/default, the comment is referring to the broader trajectory, not a strict requirement.

Let me also verify that the protobuf version is consistent between build/perfetto/MODULE.bazel and the patch:

Both build/perfetto/MODULE.bazel and the patch in 0001-Don-t-attempt-to-use-rules_android.patch use protobuf version 33.4 - they are consistent.

The PR looks clean overall:

  1. Perfetto updated from v53.0 to v54.0 with updated hash and strip_prefix
  2. Protobuf bumped from 33.1 to 33.4 in both build/perfetto/MODULE.bazel and the patch
  3. The --incompatible_enable_proto_toolchain_resolution flag enables prebuilt protoc
  4. Patches rebased cleanly onto the new perfetto version
  5. CI is passing

The .bazelrc comment "starting with protobuf v34.0" is slightly inaccurate since the feature is being enabled right now with protobuf 33.4, but it's describing when prebuilt protoc becomes the fully baked/default path rather than when the flag is available. This is a minor comment nit, not a real issue.

LGTM

github run

@fhanau fhanau merged commit d3541a4 into main Mar 10, 2026
48 of 52 checks passed
@fhanau fhanau deleted the felix/030326-build-perfetto branch March 10, 2026 20:14
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