Skip to content

Ship the native binary in the VS Code extension - #77

Open
koppor wants to merge 2 commits into
feat/java-25-graalvm-nativefrom
feat/vscode-native-binary
Open

koppor wants to merge 2 commits into
feat/java-25-graalvm-nativefrom
feat/vscode-native-binary

Conversation

@koppor

@koppor koppor commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #76. The platform-specific VS Code package carries the language server as the native binary from ADR 0016 instead of a jlink Java runtime plus JAR (new ADR 0017).

  • The extension starts server/openfasttrace-language-server[.exe] directly. A marker file names the binary's platform, and a binary for another platform is ignored.
  • The JAR stays in the package as fallback: oft.java.path now means "run the JAR with this Java instead of the binary", and a package built without a binary runs the JAR with java from the PATH as before.
  • scripts/build-runtime.js (jlink) is removed. New scripts/copy-server-binary.js takes the binary from a CI artifact dropped into server/, from target/ after mvn -Pnative package, or from an earlier run; npm run package -- <target> fails clearly when none exists.
  • CI: the VS Code jobs depend on the native build jobs and download the smoke-tested binary artifact for their platform. Any platform's package can now be built on any runner.
  • ADR 0011 is marked superseded for the VS Code extension and stays in force for the IntelliJ plugin; its OFT tag moved to the IntelliJ launcher. ADR 0016's follow-up note now points to ADR 0017. Both READMEs updated.
Package Before After
win32-x64 VSIX 24 MB (jlink runtime + JAR) 13 MB (native binary + JAR)

Test plan

  • npm run compile passes
  • npm run package -- win32-x64 with the CI-built Windows binary produces a 13 MB VSIX containing server/openfasttrace-language-server.exe, the JAR and the marker, and no runtime/
  • The CI-built Windows binary passes native_smoke_test.sh on this machine
  • Packaging without a binary fails with instructions
  • CI builds all five packages from the native artifacts
  • Install a CI-built VSIX and open doc/demo/example

🤖 Generated with Claude Code

@koppor
koppor added this pull request to stack #78 October 10, 2026 17:29
@koppor
koppor marked this pull request as ready for review October 10, 2026 17:31
koppor and others added 2 commits October 10, 2026 19:34
The platform-specific VS Code package now carries the language server as
the native binary from ADR 0016 instead of a jlink Java runtime plus JAR
(ADR 0017). The extension starts the binary directly. The JAR stays as a
fallback: a configured oft.java.path runs it with that Java, and a package
built without a binary runs it with java from the PATH as before.

The package shrinks from 24 MB to 13 MB. CI hands the smoke-tested native
build artifact to the VS Code job, so a package for every platform can be
built without jlink on that platform. The jlink script is gone; ADR 0011
stays in force for the IntelliJ plugin only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A checkout of an older branch still produces the jlink runtime there, and
it should not show up as untracked when switching back.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@koppor
koppor force-pushed the feat/vscode-native-binary branch from 74e796d to e7ec518 Compare October 10, 2026 17:34
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.

1 participant