Repository navigation
[build] Break JSG dependency on kj-http - #8694
Conversation
There was a problem hiding this comment.
Superseded by the review of
cc6ec525.
This review, of a9c4fea6
💬 Approved with comments — One WARNING: worker-interface-test and bench-revocable-worker-interface no longer get //src/workerd/util (wait-list.h), so both will fail to build. The shipped targets look correctly wired.
Findings: 1 warning (1 is an inline comment on the diff)
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
🔧 Fix with your agent
Paste the following into your coding agent to investigate and fix these issues.
Fix the following code review issues found in pull request #8694.
Before making changes, review each issue and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g., the fix would require disproportionate changes
for minimal ROI, or the finding is factually incorrect), explain why
- If you need to clarify something before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
## WARNING (1)
### [Code Quality] `worker-interface-test` and `bench-revocable-worker-interface` use `wait-list.h` / `CrossThreadWaitList` but no longer get `//src/workerd/util` through `:worker-interface`, so both will fail to build.
- **File:** src/workerd/io/BUILD.bazel:525
📋 Code Quality: ⚠️ 1 warning
The worker-interface test and benchmark lose their only path to wait-list.h and will fail to build.
Recommendation: 📝 Minor Comments
- [WARNING]
worker-interface-testandbench-revocable-worker-interfaceusewait-list.h/CrossThreadWaitListbut no longer get//src/workerd/utilthrough:worker-interface, so both will fail to build. (src/workerd/io/BUILD.bazel:525)
View full review
src/workerd/io/BUILD.bazel:525 (and the dependents at :533-541)
worker-interface now depends on //src/workerd/util:stream-utils instead of the whole //src/workerd/util target. That is correct for the library: worker-interface.c++ only includes stream-utils.h.
Two targets depend on nothing but :worker-interface, and both still use CrossThreadWaitList:
worker-interface-test.c++:8includes<workerd/util/wait-list.h>and usesCrossThreadWaitListat line 101.bench-revocable-worker-interface.c++:13includes the same header and usesCrossThreadWaitListat line 75.
wait-list.h and wait-list.c++ come only from //src/workerd/util:util. No remaining transitive dependency provides that target: not :trace, not the capnp targets, not stream-utils. Both targets will fail to compile or link.
Fix: add //src/workerd/util to the deps of worker-interface-test and bench-revocable-worker-interface. Don't put it back on the library.
The rest of the re-plumbing looks correct. This covers moving wrapped-binding, access-info, invocation-span, http-util, abortable and stream-utils into their own targets, and the new direct dependencies in api, server and factory.
✅ All other checks passed
🔒 Security: ✅ LGTM
Only build files and include lines change; nothing here affects security.
📖 AGENTS.md: ✅ LGTM
No AGENTS.md updates needed.
⚡ Performance: ✅ LGTM
Only the build is refactored; runtime performance is unaffected.
📝 Documentation: ✅ LGTM
No documentation concerns.
Reviewed commit: a9c4fea6
a9c4fea to
cc6ec52
Compare
There was a problem hiding this comment.
Superseded by the review of
2f05d09a.
This review, of cc6ec525
✅ Approved — The only earlier finding, the missing //src/workerd/util dependency on the worker-interface test and benchmark, is fixed, and the rest of the dependency changes look correct.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
Only build files and include lines change; nothing here affects security.
📖 AGENTS.md: ✅ LGTM
No AGENTS.md updates needed.
📋 Code Quality: ✅ LGTM
The earlier warning is fixed: worker-interface-test and bench-revocable-worker-interface now list //src/workerd/util in their deps. The rest of the target splits and dependency narrowing (http-util, stream-utils, abortable, wrapped-binding, autogate, thread-scopes) look correct.
⚡ Performance: ✅ LGTM
This is a build-only refactor, so runtime performance is unaffected.
📝 Documentation: ✅ LGTM
No documentation concerns.
Reviewed commit: cc6ec525
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8694 +/- ##
==========================================
- Coverage 67.34% 67.33% -0.01%
==========================================
Files 836 836
Lines 213706 213706
Branches 32485 32485
==========================================
- Hits 143922 143907 -15
- Misses 50687 50702 +15
Partials 19097 19097 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cc6ec52 to
2f05d09
Compare
There was a problem hiding this comment.
Superseded by the review of
9b752ea8.
This review, of 2f05d09a
✅ Approved — This is a build-only refactor. The new target splits and dependency changes are consistent: each split-off header has a matching target, and its consumers declare it as a dependency. The finding from the earlier review, the missing util dependency on the worker-interface test and benchmark, has been fixed.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
Only build files and include lines change, so nothing here affects security.
📖 AGENTS.md: ✅ LGTM
No AGENTS.md updates needed.
📋 Code Quality: ✅ LGTM
The util package now has separate stream-utils, canceler, abortable and http-util targets. The io package now has separate async-trace-inspector, async-trace-stacks, access-info and invocation-span targets. The api package now has separate wrapped-binding and crypto-endianness targets. The targets that use each of them depend on them. abortable.h now includes canceler.h by its workspace-rooted path. worker-interface-test and bench-revocable-worker-interface now list //src/workerd/util in their deps. The includes removed from the source files are not used there.
⚡ Performance: ✅ LGTM
This is a build-only refactor and has no runtime performance impact.
📝 Documentation: ✅ LGTM
No documentation concerns.
Reviewed commit: 2f05d09a
There was a problem hiding this comment.
Superseded by the review of
136d7f1d.
This review, of 9b752ea8
✅ Approved — This is a build-only refactor with no issues found. The new .bazelrc change sets one consistent Windows API level in place of hiding macro-redefinition warnings.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
Only build configuration and include lines change, so nothing here affects security.
📖 AGENTS.md: ✅ LGTM
No AGENTS.md updates needed.
📋 Code Quality: ✅ LGTM
The target splits and dependency changes are consistent. The new .bazelrc setting gives all Windows compilation units one _WIN32_WINNT value (0x0A00), and the comment explains why.
⚡ Performance: ✅ LGTM
This is a build-only change and has no runtime performance impact.
📝 Documentation: ✅ LGTM
No documentation concerns.
Reviewed commit: 9b752ea8
|
Nit: |
|
Nit: workerd/.github/workflows/_bazel.yml Line 237 in b3fd7cd |
9b752ea to
136d7f1
Compare
There was a problem hiding this comment.
Superseded by the review of
62a034a6.
This review, of 136d7f1d
✅ Approved — This is a build-only refactor and no issues were found. Recent changes follow the approver's suggestions on implementation_deps and on the parse_headers CI step.
Not opened by the correctness review: 4 changed files it was meant to read
src/workerd/api/BUILD.bazelsrc/workerd/io/BUILD.bazelsrc/workerd/server/BUILD.bazelsrc/workerd/server/factory/BUILD.bazel
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
Only build configuration and include lines change, so nothing here affects security.
📖 AGENTS.md: ✅ LGTM
No AGENTS.md updates needed.
📋 Code Quality: ✅ LGTM
Each removed http-util.h include is in a file that does not use the helpers. stream-utils, canceler and abortable are declared by every target that includes them. autogate can depend on sentry and zlib-router through implementation_deps because its header includes neither. The .bazelrc change sets one _WIN32_WINNT value in place of hiding macro-redefinition warnings. The parse_headers CI step now lists the new util targets.
⚡ Performance: ✅ LGTM
This is a build-only change and has no runtime performance impact.
📝 Documentation: ✅ LGTM
No documentation concerns.
Reviewed commit: 136d7f1d
136d7f1 to
62a034a
Compare
There was a problem hiding this comment.
Superseded by the review of
11dc10b4.
This review, of 62a034a6
✅ Approved — This is a build-only refactor: it splits Bazel targets, removes unused includes and makes the Windows API level definition consistent. No issues were found, and the latest change to the test fixture BUILD deps matches what the fixture includes.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
Only Bazel targets, .bazelrc, the CI workflow and #include lines change. Nothing here affects security.
📖 AGENTS.md: ✅ LGTM
No AGENTS.md updates are needed.
📋 Code Quality: ✅ LGTM
I compared the util target split and the removed http-util.h includes against every file that includes the affected headers.
- New util targets: Every file that includes
stream-utils.h,abortable.h,canceler.horhttp-util.hhas a matching BUILD dependency. worker-interface: Dropping//src/workerd/utilis safe, because the header no longer needs it. kj-http still comes in throughhttp-over-capnp.- Removed
http-util.hincludes: None of the files that lost the include still use its helpers. autogate: Movingsentryandzlib-routertoimplementation_depsmatches what its header includes.tests/BUILD.bazel: The newstream-utilsimplementation_depson the test-fixture targets match the include intest-fixture.c++.
⚡ Performance: ✅ LGTM
This is a build-only change and has no runtime performance impact.
📝 Documentation: ✅ LGTM
No documentation concerns.
Reviewed commit: 62a034a6
There's no reason for this to be included
Hopefully the comment will encourage people to not add files to io that don't need to be there
This fixes an implicit dependency of api/crypto/endianness.c++ on V8 since it depends on a recent API level for some functions it uses. rules_cc expects us to pass the full /D argument instead of just the value.
62a034a to
11dc10b
Compare
There was a problem hiding this comment.
✅ Approved — This is a build-only refactor: it splits Bazel targets, removes unused includes and makes the Windows API level definition consistent. No issues were found, and the latest change to the test fixture BUILD deps matches what the fixture includes.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
Only Bazel targets, .bazelrc, the CI workflow and #include lines change. Nothing here affects security.
📖 AGENTS.md: ✅ LGTM
No AGENTS.md updates are needed.
📋 Code Quality: ✅ LGTM
I compared the util target split and the removed http-util.h includes against every file that includes the affected headers.
- New util targets: Every file that includes
stream-utils.h,abortable.h,canceler.horhttp-util.hhas a matching BUILD dependency. worker-interface: Dropping//src/workerd/utilis safe, because the header no longer needs it. kj-http still comes in throughhttp-over-capnp.- Removed
http-util.hincludes: None of the files that lost the include still use its helpers. autogate: Movingsentryandzlib-routertoimplementation_depsmatches what its header includes.tests/BUILD.bazel: The newstream-utilsimplementation_depson the test-fixture targets match the include intest-fixture.c++.
⚡ Performance: ✅ LGTM
This is a build-only change and has no runtime performance impact.
📝 Documentation: ✅ LGTM
No documentation concerns.
Reviewed commit: 11dc10b4 — same changes as 62a034a6, so this is that commit's review (no new review was run; line numbers are as of 62a034a6)
This was intended to also cover zlib but that doesn't work atm due to a transitive dependency via autogate