Remove dead code and deduplicate helpers across src/#31912
Closed
alii wants to merge 18 commits into
Closed
Conversation
Collaborator
Contributor
|
This PR may be a duplicate of:
🤖 Generated with Claude Code |
… fix windows-only unused import
590c8d0 to
3cd193f
Compare
…tatus, and remaining helper consolidations
1157bd2 to
46ad414
Compare
…lenient notice decode
…SON5/YAML space handling, and per-driver sql failure timing
This was referenced Jun 8, 2026
This was referenced Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
A repo-wide cleanup pass over
src/: deleting dead code and consolidating duplicated logic into shared helpers. Net −17,825 lines (206 files, +11,497 / −29,322 vs the base commit).What changed
Dead code removed:
host_fns.rs+ draft types inffi/mod.rs, ~620 lines) — only reference was an unused re-export#[cfg(any())]-parked 1,188-variant MS-ERREF error table insrc/sys/windows/mod.rs(~2,800 lines)WinsockErrortable + caller-less converter (−219)bun_resolver::cache::Fs(every live caller already used the resolver's)Duplication consolidated (monomorphization-preserving — macros/const generics, no vtables added):
OutputTaskVTableimpls → one macro#[inline]generic insrc/parsers/number_scan.rs(diffed against both reference implementations)src/js/internal/sql/shared.ts,src/sql/shared/init_transpilertwins, link/unlink and outdated/update-interactive CLI helper blocks, bundler parse-task dispatch tail, cron/node_fs/CryptoHasher/hosted_git_info helper dedupsVerification
cargo checkwas additionally run forx86_64-pc-windows-msvcandx86_64-unknown-linux-gnu— both pass, all 10 workspace cross-targets greenReviewer notes
src/css/compat.rswas converted from a generatedmatchto a data table (equal-or-faster, verified) — but it's no longer regenerable bybuild-prefixes.jsas-is. If we'd rather keep it generator-owned, I can revert that one commit's hunk or update the generator to emit the table form.bun add/update, postgres NoticeResponse short-length tolerance, macro-map parsing, JSON5/YAML space handling, SQL driver failure timing, pool slot guards — has been reverted to match main exactly. Where a dedup could not preserve behavior, the dedup itself was reverted.#[allow(dead_code)]insrc/router/lib.rs; resolved by deleting the orphaned cfg(test) fixture scaffolding (266 lines, plus its now-unused dev-dependency), not by updating the inventory.bunx.test.ts"requires node 24" failure is pre-existing on main; the darwinAsyncLocalStorage-trackingfs-watch exit segfault is the known FSEventsLoop shutdown race (fs.watch(macOS): make FSEventsLoop Sync and retain the CFRunLoop across shutdown #30758 — identical stack, fault address 0xC, filed before this branch existed; every file in that crash path is byte-identical to main here).