This file documents the current (and evolving) release process for KSON.
When main is ready to have a release cut from it:
- Choose an appropriate
X.Y.Zversion number for the release by incrementing the latest tag (see existing tags here) according to Semantic Versioning guidelines - Create a branch
release/X.Y.Zfor this release - On
main, bump our pinned dependencies according to the process in Regular Dependency Maintenance (this may be done in parallel to the release, or right after, but must not be neglected)
- Search the codebase for
[[kson-version-num]]and update all version numbers to be snapshot/development versions for the next version. Generally this will bump to the next minor version afterX.Y.Z, ie.X.(Y+1).0. Here is a hopefully complete checklist of the artifacts we version and publish (please improve if/when gaps are found!):- Gradle-based projects use centralized version from KsonVersion.kt:
- Update
BASE_VERSIONtoX.(Y+1).0- this applies to kson-lib, kson-tooling-lib, tooling/jetbrains, and tooling/cli - Snapshot versions use stable
{BASE_VERSION}-SNAPSHOTfor builds, and SHA-qualified{BASE_VERSION}-{gitSha}-SNAPSHOTfor Maven publishing
- Update
- KSON Core internals:
x.(PREVIOUS_NUM+1)(note this is the special incrementing internal version, updateinternalBaseVersionthere) - lib-rust: kson Cargo.toml, kson-sys Cargo.toml, kson-sys build script:
X.(Y+1).0-dev, pixi.toml:X.(Y+1).0-dev - lib-python:
X.(Y+1).0.dev0 - tooling/lsp-clients:
X.(Y+1).0-dev.0 - tooling/lsp-clients/vscode:
X.(Y+1).0-dev.0 - tooling/lsp-clients/shared:
X.(Y+1).0-dev.0 - tooling/lsp-clients/monaco:
X.(Y+1).0-dev.0 - tooling/language-server-protocol:
X.(Y+1).0-dev.0
- Gradle-based projects use centralized version from KsonVersion.kt:
- Update the kson and kson-sys
Cargo.lockfiles:cargo update --workspace --manifest-path lib-rust/kson-sys/Cargo.toml cargo update --workspace --manifest-path lib-rust/kson/Cargo.toml
- Run build and tests to ensure that uv.lock is updated and to ensure that tests pass:
In
(cd buildSrc && ./gradlew check) ./gradlew builduv.lock, only thekson-langversion should change (deletelib-python/.uv/and rebuild ifrevisionalso changes). - Manufacture a commit and pull request with these changes.
- Search the codebase for
[[kson-version-num]]to find and update all the development/snapshot versions to the newX.Y.Zversion. Here's a hopefully complete checklist of the artifacts we version and publish that should marked[[kson-version-num]]:- Gradle-based projects use centralized version from KsonVersion.kt:
- Update
BASE_VERSIONtoX.Y.Z- this applies to kson-lib, kson-tooling-lib, tooling/jetbrains, and tooling/cli - Build with
-Prelease=trueflag to produce release versions (without SNAPSHOT suffix):A./gradlew build -Prelease=true
-Prelease=truebuild neither reads nor writes the build cache.
- Update
- KSON Core internals (NOTE: uses a different versioning scheme and will NOT be set to
X.Y.Z. See the comments there for details) - rust libraries:
- kson Cargo.toml, kson-sys Cargo.toml, kson-sys build script, pixi.toml
- Then update the kson and kson-sys
Cargo.lockfiles:cargo update --workspace --manifest-path lib-rust/kson-sys/Cargo.toml cargo update --workspace --manifest-path lib-rust/kson/Cargo.toml
- lib-python, tooling/lsp-clients: These require manual version updates (no
-Preleaseflag support yet):- lib-python
- uv.lock: the
kson-langversion should change - tooling/lsp-clients
- tooling/lsp-clients/vscode
- tooling/lsp-clients/shared
- tooling/lsp-clients/monaco
- tooling/language-server-protocol
- tooling/jetbrains plugin.xml: update
<change-notes>section with very simple release notes (a link to the blog is enough)
- Gradle-based projects use centralized version from KsonVersion.kt:
- Commit and push the
release/X.Y.Zbranch - Pushing the branch runs CircleCI across ALL supported platforms (pull requests only run the linux build)
- Fix any platform specific issues found
- Create tag
vX.Y.Zif/when CircleCI is green for all platforms - Publish the release according the Publishing process below
- Prepare release notes based on the changes made in this release. Sample Github comparison URL to see this release's changes:
https://github.com/kson-org/kson/compare/[tag of current version]...release/X.Y.Z
Each of these CI jobs stores the release artifacts it builds into release-artifacts/<destination>
on its Artifacts tab:
| CircleCI job | Artifact destination | Contents |
|---|---|---|
build-linux-amd64 |
release-artifacts/linux-amd64 |
kson-lib-shared-amd64-linux.tar.gz, kson-cli-amd64-linux.tar.gz, each with its .sha256 |
build-linux-amd64 |
release-artifacts/portable |
vscode-kson-plugin.vsix, kson-language-*.zip, kson_org-kson-*.tgz, kson_org-monaco-editor-*.tgz, kson_lang-*.tar.gz, each with its .sha256 |
build-macos-arm64 |
release-artifacts/macos-arm64 |
kson-lib-shared-arm64-macos.tar.gz, kson-cli-arm64-macos.tar.gz, each with its .sha256 |
build-windows-amd64 |
release-artifacts/windows-amd64 |
kson-lib-shared-amd64-windows.tar.gz, kson-cli-amd64-windows.tar.gz, each with its .sha256 |
build-python-wheel-linux-amd64 |
release-artifacts/python-linux-amd64 |
kson_lang-*.whl |
build-python-wheel-macos |
release-artifacts/python-macos-arm64 |
kson_lang-*.whl |
build-python-wheel-windows |
release-artifacts/python-windows-amd64 |
kson_lang-*.whl |
.circleci/download-release-artifacts.sh downloads
every job's artifacts of a branch's latest run into release-artifacts/<destination>/ under the
current directory and verifies each .sha256. It needs the CircleCI CLI (1.11 or newer), logged in
with circleci auth login:
.circleci/download-release-artifacts.sh release/X.Y.ZTake a release's artifacts from the CI run on its own release/X.Y.Z branch; other runs build
development versions.
kson-lib Publishing Process
The project uses the Vanniktech Maven Publish plugin to publish to Maven Central Portal. This process publishes both:
org.kson:kson(public API from kson-lib)org.kson:kson-internals(internal implementation from root build that is deployed with kson-lib)
- You will need a user account on https://central.sonatype.com/
- You will need a GPG key pair with the public key published to https://keyserver.ubuntu.com/
Ensure you have credentials for both of these in your ~/.gradle/gradle.properties file:
mavenCentralUsername=<your-username>
mavenCentralPassword=<your-password>
# GPG signing credentials
signing.keyId=<your-key-id>
signing.password=<your-passphrase>
signing.secretKeyRingFile=<path-to-secring.gpg>-
Ensure you've checked out the tag to be released and that
git statusis clean -
Publish to Maven Central:
./gradlew publishAllPublicationsToMavenCentralRepository -Prelease=true
-
Verify the publications are valid and ready to be published: https://central.sonatype.com/publishing/deployments
-
Manually release: we have
automaticRelease = falseas a final gate/protection, so once everything looks good at https://central.sonatype.com/publishing/deployments for this release, click Publish
lib-rust Publishing Process
Three artifacts, published in this order:
kson-binariesreleasekson-lib-X.Y.Z— the prebuilt native librarieskson-syson crates.iokson-rson crates.io
Unless KSON_ROOT_SOURCE_DIR or KSON_PREBUILT_BIN_DIR is set, kson-sys's
build script downloads its native library from:
https://github.com/kson-org/kson-binaries/releases/download/kson-lib-{KSON_LIB_VERSION}/kson-lib-shared-{arch}-{os}.tar.gz
cargo publish verifies by building, so step 1 must be complete before step 3.
- The tag to be released checked out, with
git statusclean. Steps 1, 2 and 3 all read versions from the working tree —KSON_LIB_VERSIONand the crate versions — so running them frommainor a feature branch publishes or verifies the wrong version. - A crates.io account, authenticated locally (
cargo login), with publish rights on bothkson-rsandkson-sys - Write access to https://github.com/kson-org/kson-binaries
- The
ghCLI, authenticated - Green
build-linuxandbuild-release-targetsworkflows on the release branch
CI builds these archives under the names the download URL needs, so they need no repackaging.
The three build-* jobs of this release's CI run store them under release-artifacts/<platform>
(see Release artifacts built by CircleCI to download them):
| CircleCI job | Release asset |
|---|---|
build-linux-amd64 |
kson-lib-shared-amd64-linux.tar.gz |
build-macos-arm64 |
kson-lib-shared-arm64-macos.tar.gz |
build-windows-amd64 |
kson-lib-shared-amd64-windows.tar.gz |
Job names and artifact destinations have changed between releases. Confirm both against the release branch's
.circleci/config.kson.
Only shared assets are needed. build.rs derives the asset name from the Rust target triple
(aarch64 → arm64, x86_64 → amd64; OS is linux, macos, or windows). Consumers on a
combination we do not ship must set KSON_ROOT_SOURCE_DIR or KSON_PREBUILT_BIN_DIR themselves.
-
Confirm
KSON_LIB_VERSIONin build.rs matches the tag you are about to create. If they disagree, every downstreamcargo build404s. -
Sanity-check a tarball on your own platform before uploading:
mkdir -p /tmp/kson-verify tar -xzf release-artifacts/macos-arm64/kson-lib-shared-arm64-macos.tar.gz -C /tmp/kson-verify env -u KSON_ROOT_SOURCE_DIR KSON_PREBUILT_BIN_DIR=/tmp/kson-verify \ cargo build --manifest-path lib-rust/kson/Cargo.tomlEach archive holds its platform's native-image output, the shared library and its headers, flat at the archive root. Every file in it is platform-specific, so never mix files between archives.
-
Create the release and upload all three assets:
gh release create kson-lib-X.Y.Z \ --repo kson-org/kson-binaries \ --title kson-lib-X.Y.Z \ release-artifacts/linux-amd64/kson-lib-shared-amd64-linux.tar.gz \ release-artifacts/windows-amd64/kson-lib-shared-amd64-windows.tar.gz \ release-artifacts/macos-arm64/kson-lib-shared-arm64-macos.tar.gz
No CI job covers this path. With both env vars unset:
env -u KSON_ROOT_SOURCE_DIR -u KSON_PREBUILT_BIN_DIR \
cargo build --manifest-path lib-rust/kson/Cargo.tomlA failure here means the kson-binaries release is missing, misnamed, or disagrees with
KSON_LIB_VERSION. Fix it before continuing: published crates can only be yanked, never
changed.
-
Dry-run both crates:
cargo publish --dry-run --manifest-path lib-rust/kson-sys/Cargo.toml cargo publish --dry-run --manifest-path lib-rust/kson/Cargo.toml \ --config 'patch.crates-io.kson-sys.path="lib-rust/kson-sys"' -
Publish
kson-sys:cargo publish --manifest-path lib-rust/kson-sys/Cargo.toml
-
Wait for the crates.io index to update (usually under a minute), then publish
kson-rs:cargo publish --manifest-path lib-rust/kson/Cargo.toml
Confirm the new version resolves from outside the repo:
cargo new /tmp/kson-smoke && cd /tmp/kson-smoke
cargo add kson-rs
cargo buildkson-lib npm package Publishing Process
The KSON JavaScript/TypeScript library is published to npm as @kson_org/kson with support for both browser and Node.js environments.
- You will need an npm account at https://www.npmjs.com/
- You will need publish access to the
@kson_org/ksonpackage
-
Take
kson_org-kson-X.Y.Z.tgzfromrelease-artifacts/portable/ -
Publish to npm:
npm login npm publish release-artifacts/portable/kson_org-kson-X.Y.Z.tgz --access=public
-
Verify the package is available at: https://www.npmjs.com/package/@kson_org/kson
lib-python Publishing Process
The Python package is published to PyPI as kson-lang using platform-specific wheels built by CircleCI.
- You will need a PyPI account at https://pypi.org/
- You will need the PyPI API token (stored in MM 1Password)
-
Ensure you've checked out the tag to be released and that
git statusis clean -
Copy
kson_lang-X.Y.Z.tar.gzfromrelease-artifacts/portable/into thelib-python/dist/directoryThis archive is source only: it carries no native library and cannot build one, so nobody installs from it. It puts the source on PyPI; every installable artifact is a wheel from step 3.
-
Copy the pre-built wheels from
release-artifacts/python-*/(one perbuild-python-wheel-*job) into thelib-python/dist/directory -
Upload to PyPI using
twine:cd lib-python ./uvw run python -m twine upload --repository pypi dist/* --verbose
- Use the API Token when prompted
-
Verify the package is available at: https://pypi.org/project/kson-lang/
tooling/cli Publishing Process
The three build-* CircleCI jobs each build the kson native binary for their platform and
store it as kson-cli-<arch>-<os>.tar.gz, holding kson, or kson.exe on Windows. Download all
three from this release's CI run; see
Release artifacts built by CircleCI.
- todo doc where these binaries get published — no distribution channel has been chosen yet
tooling/lsp-clients Publishing Process
The KSON language support includes VSCode extensions published to both the Visual Studio Code Marketplace and Open VSX Registry.
- GitHub account with access to publish to the marketplaces
- Access to https://marketplace.visualstudio.com
- Access to https://open-vsx.org
-
Take
vscode-kson-plugin.vsixfromrelease-artifacts/portable/ -
Publish to VS Code Marketplace:
- Login to https://marketplace.visualstudio.com with GitHub
- Navigate to the KSON extension
- Update/upload the extension with the built VSIX file
-
Publish to Open VSX Registry:
- Login to https://open-vsx.org/user-settings/extensions with GitHub
- Navigate to the KSON extension
- Update/upload the extension with the built VSIX file
-
Verify the extensions are available at:
- VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=kson.kson
- Open VSX: https://open-vsx.org/extension/kson/kson
tooling/lsp-clients/monaco Publishing Process
The Monaco editor integration is published to npm as @kson_org/monaco-editor.
- You will need a npm account at https://www.npmjs.com/
- You will need publish access to the
@kson_orgorganization
-
Take
kson_org-monaco-editor-X.Y.Z.tgzfromrelease-artifacts/portable/ -
Check what will be published:
tar tzf release-artifacts/portable/kson_org-monaco-editor-X.Y.Z.tgz # should list package/dist/ and package/dist-iframe/ tar xzOf release-artifacts/portable/kson_org-monaco-editor-X.Y.Z.tgz package/package.json # should have no "dependencies", and "devDependencies" linking two other kson projects
The bundle inlines
@kson/lsp-sharedandkson-language-server, which is why they aredevDependencies: the published package resolves nothing at install time beyond itsmonaco-editorandreactpeers. -
Publish to npm:
npm login npm publish release-artifacts/portable/kson_org-monaco-editor-X.Y.Z.tgz --access=public
-
Verify the package:
npm view @kson_org/monaco-editor dist-tags
latestshould now be the released version. Development builds are published under thedevtag, solatestotherwise keeps pointing at whichever prerelease was published without a tag.
tooling/jetbrains Publishing Process
Note: it is possible to automate this process us some Gradle tasks provided by the IntelliJ Platform Gradle Plugin, if/when this manual process become onerous.
-
Take
kson-language-X.Y.Z.zipfromrelease-artifacts/portable/ -
Manually upload to JetBrains Marketplace:
- Go to https://plugins.jetbrains.com/plugin/28510-kson-language and ensure you are logged in as a "Developer" of of the plugin.
- Upload the ZIP file