bundler: inline ungate_support into bundle_v2 and lib.rs, delete the file (#31529)
## What `src/bundler/ungate_support.rs` was a porting-reference grab-bag: value types extracted from `bundle_v2.zig` so the sibling `.rs` modules could compile, plus a set of crate-name alias shims, all glob-re-exported at the crate root via `pub use ungate_support::*` in `lib.rs`. This dissolves that file into its natural homes and deletes it. ## How **Value types → `bundle_v2.rs`** (next to their `bundle_v2.zig` counterparts, inside the existing `bv2_impl` module that `bundle_v2.rs` already re-exported them through): `PartRange`, `StableRef`, `ImportTracker`, `CompileResult`, `CompileResultForSourceMap`(+columns), `ContentHasher`, `WrapKind`, `DeclInfo`/`DeclInfoKind`, `CrossChunkImport`/`CrossChunkImportItem`, the `entry_point` and `js_meta` submodules, and the free functions `generic_path_with_pretty_initialized` / `target_from_hashbang` / `write_escaped_namespace`. **Crate-name alias shims → `lib.rs` crate root** (where the other cross-cutting re-exports like `Index`, `options`, `bake_types` already live): `bun_fs`, `bun_css`, `perf`, `bun_renamer`, `html_import_manifest`, `html_scanner`, `cross_chunk_import`, `index`, `part`, `import_record`, `JSAst`, `UseDirective`, `MangledProps`, `PathTemplate`, `EventLoop`. **Dropped** the unused `bun_str` / `bun_output` aliases (zero references). All porting-reference comments in the moved code are removed, and the now-stale comments elsewhere that referenced `ungate_support` are cleaned up. ## No behavior change This is a pure relocation. Every item keeps its original visibility (`pub`/`pub(crate)`) and the crate-root spellings callers use (`crate::bun_fs`, `crate::WrapKind`, `crate::js_meta::Flags`, …) are unchanged — the ~50 call sites were only repointed from `crate::ungate_support::X` to `crate::X` where the glob previously placed them. ## Verification - `cargo check -p bun_bundler`: clean, zero warnings - `bun bd`: full debug build succeeds - `bun bd test test/bundler/bundler_edgecase.test.ts`: 103 pass / 0 fail - `bun bd test test/bundler/bundler_splitting.test.ts` (cross-chunk CSS, entry points — exercises the moved `CrossChunkImport`/`StableRef`/`ContentHasher`): 10 pass / 0 fail
R
robobun committed
4845d4fdaa06b590366aafea51bc11e6f2593080
Parent: d4b3a3e
Committed by GitHub <noreply@github.com>
on 5/29/2026, 1:11:37 AM