Skip to content

Drop dead bumpalo dep and consolidate duplicate type-alias re-exports - #34806

Merged
dylan-conway merged 1 commit into
mainfrom
claude/farm/75953c63/delete-dead-aliases-4
Jul 20, 2026
Merged

dylan-conway merged 1 commit into
mainfrom
claude/farm/75953c63/delete-dead-aliases-4

Conversation

@robobun

@robobun robobun commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #34763, #34767, #34778.

bumpalo dependency removed

bumpalo is dropped from the workspace root and 10 member crates (ast, base64, bundler, css, js_parser, js_printer, parsers, resolver, shell_parser, sourcemap). The last code-level use was the pub type Bump = bumpalo::Bump alias deleted in #34778; every remaining bumpalo reference in src/ is in a comment (verified: rg 'bumpalo' --type rust src/ | grep -v '//' returns nothing).

TaggedPointer → TaggedPtr

The long-name TaggedPointer alias existed in both bun_ptr and bun_collections, both resolving to tagged_pointer::TaggedPtr. Rewrote the 5 call sites to use TaggedPtr directly and replaced both aliases with plain re-exports of the canonical name:

  • io/posix_event_loop.rs (3 sites, via bun_collections::)
  • runtime/server/mod.rs, runtime/server/NodeHTTPResponse.rs (2 sites, via bun_ptr::)

Duplicate/compat aliases consolidated

  • bun_ast::ToSourceOpts → ToSourceOptions (1 caller in ini/lib.rs)
  • bundler::options::OutputValue → OutputFileValue (2 callers in StandaloneModuleGraph.rs; both names aliased the same output_file::Value on adjacent lines)

Verification

  • bun bd builds
  • bun run rust:check-all passes on all 10 targets

Net: +11 / -39 (including Cargo.lock regen).

No test added: bumpalo was already unreferenced in code (dead dep removal has no fail-before state); the alias rewrites are identity substitutions to the type each alias already resolved to.

Follow-up to #34763, #34767, #34778.

bumpalo dependency removed from workspace root + 10 member crates
(ast, base64, bundler, css, js_parser, js_printer, parsers, resolver,
shell_parser, sourcemap). The last code-level use was the Bump alias
deleted in #34778; all remaining refs are comments.

TaggedPointer -> TaggedPtr: the long-name alias existed in both bun_ptr
and bun_collections; 5 call sites rewritten to the canonical TaggedPtr
and both aliases replaced with direct re-exports.

Duplicate/compat aliases consolidated:
- bun_ast::ToSourceOpts -> ToSourceOptions (1 caller in ini)
- bundler::options::OutputValue -> OutputFileValue (2 callers; both
  aliased the same output_file::Value)
@robobun

robobun commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author
Updated 1:54 AM PT - Jul 20th, 2026

@robobun, your commit adc725d is building: #76185

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@robobun, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c2af7531-d01a-4d4d-b121-9a3a0691ac65

📥 Commits

Reviewing files that changed from the base of the PR and between 01e913e and adc725d.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (20)
  • Cargo.toml
  • src/ast/Cargo.toml
  • src/ast/lib.rs
  • src/base64/Cargo.toml
  • src/bundler/Cargo.toml
  • src/bundler/lib.rs
  • src/collections/lib.rs
  • src/css/Cargo.toml
  • src/ini/lib.rs
  • src/io/posix_event_loop.rs
  • src/js_parser/Cargo.toml
  • src/js_printer/Cargo.toml
  • src/parsers/Cargo.toml
  • src/ptr/lib.rs
  • src/resolver/Cargo.toml
  • src/runtime/server/NodeHTTPResponse.rs
  • src/runtime/server/mod.rs
  • src/shell_parser/Cargo.toml
  • src/sourcemap/Cargo.toml
  • src/standalone_graph/StandaloneModuleGraph.rs

Comment @coderabbitai help to get the list of available commands.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — mechanical dead-dep removal and alias consolidation.

What was reviewed:

  • Verified bumpalo has zero non-comment references in src/**/*.rs; the workspace/member drops are safe.
  • Confirmed the removed aliases (TaggedPointer, ToSourceOpts, OutputValue) have no remaining Rust call sites — the two residual TaggedPointer hits in io/lib.rs and DeferredBatchTask.rs are comments, and the src/jsc/bindings/v8/ hits are an unrelated C++ class.
  • Each rewrite is an identity substitution to the type the alias already resolved to (TaggedPtr, ToSourceOptions, OutputFileValue), so no behavior change is possible.
Extended reasoning...

Overview

Follow-up cleanup to #34778's porting-era alias sweep. Two independent mechanical changes:

  1. Dead dependency removal — bumpalo dropped from workspace Cargo.toml and 10 member-crate Cargo.tomls, with corresponding Cargo.lock regen. The last code-level use (pub type Bump = bumpalo::Bump) was deleted in #34778; grep confirms every remaining reference in src/**/*.rs is inside a comment (mostly "bumpalo::Bump re-export" annotations on bun_alloc::Arena imports, which now describe historical shape rather than a live dep). bumpalo remains in Cargo.lock as a transitive dep of wasm-bindgen-macro-support, which is expected.

  2. Compat-alias consolidation — four pub type X = Y / pub use Y as X re-exports removed after rewriting their handful of callers to the canonical name:

    • bun_ptr::TaggedPointer + bun_collections::TaggedPointer → TaggedPtr (5 call sites across posix_event_loop.rs, server/mod.rs, NodeHTTPResponse.rs; both re-exports now expose TaggedPtr directly)
    • bun_ast::ToSourceOpts → ToSourceOptions (1 caller in ini/lib.rs)
    • bundler::options::OutputValue → OutputFileValue (2 callers in StandaloneModuleGraph.rs; the two pub use output_file::Value as ... lines were adjacent, one is dropped)

Security risks

None. No logic, control flow, validation, or data handling is touched — every code change is a type-name substitution to the same underlying type, plus Cargo manifest line deletions.

Level of scrutiny

Low. This is the definition of a safe mechanical refactor: type aliases are transparent to the compiler, so TaggedPointer::init(..) and TaggedPtr::init(..) compile to identical code. The Rust compiler enforces correctness — a missed call site or a wrong target name would fail rust:check-all (which the PR reports passing on all 10 targets). I independently grepped for stragglers and found none in Rust code.

Other factors

  • No test is expected per REVIEW.md: dead-dep removal has no fail-before state, and identity type substitutions cannot change behavior.
  • The bun_collections::TaggedPtr re-export is preserved (just no longer renamed), so external callers of bun_collections::TaggedPtrUnion etc. are unaffected.
  • The one comment-only edit in server/mod.rs ("TaggedPointer::init" → "TaggedPtr::init") keeps the doc accurate.
  • Follows the repo's "delete dead code in the same PR that makes it dead" and "no re-export shim files" guidance from REVIEW.md.

@dylan-conway
dylan-conway merged commit 505e8e3 into main Jul 20, 2026
56 of 66 checks passed
@dylan-conway
dylan-conway deleted the claude/farm/75953c63/delete-dead-aliases-4 branch July 20, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants