Skip to content

Comments

fix(editor): execute oxc.path.server in win32 with shell#14203

Merged
graphite-app[bot] merged 1 commit intomainfrom
09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary
Nov 14, 2025
Merged

fix(editor): execute oxc.path.server in win32 with shell#14203
graphite-app[bot] merged 1 commit intomainfrom
09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Sep 28, 2025

closes #14167
This allows cross-platform configuration in a project.
The project can now define oxc.path.server to node_modules/.bin/oxc_language_server and windows will pick it up too.

With validateSafeBinaryPath in Pathvalidator.ts, we should be sure that bad actors can not harm the user's machine.

This is needed because the VSCode extension will not ship the language server in the future.

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-bug Category - Bug labels Sep 28, 2025
Copy link
Member Author

Sysix commented Sep 28, 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.

@Sysix Sysix force-pushed the 09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary branch from f043cd9 to b5d59db Compare September 28, 2025 12:55
@Sysix Sysix force-pushed the 09-28-refactor_editor_stricter_path_validation_for_oxc.path.server_ branch from 4217436 to a462aff Compare September 28, 2025 12:55
@Sysix Sysix force-pushed the 09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary branch from b5d59db to 834e42b Compare September 28, 2025 12:59
@Sysix Sysix requested a review from Copilot September 28, 2025 13:22
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 cross-platform support for the oxc language server by enabling Windows to execute npm binary scripts through shell execution when the user configures oxc.path.server to point to node_modules/.bin/oxc_language_server.

  • Modifies the binary execution logic to use shell mode on Windows for node_modules binaries
  • Updates path validation comments to reflect the new shell usage
  • Enables cross-platform configuration where projects can define a single path that works on all platforms

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
editors/vscode/client/extension.ts Adds conditional shell execution for Windows node_modules binaries and refactors findBinary function
editors/vscode/client/PathValidator.ts Updates comment to reflect that shell execution is now used on Windows

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

@Sysix Sysix force-pushed the 09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary branch from 834e42b to d9659cd Compare September 28, 2025 13:57
@graphite-app graphite-app bot changed the base branch from 09-28-refactor_editor_stricter_path_validation_for_oxc.path.server_ to graphite-base/14203 September 28, 2025 15:17
@graphite-app graphite-app bot force-pushed the 09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary branch from d9659cd to 385c4cb Compare September 28, 2025 15:22
@graphite-app graphite-app bot force-pushed the graphite-base/14203 branch from a462aff to f8abab2 Compare September 28, 2025 15:22
@graphite-app graphite-app bot changed the base branch from graphite-base/14203 to main September 28, 2025 15:22
@graphite-app graphite-app bot force-pushed the 09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary branch from 385c4cb to 6e8cd59 Compare September 28, 2025 15:22
@Sysix Sysix force-pushed the 09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary branch 2 times, most recently from de35c6e to d2e1615 Compare September 28, 2025 15:34
@Sysix Sysix marked this pull request as ready for review September 28, 2025 15:39
@Sysix Sysix requested a review from camc314 as a code owner September 28, 2025 15:39
@nrayburn-tech
Copy link
Collaborator

I won’t be able to actually review any code for a few days, but I don’t think I’ll have much to share other than the few considerations I mentioned before.

Just things for the team to consider.

For what it’s worth, the IntelliJ plugin doesn’t do any path validation and it’s not something I would personally add. The IntelliJ plugin also uses some abstraction provided by IntelliJ, but I believe by default it executes the same file that is being suggested for this PR. However, if a user specifies an exe path directly, that still works too. Specifying an exe path directly just won’t work cross platform (in typical scenarios).


I think I mentioned this a while ago when the IDE development was only beginning. It might be beneficial to have documentation on how we want the different IDE plugins owned by the Oxc team to function. This would provide users with a consistent experience across the different IDEs. Currently, users likely have a slightly different experience between the various IDEs (VS Code, IntelliJ, Zed, etc.)

@Sysix
Copy link
Member Author

Sysix commented Oct 13, 2025

moving it back to a draft.
Reason: maybe with the node integration for js-plugins, this is not needed anymore.
Idea from: oxc-project/oxc-intellij-plugin#239 (comment)

EDIT: there is still a need after testing it with windows

@Sysix Sysix marked this pull request as draft October 13, 2025 16:53
@camc314 camc314 self-assigned this Oct 23, 2025
@Sysix Sysix changed the base branch from main to graphite-base/14203 November 13, 2025 23:21
@Sysix Sysix force-pushed the 09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary branch from d2e1615 to 2f670c6 Compare November 13, 2025 23:21
@Sysix Sysix changed the base branch from graphite-base/14203 to 11-13-feat_vscode_support_oxlint_--lsp_ November 13, 2025 23:21
@Sysix Sysix changed the title fix(editor): execute oxc.path.server in win32 with shell, when its the node_module binary fix(editor): execute oxc.path.server in win32 with shell Nov 13, 2025
@Sysix Sysix marked this pull request as ready for review November 13, 2025 23:26
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Nov 14, 2025
Copy link
Contributor

camc314 commented Nov 14, 2025

Merge activity

@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 14, 2025
@Sysix Sysix force-pushed the 09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary branch from 2f670c6 to 2df513a Compare November 14, 2025 13:31
@Sysix Sysix force-pushed the 11-13-feat_vscode_support_oxlint_--lsp_ branch from f9d18fe to a9d09d8 Compare November 14, 2025 13:31
@Sysix Sysix added the 0-merge Merge with Graphite Merge Queue label Nov 14, 2025
closes #14167
This allows cross-platform configuration in a project.
The project can now define `oxc.path.server` to `node_modules/.bin/oxc_language_server` and windows will pick it up too.

 With `validateSafeBinaryPath` in `Pathvalidator.ts`, we should be sure that bad actors can not harm the user's machine.

This is needed because the VSCode extension will not ship the language server in the future.
@graphite-app graphite-app bot force-pushed the 11-13-feat_vscode_support_oxlint_--lsp_ branch from a9d09d8 to e77f2ce Compare November 14, 2025 13:36
@graphite-app graphite-app bot force-pushed the 09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary branch from 2df513a to 4eb9fa6 Compare November 14, 2025 13:37
Base automatically changed from 11-13-feat_vscode_support_oxlint_--lsp_ to main November 14, 2025 13:41
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 14, 2025
@graphite-app graphite-app bot merged commit 4eb9fa6 into main Nov 14, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 09-28-fix_editor_execute_oxc.path.server_in_win32_with_shell_when_its_the_node_module_binary branch November 14, 2025 13:41
overlookmotel pushed a commit that referenced this pull request Nov 17, 2025
# Oxlint
### 🚀 Features

