Skip to content

refactor(semantic): remove unnecessary code#18096

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/01-16-refactor_semantic_remove_unnecessary_code
Jan 16, 2026
Merged

refactor(semantic): remove unnecessary code#18096
graphite-app[bot] merged 1 commit intomainfrom
om/01-16-refactor_semantic_remove_unnecessary_code

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jan 16, 2026

Follow-on after #18058. visit_ts_enum_body method added to SemanticBuilder in that PR is unnecessary, as it's identical to the default implementation provided by Visit trait. Remove it.

@github-actions github-actions bot added A-semantic Area - Semantic C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 16, 2026
Copy link
Member Author

overlookmotel commented Jan 16, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel marked this pull request as ready for review January 16, 2026 16:42
Copilot AI review requested due to automatic review settings January 16, 2026 16:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes a custom visit_ts_enum_body implementation from SemanticBuilder to rely on the default implementation from the Visit trait. The PR description states the custom implementation is identical to the default, but this is actually a bug fix as the removed custom implementation was missing a visit_span call that the default implementation includes.

Changes:

  • Removed custom visit_ts_enum_body method from SemanticBuilder in builder.rs
Comments suppressed due to low confidence (1)

crates/oxc_semantic/src/builder.rs:1

  • The removed custom implementation was missing a visit_span(&body.span) call that exists in the default walk_ts_enum_body implementation. While removing this code is correct (allowing the default implementation to be used), the PR description is misleading as it states the implementations are 'identical' when in fact the custom implementation had a bug (missing span visit). The removal is actually a bug fix, not just removal of unnecessary code. Consider updating the PR description to clarify this is fixing a missing span visit rather than just removing duplicate code.
//! Semantic Builder

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overlookmotel overlookmotel self-assigned this Jan 16, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 16, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing om/01-16-refactor_semantic_remove_unnecessary_code (8e94bb7) with main (08dad63)

Summary

✅ 42 untouched benchmarks
⏩ 3 skipped benchmarks1

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jan 16, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 16, 2026

Merge activity

Follow-on after #18058. `visit_ts_enum_body` method added to `SemanticBuilder` in that PR is unnecessary, as it's identical to the default implementation provided by `Visit` trait. Remove it.
@graphite-app graphite-app bot force-pushed the om/01-16-refactor_semantic_remove_unnecessary_code branch from 8e94bb7 to 4a312a0 Compare January 16, 2026 16:53
@graphite-app graphite-app bot merged commit 4a312a0 into main Jan 16, 2026
21 checks passed
@graphite-app graphite-app bot deleted the om/01-16-refactor_semantic_remove_unnecessary_code branch January 16, 2026 17:00
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants