Skip to content

refactor(semantic): collapse class-table flag into ClassTableBuilder#22909

Merged
graphite-app[bot] merged 1 commit into
mainfrom
feat/semantic-optional-class-table
Jun 2, 2026
Merged

refactor(semantic): collapse class-table flag into ClassTableBuilder#22909
graphite-app[bot] merged 1 commit into
mainfrom
feat/semantic-optional-class-table

Conversation

@Boshen

@Boshen Boshen commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up cleanup to #22862 (which made the oxc_semantic ClassTable optional and off by default). Two small improvements:

  1. Collapse the duplicate flag. feat(semantic): make building the class table optional, off by default #22862 added a build_class_table field on SemanticBuilder that existed only to be OR'd into the ClassTableBuilder::enabled flag that already exists. with_class_table now writes class_table_builder.enabled directly, and build() folds in the checker dependency with enabled |= self.check_syntax_error. One source of truth instead of two flags plus a bridge; behaviour is identical and order-independent.

  2. Fix linter-benchmark fidelity. tasks/benchmark/benches/linter.rs runs ConfigStoreBuilder::all() but built its semantic without the class table, so after feat(semantic): make building the class table optional, off by default #22862 flipped the default the class-dependent rules (no_dupe_class_members, no_unused_private_class_members, max_classes_per_file) silently no-op'd there — the benchmark measured less work than production. Added .with_class_table(true) to match service/runtime.rs.

🤖 Generated with Claude Code

@Boshen Boshen requested a review from Dunqing as a code owner June 2, 2026 07:34
@github-actions github-actions Bot added the A-semantic Area - Semantic label Jun 2, 2026
@codspeed-hq

codspeed-hq Bot commented Jun 2, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 57 untouched benchmarks
⏩ 9 skipped benchmarks1


Comparing feat/semantic-optional-class-table (b09814b) with main (d65064d)

Open in CodSpeed

Footnotes

  1. 9 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.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Jun 2, 2026

Boshen commented Jun 2, 2026

Copy link
Copy Markdown
Member Author

Merge activity

…22909)

## Summary

Follow-up cleanup to #22862 (which made the `oxc_semantic` `ClassTable` optional and off by default). Two small improvements:

1. **Collapse the duplicate flag.** #22862 added a `build_class_table` field on `SemanticBuilder` that existed only to be OR'd into the `ClassTableBuilder::enabled` flag that already exists. `with_class_table` now writes `class_table_builder.enabled` directly, and `build()` folds in the checker dependency with `enabled |= self.check_syntax_error`. One source of truth instead of two flags plus a bridge; behaviour is identical and order-independent.

2. **Fix linter-benchmark fidelity.** `tasks/benchmark/benches/linter.rs` runs `ConfigStoreBuilder::all()` but built its semantic without the class table, so after #22862 flipped the default the class-dependent rules (`no_dupe_class_members`, `no_unused_private_class_members`, `max_classes_per_file`) silently no-op'd there — the benchmark measured less work than production. Added `.with_class_table(true)` to match `service/runtime.rs`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@graphite-app graphite-app Bot force-pushed the feat/semantic-optional-class-table branch from b09814b to a8cb7d6 Compare June 2, 2026 07:43
@graphite-app graphite-app Bot merged commit a8cb7d6 into main Jun 2, 2026
29 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Jun 2, 2026
@graphite-app graphite-app Bot deleted the feat/semantic-optional-class-table branch June 2, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant