Skip to content

Commit f7da875

Browse files
committed
feat(oxlint)!: remove oxc_language_server binary (#17457)
Given that all IDEs now use `--lsp`, we can "safely" remove the binary to reduce the published package size by half. This is breaking and forces people to upgrade their oxc IDE extensions. closes #12251 closes #15740
1 parent 0c4e9cf commit f7da875

File tree

5 files changed

+0
-179
lines changed

5 files changed

+0
-179
lines changed

.github/workflows/release_apps.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ jobs:
119119
- name: Build Rust binary
120120
run: cross build --release -p oxlint --features allocator --target=${{ matrix.target }}
121121

122-
- name: Build language server
123-
run: cross build --release -p oxc_language_server --bin oxc_language_server --target=${{ matrix.target }}
124-
125122
# The binaries are zipped to fix permission loss https://github.com/actions/upload-artifact#permission-loss
126123
- name: Archive oxlint .node binary
127124
uses: ./.github/actions/archive-binary
@@ -137,13 +134,6 @@ jobs:
137134
binary_name: oxlint-${{ matrix.code-target }}${{ runner.os == 'Windows' && '.exe' || '' }}
138135
archive_name: rust-oxlint-${{ matrix.code-target }}
139136

140-
- name: Archive language server binary
141-
uses: ./.github/actions/archive-binary
142-
with:
143-
source_path: target/${{ matrix.target }}/release/oxc_language_server${{ runner.os == 'Windows' && '.exe' || '' }}
144-
binary_name: oxc_language_server-${{ matrix.code-target }}${{ runner.os == 'Windows' && '.exe' || '' }}
145-
archive_name: oxc_language_server-${{ matrix.code-target }}
146-
147137
- name: Upload Binary
148138
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
149139
with:
@@ -152,8 +142,6 @@ jobs:
152142
path: |
153143
oxlint**.zip
154144
oxlint**.tar.gz
155-
oxc_language_server**.zip
156-
oxc_language_server**.tar.gz
157145
158146
# For github release
159147
- name: Upload Binary

npm/oxfmt/scripts/generate-packages.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ function copyDistFiles() {
9292
}
9393

9494
// NOTE: Must update npm/oxfmt/bin/oxfmt
95-
// and npm/oxfmt/bin/oxc_language_server
9695
const TARGETS = [
9796
"win32-x64",
9897
"win32-arm64",

npm/oxlint/bin/oxc_language_server

Lines changed: 0 additions & 151 deletions
This file was deleted.

npm/oxlint/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
"url": "https://github.com/sponsors/Boshen"
1717
},
1818
"bin": {
19-
"oxc_language_server": "bin/oxc_language_server",
2019
"oxlint": "bin/oxlint"
2120
},
2221
"files": [
2322
"configuration_schema.json",
2423
"dist",
2524
"README.md",
26-
"bin/oxc_language_server",
2725
"bin/oxlint"
2826
],
2927
"type": "module",

npm/oxlint/scripts/generate-packages.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { resolve } from "node:path";
77
import { fileURLToPath } from "node:url";
88

99
const OXLINT_BIN_NAME = "oxlint";
10-
const OXLS_BIN_NAME = "oxc_language_server";
1110
/** <REPO ROOT>/npm/oxlint` */
1211
const OXLINT_ROOT = resolve(fileURLToPath(import.meta.url), "../..");
1312
/** `<REPO ROOT>/npm` */
@@ -60,9 +59,6 @@ function generateNativePackage(target) {
6059
os: [platform],
6160
cpu: [arch],
6261
...libc,
63-
publishConfig: {
64-
executableFiles: ["oxc_language_server"],
65-
},
6662
};
6763

6864
const manifestPath = resolve(packageRoot, "package.json");
@@ -73,16 +69,8 @@ function generateNativePackage(target) {
7369
const oxlintBinSource = resolve(REPO_ROOT, `${OXLINT_BIN_NAME}.${target}.node`);
7470
const oxlintBinTarget = resolve(packageRoot, `${OXLINT_BIN_NAME}.${target}.node`);
7571

76-
const ext = platform === "win32" ? ".exe" : "";
77-
const oxlsBinSource = resolve(REPO_ROOT, `${OXLS_BIN_NAME}-${target}${ext}`);
78-
const oxlsBinTarget = resolve(packageRoot, `${OXLS_BIN_NAME}${ext}`);
79-
8072
console.log(`Copy linter binary ${oxlintBinSource}`);
8173
fs.copyFileSync(oxlintBinSource, oxlintBinTarget);
82-
83-
console.log(`Copy language server binary ${oxlsBinSource}`);
84-
fs.copyFileSync(oxlsBinSource, oxlsBinTarget);
85-
fs.chmodSync(oxlsBinTarget, 0o755);
8674
}
8775

8876
function writeManifest() {
@@ -121,7 +109,6 @@ function copyDistFiles() {
121109
fs.cpSync(OXLINT_DIST_SRC, OXLINT_DIST_DEST, { recursive: true });
122110
}
123111

124-
// NOTE: Must update npm/oxlint/bin/oxc_language_server
125112
const TARGETS = [
126113
"win32-x64",
127114
"win32-arm64",

0 commit comments

Comments
 (0)