Skip to content

feat: add --ensure-wrapper to download the wrapper JAR ahead of time - #150

Merged
CaiJimmy merged 1 commit into
mainfrom
feat/ensure-wrapper-flag
Nov 16, 2026
Merged

CaiJimmy merged 1 commit into
mainfrom
feat/ensure-wrapper-flag

Conversation

@CaiJimmy

Copy link
Copy Markdown
Collaborator

The server downloads the RumbleDB wrapper JAR the first time it needs it. Images, offline machines and clients that ship the server, such as the JupyterLab extension, want to download it ahead of time instead. The only way was dist/integrations/rumble/executable/ensure-wrapper.mjs, a testing script that is not part of the bundled server and imports a chunk whose name changes with every build, so a client that vendors the bundled server cannot ship it reliably.

Change

The bundled server takes the flag itself:

node dist/bundled/main.mjs --ensure-wrapper

It downloads the JAR unless it is cached, prints the command that starts it, and exits:

java --add-opens=java.base/java.lang=ALL-UNNAMED … -jar ~/Library/Caches/jsoniq-language-server/wrapper/rumble-lsp-wrapper.remote.jar --daemon

When the JAR cannot be resolved, it prints the reason and exits with code 1. It honours JSONIQ_LSP_CACHE_DIR and JSONIQ_LSP_WRAPPER_JAR like the server. The download progress goes to stderr, as before.

main.ts checks the flag before starting the server, which creates the LSP connection only in startServer(), so --stdio is unchanged.

The testing script, its build entry and its ensure-wrapper package script are removed.

Tests

tests/wrapper/ensure-wrapper.test.ts covers the printed command and the exit code when the JAR is missing. Ran the bundle by hand with a cached JAR, with a missing JSONIQ_LSP_WRAPPER_JAR, and with --stdio. The full suite passes (1018 tests).

`main.mjs --ensure-wrapper` downloads the RumbleDB wrapper JAR unless it
is cached, prints the java command that starts it, and exits; with code 1
when the JAR cannot be resolved. Images and clients that ship the bundled
server, such as the JupyterLab extension, can then download the JAR
before the server first needs it.

It replaces the ensure-wrapper.mjs testing script, an unbundled entry
point whose chunk names change between releases.
@changeset-bot

changeset-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c83f843

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
jsoniq-language-server Minor
jsoniq-vscode Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CaiJimmy
CaiJimmy merged commit a34f11f into main Nov 16, 2026
3 checks passed
@CaiJimmy
CaiJimmy deleted the feat/ensure-wrapper-flag branch November 16, 2026 13:46
@github-actions github-actions Bot mentioned this pull request Nov 16, 2026
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