- c199e38 linter: Implement config for all tsgolint rules supporting
options (#15659) (camchenry)
- 7598b3e linter: Allow configuring tsgolint rules (#15286) (camchenry)
- e77f2ce vscode: Support `oxlint --lsp` (#15680) (Sysix)
- e01c551 oxlint: Add `--lsp` flag to run the language server (#15611)
(Sysix)
- ac5c2ab lsp/fmt: Support ignore files & patterns (#15647) (Sysix)
- e50a9bf linter: Add unicorn/prefer-response-static-json rule (#15692)
(Mikhail Baev)
- f5d9abb oxlint: Add enabled? column to --rules cli output (#15213)
(Wren)
- 6b5205c linter/plugins: Implement deprecated
`SourceCode#getJSDocComment` method (#15653) (overlookmotel)
- 5eccff1 linter/plugins: Implement deprecated `SourceCode` tokens
methods (#15645) (overlookmotel)
- 4c62ffa language_server: Add `run_server` helper for CLI tools
(#15609) (Sysix)
- 0d52a5e linter/plugins: Implement `Context#parserOptions` getter
(#15632) (overlookmotel)
- 287a538 linter/plugins: Implement `Context#get*` deprecated methods
(#15606) (overlookmotel)
- 84de1ca oxlint,oxfmt: Allow comments and also commas for
vscode-json-ls (#15612) (leaysgur)
- e763919 linter: Add test to enforce schema documentation for rules
with configuration options (#15234) (Connor Shea)
- 6cd0b5f linter/no-callback-in-promise: Add support for `timeoutsErr`
option (#15507) (Li Wei)

### 🐛 Bug Fixes

- 1decd57 linter/no-empty-named-blocks: Only search within node for
comma token (#15751) (camc314)
- 17c3d6d linter: Improve docs, diagnostic message, and implementation
of typescript/consistent-indexed-object-style rule. (#15750)
(connorshea)
- 78a6df2 linter/no-empty-named-blocks: Skip comments when searching for
token (#15735) (camc314)
- 042befd linter/require-await: Skip comments when searching for token
(#15734) (camc314)
- 7a78220 linter/no-async-await: Skip comments when searching for token
(#15733) (camc314)
- 23b9ad1 linter/consistent-type-specifier-style: Skip comments when
searching for token (#15732) (camc314)
- 440a977 ast: Include rest properties when using
`get_binding_identifiers` (#15710) (camc314)
- 516d14e linter/no-namespace: Skip comments when searching for token
(#15716) (camc314)
- b5aaace linter/prefer-namespace-keyword: Skip comments when searching
for token (#15715) (camc314)
- 4eb9fa6 editor: Execute `oxc.path.server` in win32 with shell (#14203)
(Sysix)
- 9f991a4 linter: Reverse extends overrides priority (#14939) (Peter
Wagenet)
- 7c4a916 linter: Restores `oxlint --rules -f=json` functionality.
(#15689) (Wren)
- 24d00f4 linter/plugins: Add types for suggested fixes (#15636)
(overlookmotel)
- 257360f linter/plugins: Fill in TS type def for `RuleMeta` (#15629)
(overlookmotel)
- 81e179c linter: Allow file extensions without a dot in
react/jsx-filename-extension rule (#15574) (Connor Shea)
- 7a0e931 linter: Update the unicorn/prefer-add-event-listener rule with
new JavaScript APIs (#15581) (connorshea)
- bb5f8ca oxlint: Fix type annotation for big-endian (#15561) (Sysix)

### ⚡ Performance

- e2a0997 linter/plugins: Recycle empty visitor object in ESLint compat
mode (#15693) (overlookmotel)
- 7528db4 language_server: Pass file content as a referenced `String`
(#15568) (Sysix)
- 54061e9 linter/plugins: Avoid implicit boolean coercion in `initLines`
(#15641) (overlookmotel)
- ccfd935 language_server: Avoid `Mutex` in `ServerLinter` (#15516)
(Sysix)

### 📚 Documentation

- 3ab750a linter: Clarify react-in-jsx-scope rule docs. (#15749)
(connorshea)
- a5feebc linter: `oxlint-disable` not `eslint-disable` (#15672)
(overlookmotel)
- 3d15805 linter: Reformat doc comments (#15670) (overlookmotel)
- 16fcba6 linter: Remove "experimental" from description of stable
features (#15669) (overlookmotel)
- e62fd98 linter: Correct comment on what `EnablePlugins` does (#15668)
(overlookmotel)
- a25d31e linter: Fix grammar (#15666) (overlookmotel)
- f5f452f linter: Add missing `perf` category (#15667) (overlookmotel)
- 2c58952 linter: Add config docs for no-restricted-globals rule.
(#15662) (connorshea)
- a210b12 linter/plugins: Improve JSDoc comment for `RuleOptionsSchema`
(#15642) (overlookmotel)
- 3aabfac linter/plugins: Alter comments on `FILE_CONTEXT` used in
ESLint-compat `Context` shim (#15605) (overlookmotel)
- fd58aea linter: Fix a typo in the docs for react/no-is-mounted.
(#15575) (Connor Shea)
# Oxfmt
### 🚀 Features

- 84de1ca oxlint,oxfmt: Allow comments and also commas for
vscode-json-ls (#15612) (leaysgur)
- 99823ad oxfmt: Print nothing for default(write) mode (#15583)
(leaysgur)
- 25a0163 formatter/sort_imports: Sort imports by `Array<Array<string>>`
groups (#15578) (leaysgur)

### 🐛 Bug Fixes

- bf20cf5 formatter: `CRLF` issue in the member chain (#15764) (Dunqing)
- 5d688a0 formatter: Measuring multiline text in `fits_text` is
incorrect (#15762) (Dunqing)
- e306958 formatter: Regression case for test call (#15760) (Dunqing)
- c42d983 formatter: Re-fix all cases that fail after
`AstNode::Argument` was removed (#15676) (Dunqing)

### ⚡ Performance

- d99a83f oxfmt: Use simdutf8 based read_to_string (#15614) (leaysgur)
- 128e186 formatter/sort_imports: Precompute import metadata (#15580)
(leaysgur)
- cd31cc1 formatter/sort_imports: Use `Vec::with_capacity` for
`next_elements` (#15579) (leaysgur)

### 📚 Documentation

- 3d15805 linter: Reformat doc comments (#15670) (overlookmotel)

Co-authored-by: Boshen <[email protected]>
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…ct#14203)

closes oxc-project#14167
This allows cross-platform configuration in a project.
The project can now define `oxc.path.server` to `node_modules/.bin/oxc_language_server` and windows will pick it up too.

 With `validateSafeBinaryPath` in `Pathvalidator.ts`, we should be sure that bad actors can not harm the user's machine.

This is needed because the VSCode extension will not ship the language server in the future.
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
# Oxlint
### 🚀 Features

- c199e38 linter: Implement config for all tsgolint rules supporting
options (oxc-project#15659) (camchenry)
- 7598b3e linter: Allow configuring tsgolint rules (oxc-project#15286) (camchenry)
- e77f2ce vscode: Support `oxlint --lsp` (oxc-project#15680) (Sysix)
- e01c551 oxlint: Add `--lsp` flag to run the language server (oxc-project#15611)
(Sysix)
- ac5c2ab lsp/fmt: Support ignore files & patterns (oxc-project#15647) (Sysix)
- e50a9bf linter: Add unicorn/prefer-response-static-json rule (oxc-project#15692)
(Mikhail Baev)
- f5d9abb oxlint: Add enabled? column to --rules cli output (oxc-project#15213)
(Wren)
- 6b5205c linter/plugins: Implement deprecated
`SourceCode#getJSDocComment` method (oxc-project#15653) (overlookmotel)
- 5eccff1 linter/plugins: Implement deprecated `SourceCode` tokens
methods (oxc-project#15645) (overlookmotel)
- 4c62ffa language_server: Add `run_server` helper for CLI tools
(oxc-project#15609) (Sysix)
- 0d52a5e linter/plugins: Implement `Context#parserOptions` getter
(oxc-project#15632) (overlookmotel)
- 287a538 linter/plugins: Implement `Context#get*` deprecated methods
(oxc-project#15606) (overlookmotel)
- 84de1ca oxlint,oxfmt: Allow comments and also commas for
vscode-json-ls (oxc-project#15612) (leaysgur)
- e763919 linter: Add test to enforce schema documentation for rules
with configuration options (oxc-project#15234) (Connor Shea)
- 6cd0b5f linter/no-callback-in-promise: Add support for `timeoutsErr`
option (oxc-project#15507) (Li Wei)

### 🐛 Bug Fixes

- 1decd57 linter/no-empty-named-blocks: Only search within node for
comma token (oxc-project#15751) (camc314)
- 17c3d6d linter: Improve docs, diagnostic message, and implementation
of typescript/consistent-indexed-object-style rule. (oxc-project#15750)
(connorshea)
- 78a6df2 linter/no-empty-named-blocks: Skip comments when searching for
token (oxc-project#15735) (camc314)
- 042befd linter/require-await: Skip comments when searching for token
(oxc-project#15734) (camc314)
- 7a78220 linter/no-async-await: Skip comments when searching for token
(oxc-project#15733) (camc314)
- 23b9ad1 linter/consistent-type-specifier-style: Skip comments when
searching for token (oxc-project#15732) (camc314)
- 440a977 ast: Include rest properties when using
`get_binding_identifiers` (oxc-project#15710) (camc314)
- 516d14e linter/no-namespace: Skip comments when searching for token
(oxc-project#15716) (camc314)
- b5aaace linter/prefer-namespace-keyword: Skip comments when searching
for token (oxc-project#15715) (camc314)
- 4eb9fa6 editor: Execute `oxc.path.server` in win32 with shell (oxc-project#14203)
(Sysix)
- 9f991a4 linter: Reverse extends overrides priority (oxc-project#14939) (Peter
Wagenet)
- 7c4a916 linter: Restores `oxlint --rules -f=json` functionality.
(oxc-project#15689) (Wren)
- 24d00f4 linter/plugins: Add types for suggested fixes (oxc-project#15636)
(overlookmotel)
- 257360f linter/plugins: Fill in TS type def for `RuleMeta` (oxc-project#15629)
(overlookmotel)
- 81e179c linter: Allow file extensions without a dot in
react/jsx-filename-extension rule (oxc-project#15574) (Connor Shea)
- 7a0e931 linter: Update the unicorn/prefer-add-event-listener rule with
new JavaScript APIs (oxc-project#15581) (connorshea)
- bb5f8ca oxlint: Fix type annotation for big-endian (oxc-project#15561) (Sysix)

### ⚡ Performance

- e2a0997 linter/plugins: Recycle empty visitor object in ESLint compat
mode (oxc-project#15693) (overlookmotel)
- 7528db4 language_server: Pass file content as a referenced `String`
(oxc-project#15568) (Sysix)
- 54061e9 linter/plugins: Avoid implicit boolean coercion in `initLines`
(oxc-project#15641) (overlookmotel)
- ccfd935 language_server: Avoid `Mutex` in `ServerLinter` (oxc-project#15516)
(Sysix)

### 📚 Documentation

- 3ab750a linter: Clarify react-in-jsx-scope rule docs. (oxc-project#15749)
(connorshea)
- a5feebc linter: `oxlint-disable` not `eslint-disable` (oxc-project#15672)
(overlookmotel)
- 3d15805 linter: Reformat doc comments (oxc-project#15670) (overlookmotel)
- 16fcba6 linter: Remove "experimental" from description of stable
features (oxc-project#15669) (overlookmotel)
- e62fd98 linter: Correct comment on what `EnablePlugins` does (oxc-project#15668)
(overlookmotel)
- a25d31e linter: Fix grammar (oxc-project#15666) (overlookmotel)
- f5f452f linter: Add missing `perf` category (oxc-project#15667) (overlookmotel)
- 2c58952 linter: Add config docs for no-restricted-globals rule.
(oxc-project#15662) (connorshea)
- a210b12 linter/plugins: Improve JSDoc comment for `RuleOptionsSchema`
(oxc-project#15642) (overlookmotel)
- 3aabfac linter/plugins: Alter comments on `FILE_CONTEXT` used in
ESLint-compat `Context` shim (oxc-project#15605) (overlookmotel)
- fd58aea linter: Fix a typo in the docs for react/no-is-mounted.
(oxc-project#15575) (Connor Shea)
# Oxfmt
### 🚀 Features

- 84de1ca oxlint,oxfmt: Allow comments and also commas for
vscode-json-ls (oxc-project#15612) (leaysgur)
- 99823ad oxfmt: Print nothing for default(write) mode (oxc-project#15583)
(leaysgur)
- 25a0163 formatter/sort_imports: Sort imports by `Array<Array<string>>`
groups (oxc-project#15578) (leaysgur)

### 🐛 Bug Fixes

- bf20cf5 formatter: `CRLF` issue in the member chain (oxc-project#15764) (Dunqing)
- 5d688a0 formatter: Measuring multiline text in `fits_text` is
incorrect (oxc-project#15762) (Dunqing)
- e306958 formatter: Regression case for test call (oxc-project#15760) (Dunqing)
- c42d983 formatter: Re-fix all cases that fail after
`AstNode::Argument` was removed (oxc-project#15676) (Dunqing)

### ⚡ Performance

- d99a83f oxfmt: Use simdutf8 based read_to_string (oxc-project#15614) (leaysgur)
- 128e186 formatter/sort_imports: Precompute import metadata (oxc-project#15580)
(leaysgur)
- cd31cc1 formatter/sort_imports: Use `Vec::with_capacity` for
`next_elements` (oxc-project#15579) (leaysgur)

### 📚 Documentation

- 3d15805 linter: Reformat doc comments (oxc-project#15670) (overlookmotel)

Co-authored-by: Boshen <[email protected]>
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.

VSCode: allow oxc.path.server to be used in Linux & Windows

3 participants