Skip to content

node language-servers: private-libexec install + symlink launchers - #438

Merged
bryan-minimal merged 1 commit into
mainfrom
node-langservers-private-libexec
Jul 17, 2026
Merged

node language-servers: private-libexec install + symlink launchers#438
bryan-minimal merged 1 commit into
mainfrom
node-langservers-private-libexec

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Jul 17, 2026

Copy link
Copy Markdown
Member

Retrofit the three node language servers off the global usr/lib/node_modules onto the private-libexec method — the same fix as #370, applied to the existing packages that had the same shape.

Why

twitchyliquid64's review on #370: a node CLI's usr/lib/node_modules/** output glob overlaps the node/node-lts runtime's ownership of that path and welds the tool to one node variant.

What

Each tool now installs into a package-private usr/libexec/<pkg> prefix and exposes its bins as relative symlinks on PATH (usr/bin/<tool>../libexec/<pkg>/bin/<tool>). The inner #!/usr/bin/env node shebang is served by coreutils(env)+node, so runtime_deps=[coreutils, node] stays correct — matching pnpm/agent-browser. (Deliberately not a #!/bin/sh wrapper: it'd need bash in the closure and fail at runtime with "bad interpreter" while still passing minimal check — a review pass caught that.)

Build-proven

Rebuilt all three; every bin verified as a symlink resolving through libexec to the node script, zero leak into usr/lib/node_modules:

  • bash-language-server — 1 bin
  • pyright — 2 bins (pyright, pyright-langserver)
  • typescript-language-server3 bins (typescript-language-server + tsc/tsserver from the pinned typescript@5.9.3), all present — the multi-bin loop over bin/* catches the sibling package's bins

The typescript@5.9.3 pin is kept verbatim.

Part of the node-packaging cleanup started in #370. Remaining node packages on the old global pattern (cf, mermaid-cli, next, wrangler, capy) + the import-wolfi generator fix are follow-ups.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved packaging for Bash, Pyright, and TypeScript language servers.
    • Fixed command-line entry points so installed tools remain available on the system PATH.
    • Ensured executable files are included correctly in packaged releases.
    • Isolated language-server files to prevent conflicts with other installed Node.js packages.

Retrofit bash-language-server, typescript-language-server, and pyright off the
global usr/lib/node_modules onto the private-libexec method (twitchyliquid64's
#370 review): a tool's usr/lib/node_modules/** output overlaps the node/node-lts
runtime's ownership of that path and welds it to one node variant.

Each now installs into usr/libexec/<pkg> and exposes its bins as relative
symlinks on PATH — the inner `#!/usr/bin/env node` shebang is served by
coreutils(env)+node, so runtime_deps=[coreutils, node] stays correct (a
`#!/bin/sh` wrapper would need bash in the closure and fail at runtime while
still passing minimal check).

Build-proven; all bins verified as symlinks resolving into libexec, no global
leak — including typescript-language-server's THREE bins (itself + tsc/tsserver
from the pinned typescript@5.9.3) and pyright's two.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 08bbafbf-7f7d-4570-a4aa-daf1b1470c0d

📥 Commits

Reviewing files that changed from the base of the PR and between 5bb60a8 and 29e6545.

📒 Files selected for processing (6)
  • packages/bash-language-server/build.ncl
  • packages/bash-language-server/build.sh
  • packages/pyright/build.ncl
  • packages/pyright/build.sh
  • packages/typescript-language-server/build.ncl
  • packages/typescript-language-server/build.sh

📝 Walkthrough

Walkthrough

The three npm-based packages now install into package-specific usr/libexec directories. Their executables are linked into usr/bin, and build outputs collect the new libexec paths with executable files enabled.

Changes

Private libexec installation

Layer / File(s) Summary
Bash language server packaging
packages/bash-language-server/build.sh, packages/bash-language-server/build.ncl
Installs bash-language-server under its private libexec path, links discovered binaries into usr/bin, and packages executable libexec contents.
Pyright packaging
packages/pyright/build.sh, packages/pyright/build.ncl
Installs pyright under its private libexec path, links its binaries into usr/bin, and packages executable libexec contents.
TypeScript language server packaging
packages/typescript-language-server/build.sh, packages/typescript-language-server/build.ncl
Installs the language server and TypeScript under a private libexec path, links discovered tools into usr/bin, and packages executable libexec contents.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: moving Node language servers to private libexec installs with symlink launchers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch node-langservers-private-libexec

Comment @coderabbitai help to get the list of available commands.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit 73ff95b Jul 17, 2026
10 checks passed
@bryan-minimal
bryan-minimal deleted the node-langservers-private-libexec branch July 17, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants