Repository navigation
Conversation
…rignore Four leftovers of #47942, which deleted what used or matched them: - The bun_zstd dependency of bun_aot. Its only user was src/aot/report/source_texts.rs. - The --skip of realpath_under_the_marked_root_stays_under_it in scripts/rust-test.ts. The test was in src/sema/standalone/lib.rs. - bun_sql_jsc in the crate list of scripts/rust-test.ts. Its 11 tests were in src/sql_jsc/shared/RowDecoder.rs, so its test program ran no test. - Three entries of .prettierignore that match no file.
|
Updated 9:08 AM PT - Nov 9th, 2026
✅ @robobun, your commit b6d9da592b509c5c01e8673b8ee8c7d0aaf63414 passed in 🧪 To try this PR locally: bunx bun-pr 48355That installs a local version of the PR into your bun-48355 --bun |
|
Status: ready for review. The change passes every CI job that ran. Four jobs of one lane wait for an agent. This pull request has no repro. It deletes 12 lines in 4 files, and nothing uses or matches them on Checks that were run on the head:
CI on this head (Buildkite build 139298):
Two items need a decision and are not in the diff. The Notes of the description give the details:
|
There was a problem hiding this comment.
LGTM — a small, mechanical removal of four stale references, each confirmed dead by reading the tree.
What was reviewed:
bun_zstdinsrc/aot/Cargo.toml: nozstduse insrc/aot, including#[path]-included files, theinclude!-edaot_*codegen outputs andembed_compressed!sites;Cargo.lockchanges only bun_aot's entry.scripts/rust-test.ts: no test namedrealpath_under_the_marked_root_stays_under_itremains anywhere;src/sql_jschas no#[test],cfg(test)or doctest fence (itsRowDecoder.rstests were deleted by #47942), so the row violated the list's own "at least one#[test]" rule..prettierignore: the three removed patterns match no file in the tree; the neighboring kept entries still do.- Not run here:
cargo check/rust:test, so the "still compiles without the dependency" claim rests on the grep, not on a build.
Extended reasoning...
The change touches four files (+1/-12): drops the unused bun_zstd dependency from the bun_aot crate manifest and lockfile, removes a stale --skip filter and a test-less crate from the cargo-test driver script, and deletes three .prettierignore entries whose target fixtures no longer exist. It touches no runtime code and no security-sensitive surface. Every removed item was verified dead by searching the checkout, the base commit (#47942) is where the referenced test, fixtures and zstd callers were deleted, no CODEOWNERS entry covers the changed paths, and the bug hunt ran dry with no findings, which decided approve.
|
On "not run here:
The Buildkite build (#139298) is still in progress. Its |
|
No actionable comments were generated in the recent review. WalkthroughThe changes remove three fixture exclusions from ChangesPrettier fixture exclusions
Rust test runner
AOT dependency declaration
Suggested reviewers: Merge Risk:
|
Problem
bun_zstddependency ofbun_aot.--skip realpath_under_the_marked_root_stays_under_itinscripts/rust-test.ts. The test is gone.bun_sql_jscin the crate list of that script. The crate has no test left..prettierignorethat match no file.Fix
startProgramnow passes[].mainand in the 6,221 open pull requests.bun bd,bun run rust:check-all,bun run rust:test(52 of 52 programs pass). That step compiles 21 fewer units (13 crates) and runs the same 6,005 tests.membersUnderNamesOfTheRuntimehere too (see Background).Behaviour change: none
Background
scripts/rust-test.tsis the cargo-test step of CI. It starts one test program for each listed crate.--skip NAMEleaves out each test whose name contains NAME.hashesOfinscripts/build/rust/units.ts). Sobun_aotcompiles again under new names.membersUnderNamesOfTheRuntime(146 lines, no caller). It is an input of code generation and needs a decision (see Notes).Downsides
#[test]added later undersrc/sql_jscruns in CI only when the crate is back in the list. No open pull request adds one.mainbuild. Its 553 names ofbun_aotmatch nothing for one build. No function loses its place (see Notes).Notes
Removed (12 lines)
mainbun_zstdin[dependencies]ofsrc/aot/Cargo.toml, and its line inCargo.locksrc/aot/report/source_texts.rsthat calledbun_zstd::git grep bun_zstd -- src/aotprogramArgswith its comment,scripts/rust-test.tsfn realpath_under_the_marked_root_stays_under_itatsrc/sema/standalone/lib.rs:143git grep realpath_under_the_marked_root_stays_under_it"bun_sql_jsc"incrates,scripts/rust-test.tssrc/sql_jsc/shared/RowDecoder.rs(460 lines)git grep -c -E '#\[test\]|cfg\(test\)' -- src/sql_jsc.prettierignoretest/aot/parallel/errors/git ls-fileswith each entrybun_sema_standalonekeeps its ownbun_zstddependency. Undercfg(any(test, feature = "test_support"))it compilessrc/runtime/cli/typescript_libs.rsby#[path], and that file callsbun_zstd.bun_zstdstays in the dependency graph ofbun_aotthroughbun_builtin_sources,bun_bundler,bun_semaandbun_sema_standalone, so the build compiles the same crates.bun_zstdto Cargo as an unused extern ofbun_aot, and Cargo does not show it. With the manifest ofmain,cargo check -p bun_aot --all-targetsprints no warning. WithCARGO_LOG=cargo::diagnostics::rules::unused_dependencies=debugit logs "ignoring unused externbun_zstd". The rustc lintunused_crate_dependenciesis not in[workspace.lints.rust].--skipby substring. No test name in the workspace contains the skipped name, so the argument changed nothing.cratesgives the rule: "To add a crate it must have at least one#[test]".bun_lint_react_compileris the other row without a test. Remove dead code from bun_boringssl_sys and bun_lint_react_compiler #47918 already removes it.cargo test --no-run --unit-graphfor the list with and withoutbun_sql_jsc: 287 and 266 units. The 21 units that go are in 13 crates that no other listed crate reaches:bun_bunfig,bun_clap,bun_clap_macros,bun_ini,bun_install,bun_jsc,bun_output,bun_patch,bun_s3_signing,bun_spawn,bun_sql,bun_sql_jscandbun_transpiler. No unit of another crate changes its feature set, so the other test programs are built from the same units.cargo check --workspace --all-targetsin.github/workflows/rust-lints.ymlstill compiles the 13..prettierignoreeach match one file or more.bun fmtskips these folders throughignorePatternsinbunfig.toml, so the entries matter only to a direct run ofprettier.main(inheritOrderFileinscripts/build/ci.ts). A comment there says that the symbol names of a crate change with its dependencies. The self-review measured this change on the canary build of 2596ac5. The order file traced from that build has 553 names ofbun_aotamong 33,176, on 88 of 21,651 ordered addresses (29,247 bytes). They stop matching until CI traces the next build ofmain, and no function loses its place. Each change of a dependency list has this effect.Checks
bun bdbuilds the head.bun:internal-for-testingloads in it.bun run rust:check-all: 12 ok, 0 failed, 0 skipped (of 12).cargo check -p bun_aot --all-targets --all-featuresandcargo check -p bun_aot -p bun_sema_standalone --all-targetson linux-x64. Both also compile the unit tests andtests/ir_tests.rs.bun run rust:teston the head: 52 of 52 test programs pass, with 6,005 tests, 0 ignored and 0 filtered out. The same run before the row was removed had 53 programs and the same 6,005 tests. Each other program has the same count in both runs.test/node_moduleshidden, as in the CI step, which installs only the root packages. With that folder present,lowerintests/ir_tests.rsfails on one fixture, onmaintoo:require("n" + name)intest/aot/ir/lower/modules/names-that-can-only-be-paths/loads.cjsfinds the packages there.cargo metadata --lockedacceptsCargo.lock.tsc -p scripts/tsconfig.json --noEmitreports nothing.prettier --check scripts/rust-test.tspasses.prettier --list-different test/aotprints the same list with the.prettierignoreofmainand with this one.main. None namesbun_zstdforbun_aot, the skipped test, or a path that a removed.prettierignoreentry matches.src/sql_jsc. None of those files has a#[test]or acfg(test).main. It does not bring back the deleted test, a test undersrc/sql_jsc, or a file that a removed entry matches. Its edit ofscripts/rust-test.tsmerges with this branch.mainat that place: Bump WebKit (oven-sh/WebKit#977 preview): a function-typed field that holds a promise's resolve is read without a test #47683 (.prettierignore) and publish: add --provenance (npm provenance via Sigstore keyless signing) #30522 (Cargo.lock).Found in this run, and left alone
membersUnderNamesOfTheRuntimeinsrc/js/internal-for-testing.ts(146 lines). Nothing calls it. AOT: front end, test runs and tests for the rewritten compiler #47942 deleted its one caller,test/aot/parallel/library-modules/members-under-private-names.mjs(4 lines). It is not in this diff because it is also an input of code generation. The build writesaot_builtin_syntax.rsfrom the syntax ofsrc/js, with one row for each private name that a module reads as a member. This function is the only code that writes.$warning,.$writeror.$written, so its removal drops three rows (36 to 33). The typeConsoledeclares$writer(src/js/builtins.d.ts:154), so the AOT layout ofthisin four console functions then changes. No function body changes, and the program grows by 48 bytes. Either restore the 4-line test (it passes on a build ofmain), or delete the function together with a change that makes thewriterrow independent of it.node:http2engine. Insrc/runtime/api/bun/h2/, only the unit tests of those files callConnection::begin_header_block,encode_header,send_header_block,send_dataandsend_push_promise,hpack::Coder::encode,take_pending_size_update,write_table_size_updateandSendWindow::available(about 230 lines with the fieldenc_buf).#![allow(dead_code)]at the top of five files hides them from rustc. The comment atconnection.rs:2143says "The outbound half does not run through this engine yet".resolveComputedSpecifierinbun:internal-for-testing, with its binding insrc/runtime/code_resolver_testing.bind.tsandresolve_computed_specifierin Rust (about 110 lines). No test onmaincalls it. resolver: read package.jsonexportsfor a package found through NODE_PATH #47500 calls it intest/aot/resolver/self-reference-and-node-path.test.ts.test/, which this sweep does not edit. More leftovers of AOT: front end, test runs and tests for the rewritten compiler #47942, and not the full list:test/aot/ways-to-enter-a-function.ts(468 lines) has no importer.test/expected-durations.jsonname deleted tests.scripts/update-test-durations.mjsowns that file.test/aot/fuzz/grids/builds-of-one-program-at-once-make-one-executable.tslists 123 programs oftest/aot/parallel/classes/. 2 of them exist.test/aot/shell/, 35 of the 37 entry lines ofknown-failures.txt,collector-stress-known.txtandcollector-stress-slow.txtname a program that is gone.test/aot/perf/read a folder that is gone (plain-bun-costs,options-spread-over-what-a-literal-already-holds,copies-of-ordinary-objects-in-cold-code,operations).notRecordedinscripts/build/ci-images/spec.ts:2216has no caller since ci: leave the SSH server out of the Linux images #47981. The guide of that folder lists it as one of the five ways to write an identity....rest(src/codegen/bake-codegen.ts:7),...other_constructors(src/codegen/generate-node-errors.ts:131),hasData(src/runtime/bake/bun-bake-react/client.tsx:6),root(src/runtime/bake/bun-framework-react/client.tsx:74).bun_sema::fold::data_value_of,bun_sema::erasure::find_type_ranges,bun_sema::import_sites::find_imports_of_unused_namesandbun_sema_driver::check_whole_files.enum-mapinbun_bunfig,scopeguardinbun_crash_handler,bun_httpandbun_js_printer,bun_uwsinbun_install,const_formatinbun_js_printer.libcinbun_paths.bun_globinbun_lint_react.bstrinbun_http_jsc.bstrinbun_css_jsc.bun_sema_parserinbun_sema_standalone,thiserrorinbun_trim.bun_lint_react_compiler.@gamut nonearm ofdefine_colorspace(Remove dead code from bun_glob and bun_css #46196),formatStackTraceToJSValueWithoutPrepareStackTrace(Remove dead code from bun_core, bun_jsc, bun_css, react_compiler, and two C++ bindings #40367), six environment variables without a reader (Remove dead code from bun_core, bun_jsc, bun_css, react_compiler, and two C++ bindings #40367, Remove dead code from bun_jsc, bun_runtime, bun_core, and the JSC bindings #40824, Remove dead code from bun_url, bun_react_compiler, the class codegen, and bun-error #41169),removable_host_function_definition(Remove dead code: 15 trait impls nothing uses and two C++ overloads #47264),closestincppbind.ts(Remove dead code from the JSC bindings, the codegen scripts, the CI scripts, bun_core, and bun_jsc #40492), eight unreachable statements (Remove dead code from the C++ bindings: 12 unreachable statements #47692).How the candidates were found
bun:internal-for-testing: each of the 110 was searched intest/andbench/. Two have no user there:membersUnderNamesOfTheRuntimeandresolveComputedSpecifier.--gc-sections. Of 1,047,549 text symbols in thebun_*rlibs the link keeps all but 18,200. 227 of those are functions written insrc/(the rest are instances of generics, macro output and generated code). Each has a caller on Windows or macOS, in a unit test, at compile time, or from the debugger helpers inbtjs.rs.cargo check --workspacewith--force-warn dead_code --force-warn unused_macro_ruleson linux-x64, windows-x64 and macos-arm64. Outsideh2/it reports thedefine_colorspacearm and the#[expect(dead_code)]items that are used on another platform..rsfile undersrc/that those three checks did not compile has amodline behind a#[cfg](tests, benches, FreeBSD, fuzzilli).clang -fsyntax-onlyper file with-Wunused-function -Wunused-member-function -Wunused-template -Wunused-macros -Wunneeded-internal-declaration -Wunreachable-code -Wunreachable-code-break -Wunreachable-code-returnover the 623 entries ofcompile_commands.jsonforsrc/andpackages/. 513 compile alone. Each hit is in an open pull request, is used in another translation unit, or is used on another platform (us_quic_send_one).tsc --noUnusedLocalsoverscripts/,scripts/build/,src/,src/js/andsrc/runtime/bake/. Top-level definitions ofscripts/,src/codegen/andsrc/js/whose name occurs once.patches/has a reader. Eachaot/...path inscripts/runner.node.tsexists.Self-review
membersUnderNamesOfTheRuntime(152 lines in total). The review found the table rows and the layout change described above, so the function is out of the diff..prettierignoreentries and for the rows of the crate list without a test. Both are in the diff, apart from the row that Remove dead code from bun_boringssl_sys and bun_lint_react_compiler #47918 holds.test/aot/ways-to-enter-a-function.ts. The sweep does not edittest/.Open sweep pull requests
mainand delete 62,250 lines. 27 merge and delete 2,468 lines. None touches a line of this one. Remove dead code from bun_boringssl_sys and bun_lint_react_compiler #47918 edits the same crate list 14 lines above.[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