Skip to content

fix(oxc_language_server): use file_path instead of uri_path#8736

Merged
Sysix merged 1 commit intooxc-project:mainfrom
shulaoda:fix/pass-error-file-path
Jan 26, 2025
Merged

fix(oxc_language_server): use file_path instead of uri_path#8736
Sysix merged 1 commit intooxc-project:mainfrom
shulaoda:fix/pass-error-file-path

Conversation

@shulaoda
Copy link
Contributor

@shulaoda shulaoda commented Jan 26, 2025

closes #8594

This is because previously, oxlintrc.path was determined by path.canonicalize().unwrap_or_else(|_| path.to_path_buf()), but after #8214, it was changed to path.to_path_buf(). As a result, \\?\D:\shulaoda became D:\shulaoda. This caused the condition uri_path.starts_with(gitignore.path()) to evaluate as true, preventing the bypass of the is_ignore check and exposing the original code issue.

if !uri_path.starts_with(gitignore.path()) {
continue;
}

@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 26, 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.

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-bug Category - Bug labels Jan 26, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 26, 2025

CodSpeed Performance Report

Merging #8736 will not alter performance

Comparing shulaoda:fix/pass-error-file-path (b1499e6) with main (dc0b0f2)

Summary

✅ 33 untouched benchmarks

@Boshen Boshen requested a review from Sysix January 26, 2025 12:56
@shulaoda shulaoda marked this pull request as draft January 26, 2025 13:10
@shulaoda shulaoda marked this pull request as ready for review January 26, 2025 13:34
@shulaoda shulaoda marked this pull request as draft January 26, 2025 14:07
@shulaoda shulaoda marked this pull request as ready for review January 26, 2025 14:17
@Sysix Sysix merged commit e85827b into oxc-project:main Jan 26, 2025
35 checks passed
@shulaoda shulaoda deleted the fix/pass-error-file-path branch January 26, 2025 14:51
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 C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In the Windows 11 environment, adding the ignorePatterns field to .oxlintrc.json causes the VSCode Oxc extension to crash

2 participants