Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Apr 6, 2025

closes #7118

Added tests for:

  • (language_server & VSCode) nested configuration
  • (language_server & VSCode) nested configuration extends
  • (language_server) without nested configuration

The implementation requires at the moment a feature flag for oxc_linter. I added documentation in runtime.rs to let others know why this is needed. Maybe someone can refactor it to avoid the flag. My first idea is a Trait for file system, but you guys know what to do <3

grafik

@github-actions github-actions bot added A-linter Area - Linter A-editor Area - Editor and Language Server C-enhancement Category - New feature or request labels Apr 6, 2025
Copy link
Member Author

Sysix commented Apr 6, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Apr 6, 2025

CodSpeed Instrumentation Performance Report

Merging #10268 will not alter performance

Comparing 04-06-feat_language_server_use_linter_runtime (bb8a078) with main (0a42695)

Summary

✅ 36 untouched benchmarks

@Sysix Sysix force-pushed the 04-06-feat_language_server_use_linter_runtime branch 2 times, most recently from 89c16bd to 79ef26f Compare April 6, 2025 16:49
@camchenry
Copy link
Member

Just commenting here to say I think this is generally the right direction: we should use the same runtime as oxlint, which should also enable us to use the cross-module analysis for import plugin and such. We'll probably need to implement a walker for getting all lintable files though. Then, the other hard part is determining which files need to be re-linted based on which file was saved.

@Sysix Sysix force-pushed the 04-06-feat_language_server_use_linter_runtime branch from 79ef26f to ee3a35a Compare April 7, 2025 17:38
@Sysix Sysix changed the base branch from main to graphite-base/10268 April 8, 2025 19:29
@Sysix Sysix force-pushed the graphite-base/10268 branch from 876b6ea to 8bb564b Compare April 8, 2025 19:29
@Sysix Sysix force-pushed the 04-06-feat_language_server_use_linter_runtime branch from ee3a35a to ece9032 Compare April 8, 2025 19:29
@Sysix Sysix changed the base branch from graphite-base/10268 to 04-08-refactor_linter_send_message_for_diagnosticservice April 8, 2025 19:29
@Sysix Sysix force-pushed the 04-08-refactor_linter_send_message_for_diagnosticservice branch from d9b0ef8 to 4077f39 Compare April 8, 2025 19:35
@Sysix Sysix force-pushed the 04-06-feat_language_server_use_linter_runtime branch 2 times, most recently from 29d4877 to c12bf89 Compare April 8, 2025 19:39
@Sysix Sysix force-pushed the 04-08-refactor_linter_send_message_for_diagnosticservice branch from abbac7d to 5e435f1 Compare April 8, 2025 19:39
@Sysix Sysix force-pushed the 04-06-feat_language_server_use_linter_runtime branch from c12bf89 to b26c940 Compare April 8, 2025 22:14
@Sysix Sysix force-pushed the 04-08-refactor_linter_send_message_for_diagnosticservice branch from 5e435f1 to 942fb45 Compare April 8, 2025 22:14
@Sysix
Copy link
Member Author

Sysix commented Apr 8, 2025

We'll probably need to implement a walker for getting all lintable files though. Then, the other hard part is determining which files need to be re-linted based on which file was saved.

I thought about that. My preferred way is to handle it inside the runtime.
When oxlint uses a command like npx oxlint /some/deep/folder/ and the files inside using imports like ../<filename> we should still analyze them.
We can give the runtime with the paths a good hint to pre-work the files, but I do not think we can solve that completely without reading files when needed.
I found already some code in the runtime to diff between only semantics vs lint files. Maybe the goal to it is not so far away.

@Sysix Sysix changed the base branch from 04-08-refactor_linter_send_message_for_diagnosticservice to graphite-base/10268 April 9, 2025 23:08
@Sysix Sysix force-pushed the graphite-base/10268 branch from 942fb45 to d48e886 Compare April 10, 2025 21:33
@Sysix Sysix force-pushed the 04-06-feat_language_server_use_linter_runtime branch from b26c940 to 6654d6c Compare April 10, 2025 21:33
@Sysix Sysix changed the base branch from graphite-base/10268 to main April 10, 2025 21:34
@Sysix Sysix force-pushed the 04-06-feat_language_server_use_linter_runtime branch 4 times, most recently from e71ae59 to 39433d9 Compare April 11, 2025 00:48
@Sysix Sysix force-pushed the 04-06-feat_language_server_use_linter_runtime branch 2 times, most recently from c621b92 to 58ab118 Compare April 13, 2025 20:23
@Sysix Sysix changed the base branch from 04-13-test_editor_refactor_tests_to_use_fixtures to graphite-base/10268 April 13, 2025 20:46
@Sysix Sysix force-pushed the 04-06-feat_language_server_use_linter_runtime branch from 58ab118 to b852314 Compare April 13, 2025 20:47
@Sysix Sysix changed the base branch from graphite-base/10268 to 04-13-fix_language_server_diable_nested_configuration_when_config_path_is_provided April 13, 2025 20:47
@Sysix Sysix marked this pull request as ready for review April 13, 2025 20:51
@Sysix Sysix requested review from Boshen, camc314 and camchenry April 13, 2025 20:52
@Boshen Boshen self-assigned this Apr 14, 2025
@graphite-app graphite-app bot changed the base branch from 04-13-fix_language_server_diable_nested_configuration_when_config_path_is_provided to graphite-base/10268 April 14, 2025 03:09
@graphite-app graphite-app bot force-pushed the 04-06-feat_language_server_use_linter_runtime branch from b852314 to 861d63a Compare April 14, 2025 03:14
@graphite-app graphite-app bot force-pushed the graphite-base/10268 branch from bc84417 to 664342b Compare April 14, 2025 03:14
@graphite-app graphite-app bot changed the base branch from graphite-base/10268 to main April 14, 2025 03:15
@graphite-app graphite-app bot force-pushed the 04-06-feat_language_server_use_linter_runtime branch from 861d63a to 1fef6d1 Compare April 14, 2025 03:15
Copy link
Member

@Boshen Boshen left a comment

Choose a reason for hiding this comment

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

I'll test and release the lsp changes before merging this.

@Sysix Sysix force-pushed the 04-06-feat_language_server_use_linter_runtime branch from 1fef6d1 to b3b3054 Compare April 14, 2025 18:16
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Apr 16, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Apr 16, 2025

Merge activity

closes #7118

Added tests for:
- (language_server & VSCode) nested configuration
- (language_server & VSCode) nested configuration extends
- (language_server) without nested configuration

The implementation requires at the moment a feature flag for `oxc_linter`. I added documentation in `runtime.rs` to let others know why this is needed. Maybe someone can refactor it to avoid the flag. My first idea is a Trait for file system, but you guys know what to do <3

![grafik](https://github.com/user-attachments/assets/9bb3aa67-c376-4f51-8474-1d0837d78338)
@graphite-app graphite-app bot force-pushed the 04-06-feat_language_server_use_linter_runtime branch from b3b3054 to bb8a078 Compare April 16, 2025 06:59
@graphite-app graphite-app bot merged commit bb8a078 into main Apr 16, 2025
31 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Apr 16, 2025
@graphite-app graphite-app bot deleted the 04-06-feat_language_server_use_linter_runtime branch April 16, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: oxlint VSCode extension not show warn or error for rules like import/no-cycle and import/no-duplicates

4 participants