Skip to content

QOL changes for working with Ark submodule#14884

Open
jmcphers wants to merge 7 commits into
mainfrom
feature/ark-submodule-qol
Open

QOL changes for working with Ark submodule#14884
jmcphers wants to merge 7 commits into
mainfrom
feature/ark-submodule-qol

Conversation

@jmcphers

Copy link
Copy Markdown
Collaborator

Fixes #14407

Summary

Improves the developer experience around the ark submodule, which was awkward to work with when picking up in-flight Ark changes locally. Four related fixes:

  1. Prefer building Ark from source over a stale prebuild on dev machines. The install-kernel resolution order now puts a local cargo build ahead 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.

  2. Include local builds in release bundles. install-kernel now writes a SUBMODULE_COMMIT sidecar next to the resolved binary. Because resources/ark/ ships in the packaged extension, the expected commit is available at runtime even in a release build with no git submodule.

  3. Invalidate the npm cache on Ark version changes, so a stale Ark triggers a reinstall.

  4. 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).

image

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 new positron.r.kernel.warnOnVersionMismatch setting, and when a custom positron.r.kernel.path is set the toast names that path and points at the kernel-path setting.

The runtime info returned by the kernel now carries build_version and commit fields to support the warning, plumbed through JupyterLanguageInfo, KallichoreSession, and positron.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):

  1. On a machine with rust but no matching prebuild cached, run the positron-r post-install and confirm Ark is built from source rather than an older prebuild being downloaded.
  2. Confirm resources/ark/SUBMODULE_COMMIT is written after install.

Version-mismatch warning:

  1. Install an Ark whose commit differs from the submodule HEAD (e.g. force the older-prebuild fallback).
  2. Start an R session and confirm a warning toast appears once, naming the running and expected commits.
  3. Confirm no toast when the submodule HEAD has local commits on top of origin/main (active Ark development).
  4. Set positron.r.kernel.warnOnVersionMismatch to false and confirm the toast is suppressed.
  5. Set a custom positron.r.kernel.path to a mismatched build and confirm the toast names that path and opens the kernel-path setting.

@jmcphers jmcphers requested a review from lionel- July 15, 2026 16:49
@github-actions

Copy link
Copy Markdown

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:ark @:sessions @:console @:interpreter

Why these tags?
Tag Source
@:critical Always runs (required)
@:ark PR description
@:sessions Changed files
@:console Changed files
@:interpreter Changed files

More on automatic tags from changed files.

readme  valid tags

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.

Improve dev experience around ark submodule

1 participant