QOL changes for working with Ark submodule#14884
Open
jmcphers wants to merge 7 commits into
Open
Conversation
|
E2E Tests 🚀 Why these tags?
More on automatic tags from changed files. |
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.
Fixes #14407
Summary
Improves the developer experience around the
arksubmodule, which was awkward to work with when picking up in-flight Ark changes locally. Four related fixes:Prefer building Ark from source over a stale prebuild on dev machines. The
install-kernelresolution order now puts a localcargo buildahead of the older-prebuild fallback, so a developer with the rust toolchain gets the Ark their submodule points at. Downloading an older prebuild is now the last resort (for machines without Rust) and prints a stderr warning.Include local builds in release bundles.
install-kernelnow writes aSUBMODULE_COMMITsidecar next to the resolved binary. Becauseresources/ark/ships in the packaged extension, the expected commit is available at runtime even in a release build with no git submodule.Invalidate the npm cache on Ark version changes, so a stale Ark triggers a reinstall.
Warn on an Ark version mismatch. When the running Ark was built from a different commit than the one Positron expects, a toast appears once per session (mirroring the Kallichore supervisor warning).
The expected commit comes from the live submodule HEAD (dev) or the sidecar (release). It stays quiet when a mismatch is expected or unknowable (Ark reports no commit, no expected commit available, or the submodule has local commits on top of
origin/main). It can be disabled via the newpositron.r.kernel.warnOnVersionMismatchsetting, and when a custompositron.r.kernel.pathis set the toast names that path and points at the kernel-path setting.The runtime info returned by the kernel now carries
build_versionandcommitfields to support the warning, plumbed throughJupyterLanguageInfo,KallichoreSession, andpositron.d.ts.Validation Steps
@:ark
Most of this change is build tooling (
install-kernel.ts) and dev-time diagnostics not reachable by the standard test runners, so no automated tests were added. Validate manually:Resolution order (dev):
resources/ark/SUBMODULE_COMMITis written after install.Version-mismatch warning:
origin/main(active Ark development).positron.r.kernel.warnOnVersionMismatchtofalseand confirm the toast is suppressed.positron.r.kernel.pathto a mismatched build and confirm the toast names that path and opens the kernel-path setting.