KSON's multi-platform build and test architecture depends on a number of external dependencies, all of which must be pinned to deterministic versions for build stability and reproducibility.
These pinned dependencies must be periodically bumped and the resulting build verified for the new pins. This document describes that process.
We perform this maintenance at the opening of each development cycle, right after a release/X.Y.Z branch is cut and main moves on to the next snapshot version (see the release process).
We do it at the opening of a cycle because version bumps break things, sometimes in ways that are not immediately obvious. Bumping early gives us a whole cycle of development and internal usage to surface any issues.
These are the dependencies we will keep relatively current. We'd like to upgrade and build each dependency in its own commit so a later bisect has something precise/informative to land on.
- Gradle
- pinned in:
gradle-wrapper.properties - upstream: gradle.org/releases
- bump with:
./gradlew wrapper --gradle-version <gradle version>
- pinned in:
- The JDK the whole build runs on
- pinned in:
jdk.properties, which documents the follow-up its edits require - upstream: GraalVM CE releases
- pinned in:
- Kotlin
- pinned in:
settings.gradle.ktsandbuildSrc/build.gradle.kts, which both declare it and must agree - upstream: Kotlin releases
- after bumping: run
./gradlew kotlinUpgradeYarnLockto regeneratekotlin-js-store/yarn.lock, and commit it
- pinned in:
- kotlinx-serialization-json
- pinned in:
build.gradle.kts,buildSrc/build.gradle.ktsandnative-tests/build.gradle.kts, which should agree - upstream: Maven Central
- pinned in:
- Gradle plugins (detekt, Dokka, Vanniktech publish, JVM wrapper, checksum, krossover, GraalVM native build tools)
- pinned in:
build.gradle.kts,buildSrc/build.gradle.kts,kson-lib/build.gradle.kts(krossover) andnative-tests/build.gradle.kts(GraalVM native build tools) - upstream: Gradle Plugin Portal
- pinned in:
- Library dependencies declared in Gradle build files (clikt, JGit, org.kson:kson, clean-git-checkout, snakeyaml, junit)
- pinned in:
tooling/cli/build.gradle.kts(clikt),buildSrc/build.gradle.kts(JGit, org.kson:kson, clean-git-checkout),build.gradle.kts(snakeyaml) andtooling/jetbrains/build.gradle.kts(junit) - upstream: Maven Central
- pinned in:
- The IntelliJ Platform Gradle Plugin
- pinned in:
tooling/jetbrains/build.gradle.kts - upstream: its Plugin Portal listing
- pinned in:
- Pixi itself
- pinned in:
PINNED_PIXI_VERSIONinPixiWrapperTask.kt - upstream: Pixi releases
- note: the generated
pixiwwrappers auto-install this version
- pinned in:
- The toolchains Pixi installs (Rust, Node, pnpm, Python, libclang, MSVC)
- pinned in: the
pixi.tomlofkson-lib,lib-rust,tooling/cli,tooling/lsp-clientsandtooling/language-server-protocol - upstream: conda-forge
- bump with: edit the manifest, then re-solve with
pixi lock
- pinned in: the
- npm dependencies
- pinned in: the
package.jsonfiles undertooling/lsp-clientsandtooling/language-server-protocol - check with:
pnpm outdated -rfrom each workspace root - note: the four projects under
tooling/lsp-clients/demossit outside the pnpm workspace on purpose, sopnpm outdated -rdoesn't reach them. Bump them along with the rest. Check each withpnpm outdated --ignore-workspacefrom its own directory:demos(the Playwright tests for the three demos)demos/iframedemos/reactdemos/vanilla
- after editing any of them: run
./gradlew tooling:lsp-clients:checkto regenerate allpnpm-lock.yamlfiles. Commit the pnpm-lock.yaml files. - note: mocha 11's
serialize-javascriptanddiffare overridden to clear Dependabot advisories, in bothpnpm-workspace.yamlfiles and as yarn resolutions inbuild.gradle.kts. Move pnpm's mocha version together with the one Kotlin/JS tests use, and drop all the overrides once every mocha is on a version that doesn't need them. After editing the yarn resolutions, run./gradlew kotlinUpgradeYarnLock --rerun-tasks.
- pinned in: the
- Cargo dependencies
- pinned in:
lib-rust/kson/Cargo.tomlandlib-rust/kson-sys/Cargo.toml - check with:
cargo update --dry-runin each for releases within the declared ranges - check major version bumps with:
cargo info <crate>for each direct dependency, and upgrade any whoselatestshows a newer major version- TODO this check can be done in bulk with
cargo update --breakingonce it leaves nightly (tracking: cargo#12425)
- TODO this check can be done in bulk with
- pinned in:
- Python dependencies
- pinned in:
lib-python/pyproject.toml - check with:
./uvw lock --upgrade --dry-runfromlib-python - note:
[build-system] requiresand cibuildwheel'stest-requiresaren't inuv.lock, so the check above doesn't report them. Check those pins against PyPI by hand, and keep each one equal to the versionuv.locklocks, where it locks one.
- pinned in:
- The VS Code build our extension tests drive
- pinned in:
vscodeTestBuild.ts - check with: the
curldocumented in that file
- pinned in:
- The upstream conformance suites we generate tests from
- pinned in:
jsonTestSuiteSHAandschemaTestSuiteSHAinGenerateJsonTestSuiteTask.kt - check with:
git ls-remote <suite url> HEAD, for the urls inTestSuiteGitCheckout.kt
- pinned in:
- CircleCI orbs and images (macOS Xcode,
cimg/node,windows-server-2022-gui,cimg/python)- pinned in:
.circleci/config.kson - upstream: orb registry, macOS image list and CircleCI images
- note: the Windows image is pinned twice, once as the
imageofbuild-windows-amd64and once as theversionof thewindows/defaultexecutor. Move both together - note: keep
cimg/nodeon the same Node version asnodejsinkson-lib/pixi.toml. conda-forge doesn't build every Node release, so check it has the version before moving the image - note:
cimg/pythonis the Python floor from section 2, so it moves only with that floor
- pinned in:
Some of our dependencies are deliberately not current: they represent our backwards compatibility commitments to the platforms they target, so they should only ever be bumped very intentionally, as part of a product decision to drop support for an old version.
- The oldest IntelliJ Platform the plugin supports
- declared in:
pluginSinceBuild,platformVersionandjavaVersionintooling/jetbrains/gradle.properties - raising it: drops support for older IDEs
- note: all three move together, since the platform version dictates the minimum JDK
- declared in:
- The oldest JVM that can consume
org.kson:kson- declared in:
VERSIONinKsonJvmTarget.kt - raising it: breaks consumers
- note: this is the bytecode target we publish, deliberately well below the JDK we build with
- declared in:
- The oldest Python that can install
kson-lang- declared in:
requires-pythoninlib-python/pyproject.toml, matched by thecimg/pythonimage in.circleci/config.kson - note: CI installs the sdist on that floor on purpose, in the
test-python-sdistjob. Move both together, or the guarantee stops being tested. The sdist itself is built with the Python inlib-python/.python-version, not the image's - note: the image pins only the minor version, on purpose: the floor is a Python minor version, not a patch release
- declared in:
Audit for new or missed unpinned/floating dependencies that are not yet captured in this doc, and add them where appropriate. We would ideally catch these before they get in, but historically this type of thing has a way of creeping into a project.
Known floats, not yet resolved: none at the moment.
Dependabot keeps us on top of dependency updates that patch vulnerabilities between maintenance passes. When a vulnerability is discovered mid-cycle, Dependabot alerts maintainers and, when possible, opens a PR to bump the affected dependency.
Our target for resolving a vulnerability depends on its severity and whether the affected code ships. Critical, High, and Medium fixes to shipped code aren't complete until they've been released. All other fixes only need to be merged.
With the clock starting on the day an alert comes in, our targets are:
| Severity | Shipped | Not shipped |
|---|---|---|
| Critical | Released within 14 days | Merged within 30 days |
| High | Released within 30 days | Merged by the next maintenance pass |
| Medium | Included in the next regular release | Merged by the next maintenance pass |
| Low | Merged by the next maintenance pass | Merged by the next maintenance pass |
- Shipped: is included in or used to build anything we publish or deploy.
- Not shipped: only runs in local development or CI, such as test runners and local-only demos.
If you're unsure, treat the affected code as shipped.
Note: Dependabot doesn't cover our Gradle or Pixi dependencies, so for now the maintenance pass described above is our only check on those.
A Dependabot PR isn't necessarily safe for our project, so we should still perform our due diligence before merging. This includes:
- Reviewing the changelog and/or commits associated with the version bump, looking for breaking changes
- Evaluating the branch with a capable LLM
- Checking that all copies of the dependency were updated - Dependabot occasionally only finds some of them. If this is the case, open a new, more complete PR and link back to the original, ensuring the original is closed once the new PR is merged
Addressing a vulnerability typically means bumping a dependency version (as outlined in this document). However, there are times when that isn't possible or doesn't make sense:
- Defer: if the vulnerability is in a transitive package that we can't easily override, and we expect an upstream fix, we can leave the alert open. Consider opening an issue if it's something that's worth tracking.
- Dismiss: if we can clearly show a vulnerability doesn't apply to us, we can dismiss the alert. The dismissal needs to provide a clear explanation of why we're comfortable doing so and a link to a public PR or issue.