Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Status: ready for review. Pull request: #47918. How the dead code was confirmed on
CI: build 137518 has 28 red test files. All 28 are also red in build 137481 of |
There was a problem hiding this comment.
LGTM, a straightforward dead-code removal.
What was reviewed:
EVP_MD_do_all_sorted: no remaining reference outsidevendor/(including cfg-gated Rust and C++), so the extern declaration is unused.bun_lint_react_compiler: no#[test],cfg(test), doctest blocks, orbun_sema*imports remain after a47a315 deletedcode_generation.rs, so the dev-deps and therust-test.tsrow are consistent with the list's own rule.- Hand-edited
Cargo.lock: the remaining six entries matchCargo.tomlexactly and stay sorted;bun_sema_standaloneis still a path dep of several other crates, so cargo would not drop its package entry.
Extended reasoning...
The change is a 14-line pure deletion across four files: one unused extern "C" declaration in the BoringSSL FFI block, an unused [dev-dependencies] section with its three Cargo.lock edges, and one row in the rust:test crate list. It touches the crypto FFI surface only by removing a declaration nothing calls, so there is no behavioral or security-relevant change. The removals were cross-checked against repo-wide searches and the commits that orphaned the code (01ec085 and a47a315), the lockfile edit matches the manifest, and none of the files fall under CODEOWNERS; the bug hunt exited on dry_streak with no findings.
Problem
bun_boringssl_sysdeclaresEVP_MD_do_all_sorted. node:crypto, webcrypto: a fourth batch of Node compatibility fixes #47671 removed the last caller.bun_lint_react_compilerhas three dev-dependencies and a row inscripts/rust-test.ts. AOT: bun test --aot on large suites, module loading fixes, fuzzer fixes #47316 deleted the only tests of the crate, socargo testruns a test program with 0 tests for it.Fix
[dev-dependencies]section with its threeCargo.locklines, and the row: 14 lines in 4 files.boringssl.rs:3-6says the file declares only what the Rust crates use, andrust-test.ts:32says a listed crate must have a#[test].mainb9f2ec3:bun bd,bun run rust:check-all(12 targets),bun run rust:test(50 of 50 test programs pass).Behaviour change: none
Background
scripts/rust-test.tsrunscargo testfor a fixed list of crates that link without JavaScriptCore.Downsides
bun_lint_react_compilermust add its dev-dependencies and the row again.Notes
Removed (14 lines)
src/boringssl_sys/boringssl.rs(-4). The declaration ofEVP_MD_do_all_sorted. Orphaned by node:crypto, webcrypto: a fourth batch of Node compatibility fixes #47671 (01ec085, 2026-11-02), which rewrotecrypto.getHashes()and removed the call innode_crypto_binding.rs.src/lint/react_compiler/Cargo.toml(-6) andCargo.lock(-3). The[dev-dependencies]section. Orphaned by AOT: bun test --aot on large suites, module loading fixes, fuzzer fixes #47316 (a47a315, 2026-10-31), which deletedcode_generation.rs, the only file of the crate with a#[test]. No source of the crate names one of the three crates.scripts/rust-test.ts(-1). The"bun_lint_react_compiler"row. The crate has no test, so its test program ran 0 tests.Checks
mainb9f2ec3. The results below are for that commit and expire with each rebase.rg -w EVP_MD_do_all_sorted src packages scripts build/debug/codegen: no hit.rg 'bun_lint_react_compiler' scripts .buildkite test/internal: no hit.rg '#\[test\]|cfg\(test\)' src/lint/react_compiler: no hit.bun bdbuilds.test/js/node/crypto/crypto.test.ts(467 pass) andtest/js/node/crypto/hash-and-buffer-short-roads.test.ts(22 pass, 1 skip) pass on the debug build.bun run rust:check-all: 12 of 12 targets pass.cargo check --workspace --all-targetspasses on the host.bun run rust:test: 50 of 50 test programs pass, 5,509 tests.mainwere searched.EVP_MD_do_all_sorted. None is a caller of this declaration: Rewrite the uSockets core in Rust #34037 declares its own insrc/bssl/bindings/wrapper_*.rs, node:crypto: accept BLAKE2 digests in createHmac and list them in getHashes() #32882 adds a comment, multilanguage test #31588 adds OpenSSL sources of a vendored Node.js.bun_sema*insrc/lint/react_compiler, and none adds abun_lint_react_compilerrow.git merge-tree) of the 153 heads that change one of the four files: none gains a conflicted file.maindefines, or an open pull request already makes the deletion.Found dead in this run, and left alone
globalThis.__lastIdandglobalThis.__getIdinsrc/js/node/child_process.ts(4 lines): http: consolidate the open fetch, Bun.serve, node:http, node:http2 and HTTP/3 pull requests #46528 and net, tls: consolidate the open node:net, node:tls, Bun.connect, Bun.listen and usockets pull requests #46522 delete the whole debug block.<Class>_getterfunctions thatWEBCORE_GENERATED_CONSTRUCTOR_GETTERdefines inZigGlobalObject.cpp.addBuiltinGlobals()installs 12. Resolve runtime globals in builtin modules to the intrinsic, not globalThis #40303 removes every getter from the macro.BunBuiltinNames.hthat nothing reads (basename,extname,format,isAbsolute,join,normalize,parse,relative,toNamespacedPath): node:path: rewrite on JSString storage in Rust, match Node.js v26 exactly, ~3x faster #37305 deletes them.pub extern crate bun_core as bun_strinsrc/sys/lib.rs(4 lines): Remove cross-crate layering workarounds #33152 deletes it, and Remove libuv on Windows #47776 edits the line beside it. It can go after Remove libuv on Windows #47776 lands.Ninja.always()inscripts/build/ninja.ts(19 lines): feat: add initial HarmonyOS (OHOS) support #30917 calls it atscripts/build/source.ts:797and:1461.macro(env)inBunBuiltinNames.h: bun:dom and the Vitest work in one tree (not for merging) #45415 callsenvPublicName().macro(stream): Remove dead code from the class and sink generators, JSBuffer, the bake client, bun-error, and the build scripts #43378 and Remove dead code from bun_css, bun_react_compiler, bun_jsc, and smaller crates #40690 own its two declarations inbuiltins.d.ts.--gc-sectionslink drops 14 of the 24convertToInteger*specializations, and nothing namesIDLByte,IDLShortorIDLLongLongonmain. bun:dom and the Vitest work in one tree (not for merging) #45415 defines these forms again, and bindgen: deleteb.anyand.variadic#46789 namesIDLLongLongfor the bindgeni64.E*errno aliases insrc/errno/windows_errno.rs. Each table gives every platform the same names, so single rows stay.scripts/gamble.ts,scripts/debug-coredump.ts,scripts/github-metrics.ts,scripts/trace.sh, andscripts/lldb-inline-tool.cppwithscripts/lldb-inline.sh.logPrefixparameter ofdownloadWithRetry, six unused re-export specifiers inscripts/build/trim/, and four duplicate lines at.gitignore:141-144. Each is free of open pull requests as far as this run checked, but none belongs to the two crates of this pull request.How the candidates were found
fn,const,staticand type got#[deprecated]with its own note (91,738 items, and 2,097 trait methods in a second pass).cargo check --workspacethen reports each resolved use. The passes: the 12 target triples,--all-targets,--all-features, and all custom--cfgflags together. An item is dead when every use of it is inside another dead item. Result: 161 items, of which open dead-code pull requests delete 124. 7 trait methods are never called, and open pull requests delete all 7.-Wl,--gc-sections -Wl,--print-gc-sections, andclang -fsyntax-only -Wunused-function -Wunused-member-function -Wunused-templateover 624 translation units. Result: 277 hand-written functions with no reference on linux-x64, of which open pull requests delete 179.src/js,packages/bun-usockets,packages/bun-uws,scripts/and the Cargo manifests. Each found its area exhausted. The dev-dependencies come from the manifest pass..rsfile outside a module tree, nomacro_rules!that nothing invokes apart from the one in Remove dead code: 15 trait impls nothing uses and two C++ overloads #47264, and no non-Rust file undersrc/that nothing names apart from the.idlcopies in Remove dead code from the inspector agent, the WebKit IDL copies, and an orphaned package #41064.Self-review
main, the checks were run again on it, and the checks over every open head are stated with their time and commit..gitignorelines and thescripts/build/trim/specifiers. They are a different subject.maintrims the WebIDL converter family or keeps it as upstream has it, whether a pull request that conflicts withmainstill holds an item, what to do with the 53 open dead-code pull requests that conflict withmain, a ruling on the hand-run tools, a check in the builtins codegen for unread names, and where later runs read the holds of earlier runs.[policy-decision:dep] gate passed · iteration 0 · 4 files touched
passes on PR (with fix)
Dependency/toolchain change; no test proof to run.diff hotspot
gate history · 1 passed · 0 rejected · iteration 0
evidence per changed file