Skip to content

Comments

chore(oxc_linter): move Message::from_tsgo_lint_diagnostic behind the language_server feature flag#13374

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-29-chore_oxc_linter_move_message_from_tsgo_lint_diagnostic_behind_the_language_server_feature_flag
Aug 29, 2025
Merged

chore(oxc_linter): move Message::from_tsgo_lint_diagnostic behind the language_server feature flag#13374
graphite-app[bot] merged 1 commit intomainfrom
08-29-chore_oxc_linter_move_message_from_tsgo_lint_diagnostic_behind_the_language_server_feature_flag

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Aug 29, 2025

fixes the warning when running the command:

~/dev/oxc$ cargo test -p oxlint
warning: associated function `from_tsgo_lint_diagnostic` is never used
   --> crates/oxc_linter/src/tsgolint.rs:569:8
    |
567 | impl Message<'_> {
    | ---------------- associated function in this implementation
568 |     /// Converts a `TsGoLintDiagnostic` into a `Message` with possible fixes.
569 |     fn from_tsgo_lint_diagnostic(val: TsGoLintDiagnostic, source_text: &str) -> Self {
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

@github-actions github-actions bot added the A-linter Area - Linter label Aug 29, 2025
Copy link
Member Author

Sysix commented Aug 29, 2025


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.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Aug 29, 2025
@Sysix Sysix marked this pull request as ready for review August 29, 2025 00:10
Copilot AI review requested due to automatic review settings August 29, 2025 00:10
@Sysix Sysix requested a review from camc314 as a code owner August 29, 2025 00:10
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 fixes a dead code warning by placing the Message::from_tsgo_lint_diagnostic method behind the language_server feature flag. The method was only used in language server contexts but wasn't conditionally compiled, causing a warning when building without that feature.

  • Moved imports for Message, PossibleFixes, and language server types behind the feature flag
  • Added #[cfg(feature = "language_server")] attribute to the Message implementation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 29, 2025

CodSpeed Instrumentation Performance Report

Merging #13374 will degrade performances by 11.94%

Comparing 08-29-chore_oxc_linter_move_message_from_tsgo_lint_diagnostic_behind_the_language_server_feature_flag (100f9cc) with main (1fca9b8)1

Summary

❌ 2 regressions
✅ 36 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
mangler[RadixUIAdoptionSection.jsx] 14.5 µs 15.1 µs -3.65%
mangler[cal.com.tsx] 3.4 ms 3.8 ms -11.94%

Footnotes

  1. No successful run was found on main (100f9cc) during the generation of this report, so 1fca9b8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Aug 29, 2025
Copy link
Member

Boshen commented Aug 29, 2025

Merge activity

…he language_server feature flag (#13374)

fixes the warning when running the command:

```
~/dev/oxc$ cargo test -p oxlint
warning: associated function `from_tsgo_lint_diagnostic` is never used
   --> crates/oxc_linter/src/tsgolint.rs:569:8
    |
567 | impl Message<'_> {
    | ---------------- associated function in this implementation
568 |     /// Converts a `TsGoLintDiagnostic` into a `Message` with possible fixes.
569 |     fn from_tsgo_lint_diagnostic(val: TsGoLintDiagnostic, source_text: &str) -> Self {
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default
```
@graphite-app graphite-app bot force-pushed the 08-29-chore_oxc_linter_move_message_from_tsgo_lint_diagnostic_behind_the_language_server_feature_flag branch from d5f316a to 100f9cc Compare August 29, 2025 03:24
@graphite-app graphite-app bot merged commit 100f9cc into main Aug 29, 2025
24 checks passed
@graphite-app graphite-app bot deleted the 08-29-chore_oxc_linter_move_message_from_tsgo_lint_diagnostic_behind_the_language_server_feature_flag branch August 29, 2025 03:29
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 29, 2025
graphite-app bot pushed a commit that referenced this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter 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