Repository navigation
feat: add --ensure-wrapper to download the wrapper JAR ahead of time - #150
Merged
Merged
Conversation
`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 detectedLatest commit: c83f843 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
It downloads the JAR unless it is cached, prints the command that starts it, and exits:
When the JAR cannot be resolved, it prints the reason and exits with code 1. It honours
JSONIQ_LSP_CACHE_DIRandJSONIQ_LSP_WRAPPER_JARlike the server. The download progress goes to stderr, as before.main.tschecks the flag before starting the server, which creates the LSP connection only instartServer(), so--stdiois unchanged.The testing script, its build entry and its
ensure-wrapperpackage script are removed.Tests
tests/wrapper/ensure-wrapper.test.tscovers the printed command and the exit code when the JAR is missing. Ran the bundle by hand with a cached JAR, with a missingJSONIQ_LSP_WRAPPER_JAR, and with--stdio. The full suite passes (1018 tests).