Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 160 additions & 0 deletions .agents/skills/fory-version-bump/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
---
name: fory-version-bump
description: Bump Apache Fory release or post-release development versions across Java, Kotlin, Scala, Python, Rust, Go, C++, C#, Dart, JavaScript, Swift, integration tests, examples, and source docs. Use when preparing a release version, moving main to the next development version, switching install docs to a released version, or auditing Fory version consistency after release scripts run.
---

# Fory Version Bump

## Mission

Move Apache Fory versions consistently across package metadata, build files, integration tests, examples, lockfiles, and source documentation without mixing release install docs with next-development package versions.

This skill is a guardrail, not a complete source of truth. Version surfaces change over time. After following the checklist, run an independent audit pass to find missed files, stale docs, generated lockfiles, and inconsistent ecosystem-specific version formats.

## Load Context

1. Read `AGENTS.md`, `tasks/lessons.md`, `.agents/docs-and-formatting.md`, and `.agents/ci-and-pr.md`.
2. Check `./.local/AGENTS.md` if it exists.
3. If touching language-specific build files beyond version strings, read the matching `.agents/languages/*.md`.
4. Inspect current dirty state before editing:

```bash
git status --short --branch
```

## Decide Version Intent

Separate these two targets before editing:

- **Release/package version**: the version being released, for example `1.0.0`.
- **Next development version**: the version after release, for example `1.1.0-dev`.

Common post-release split:

- Active package/build metadata moves to next development version.
- User-facing install docs, examples, and package-manager snippets point at the released version.
- Website repository configuration is out of this repo; do not edit `fory-site` unless the current user explicitly asks for that repository too.

## Ecosystem Version Forms

Prefer `ci/release.py` normalization instead of hand-converting every ecosystem.

For input `1.1.0-dev`, expected forms are:

| Surface | Expected form |
| ----------------------------------------------- | ---------------- |
| Java, Kotlin, Scala, Maven integration projects | `1.1.0-SNAPSHOT` |
| Python and compiler packages | `1.1.0.dev0` |
| Rust packages and path dependency versions | `1.1.0-alpha.0` |
| Go module dependencies on Fory | `v1.1.0-alpha.0` |
| JavaScript package versions | `1.1.0-alpha.0` |
| Dart packages | `1.1.0-dev` |
| C# package metadata | `1.1.0-dev` |
| CMake project versions | `1.1.0` |
| Bazel module version | `1.1.0` |
| User install docs after a `1.0.0` release | `1.0.0` |

Do not rewrite unrelated third-party dependency versions, benchmark numbers, old changelog sections, generated build outputs under ignored `bin/`, `obj/`, `target/`, or lockfile third-party package entries.

## Primary Workflow

1. Make or update the durable task file when the bump is broad.
2. Run the release helper for package/build metadata:

```bash
python ci/release.py bump_version -l all -version <next-dev-version>
```

3. Audit release-helper gaps. Historically important surfaces include:

- `MODULE.bazel`
- `javascript/package-lock.json`
- `integration_tests/idl_tests/kotlin/pom.xml`
- `integration_tests/idl_tests/dart/pubspec.yaml`
- `integration_tests/idl_tests/rust/Cargo.lock`
- Package-level changelogs, especially `dart/packages/fory/CHANGELOG.md`

4. Update source docs and examples:

- `README.md`
- Runtime README files such as `java/README.md`, `rust/README.md`, `scala/README.md`, `csharp/README.md`, `swift/README.md`, `dart/packages/fory/README.md`
- `docs/guide/**`
- `docs/compiler/**` when compiler examples include Fory package versions
- `examples/**`

5. Keep the doc split clean:

- Install snippets for released packages use the release version.
- Development build files use the next development version.
- Snapshot-only internal test docs may use the snapshot version when they describe local Maven consumption.
- Package publishing changelogs must mention the package version being published before the post-release development bump. Dart pub validates `CHANGELOG.md` for the current package version and can fail publication when the release version is missing.

## Independent Audit Pass

Always do a fresh audit after the mechanical bump. Do not assume the checklist above is complete.

Recommended searches:

```bash
rg -n '0\.(13|14|16|17|18)(\.0|-dev|-alpha\.0)?|v0\.17\.0' \
README.md docs csharp/README.md swift/README.md scala/README.md \
java/README.md rust/README.md dart/packages/fory/README.md examples \
--glob '!docs/benchmarks/**' --glob '!**/target/**' --glob '!**/build/**' \
--glob '!**/node_modules/**'

rg -n '<next-dev-version-regex>' \
README.md docs csharp/README.md swift/README.md scala/README.md \
java/README.md rust/README.md dart/packages/fory/README.md examples \
--glob '!**/target/**' --glob '!**/build/**' --glob '!**/node_modules/**'

rg -n '<previous-release-or-dev-version-regex>' \
--glob '!tasks/**' --glob '!**/target/**' --glob '!**/build/**' \
--glob '!**/bin/**' --glob '!**/obj/**' --glob '!**/node_modules/**'
```

Then inspect every hit. Expected false positives include third-party dependency versions, benchmark measurements, historical changelog sections, and tests whose data intentionally contains version-like values.

## Verification Checklist

- [ ] `git status --short --branch` reviewed before edits.
- [ ] Release and next-development target versions are written down.
- [ ] `ci/release.py bump_version` was run when applicable.
- [ ] Helper gaps were audited and patched.
- [ ] CMake/Bazel use numeric versions, not `.dev` suffixes.
- [ ] Maven/SBT/Kotlin versions use `-SNAPSHOT` for development.
- [ ] Python versions use PEP 440 form such as `.dev0`.
- [ ] Rust, Go, and JavaScript versions use semver prerelease form such as `-alpha.0`.
- [ ] Dart and C# development versions use `-dev`.
- [ ] User-facing install docs use the released version, not the next development version.
- [ ] Package-level `CHANGELOG.md` files mention the exact released package version before publishing.
- [ ] Post-release changelogs retain or add a top next-development section only after the released version section exists.
- [ ] `javascript/package-lock.json` is consistent with changed JS package versions.
- [ ] Rust lockfiles for touched integration tests are consistent with changed Rust package versions.
- [ ] Markdown files outside `tasks/` were formatted with Prettier.
- [ ] JSON package files parse successfully.
- [ ] POM files parse or Maven parent validates.
- [ ] CMake config validates when CMake project versions changed.
- [ ] Independent audit pass found no unexplained stale or inconsistent Fory version hits.
- [ ] Task files under `tasks/` were not staged.

## Useful Validation Commands

```bash
prettier --write <changed-markdown-files>
git diff --check
node -e 'const fs=require("fs"); for (const p of process.argv.slice(1)) JSON.parse(fs.readFileSync(p,"utf8"));' \
javascript/package-lock.json javascript/packages/core/package.json javascript/packages/hps/package.json
mvn -q -f java/pom.xml -N validate
mvn -q -f kotlin/pom.xml -N validate
cmake -S cpp -B /tmp/fory-cmake-version-check -DFORY_BUILD_TESTS=OFF
cargo metadata --locked --format-version 1
```

Run commands from the relevant working directory. For `cargo metadata`, use the specific Rust workspace or integration test directory whose lockfile changed.

## Finish

- Summarize exact version forms used by ecosystem.
- List audit searches and validation commands.
- Note any intentionally retained old version hits.
- Commit tracked code and documentation changes, excluding task scratch files.
21 changes: 21 additions & 0 deletions .agents/skills/fory-version-bump/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

interface:
display_name: "Fory Version Bump"
short_description: "Bump Fory release and development versions across runtimes"
default_prompt: "Bump Apache Fory versions across package metadata, build files, integration tests, examples, and source docs, then run an independent audit for missed or inconsistent version surfaces."
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

module(
name = "fory",
version = "0.18.0",
version = "1.1.0",
)

# Platforms (needed for platform-specific build configurations)
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,30 +133,30 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-core</artifactId>
<version>0.17.0</version>
<version>1.0.0</version>
</dependency>
```

Gradle:

```gradle
implementation "org.apache.fory:fory-core:0.17.0"
implementation "org.apache.fory:fory-core:1.0.0"
```

**Scala**

sbt:

```scala
libraryDependencies += "org.apache.fory" %% "fory-scala" % "0.17.0"
libraryDependencies += "org.apache.fory" %% "fory-scala" % "1.0.0"
```

**Kotlin**

Gradle:

```kotlin
implementation("org.apache.fory:fory-kotlin:0.17.0")
implementation("org.apache.fory:fory-kotlin:1.0.0")
```

Maven:
Expand All @@ -165,7 +165,7 @@ Maven:
<dependency>
<groupId>org.apache.fory</groupId>
<artifactId>fory-kotlin</artifactId>
<version>0.17.0</version>
<version>1.0.0</version>
</dependency>
```

Expand All @@ -187,7 +187,7 @@ pip install "pyfory[format]"

```toml
[dependencies]
fory = "0.17"
fory = "1.0.0"
```

**C++**
Expand All @@ -199,7 +199,7 @@ include(FetchContent)
FetchContent_Declare(
fory
GIT_REPOSITORY https://github.com/apache/fory.git
GIT_TAG v0.17.0
GIT_TAG v1.0.0
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(fory)
Expand All @@ -210,8 +210,8 @@ Bazel:

```bazel
# MODULE.bazel
bazel_dep(name = "fory", version = "0.17.0")
git_override(module_name = "fory", remote = "https://github.com/apache/fory.git", commit = "v0.17.0")
bazel_dep(name = "fory", version = "1.0.0")
git_override(module_name = "fory", remote = "https://github.com/apache/fory.git", commit = "v1.0.0")

# BUILD
deps = ["@fory//cpp/fory/serialization:fory_serialization"]
Expand Down Expand Up @@ -244,13 +244,13 @@ npm install @apache-fory/core @apache-fory/hps
**C#**

```bash
dotnet add package Apache.Fory --version 0.17.0
dotnet add package Apache.Fory --version 1.0.0
```

**Dart**

```bash
dart pub add fory:^0.17.0
dart pub add fory:^1.0.0
dart pub add dev:build_runner
```

Expand All @@ -260,7 +260,7 @@ Add Fory to `Package.swift`:

```swift
dependencies: [
.package(url: "https://github.com/apache/fory.git", exact: "0.17.0")
.package(url: "https://github.com/apache/fory.git", exact: "1.0.0")
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if(POLICY CMP0169)
endif()

project(fory_cpp_benchmark
VERSION 0.18.0
VERSION 1.1.0
DESCRIPTION "C++ Benchmark comparing Fory, Protobuf, and Msgpack serialization"
LANGUAGES CXX
)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module github.com/apache/fory/benchmarks/go
go 1.24.0

require (
github.com/apache/fory/go/fory v0.18.0-alpha.0
github.com/apache/fory/go/fory v1.1.0-alpha.0
github.com/vmihailenco/msgpack/v5 v5.4.1
google.golang.org/protobuf v1.36.0
)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<artifactId>fory-parent</artifactId>
<groupId>org.apache.fory</groupId>
<version>0.18.0-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
</parent>

<artifactId>benchmark</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[package]
name = "fory-benchmarks"
version = "0.18.0-alpha.0"
version = "1.1.0-alpha.0"
edition = "2021"

[[bin]]
Expand Down
2 changes: 1 addition & 1 deletion compiler/fory_compiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

"""Fory IDL compiler for Apache Fory."""

__version__ = "0.18.0.dev0"
__version__ = "1.1.0.dev0"

from fory_compiler.ir.ast import Schema, Message, Enum, Field, EnumValue, Import
from fory_compiler.frontend.fdl import FDLFrontend
Expand Down
2 changes: 1 addition & 1 deletion compiler/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "fory-compiler"
version = "0.18.0.dev0"
version = "1.1.0.dev0"
description = "FDL (Fory Definition Language) compiler for Apache Fory cross-language serialization"
readme = "README.md"
license = {text = "Apache-2.0"}
Expand Down
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
cmake_minimum_required(VERSION 3.16)

project(fory
VERSION 0.18.0
VERSION 1.1.0
DESCRIPTION "Apache Fory - A blazingly fast multi-language serialization framework"
LANGUAGES CXX
)
Expand Down
2 changes: 1 addition & 1 deletion csharp/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>0.18.0-dev</Version>
<Version>1.1.0-dev</Version>
<Authors>Apache Software Foundation</Authors>
<Company>Apache Software Foundation</Company>
<Description>Apache Fory for .NET provides high-performance cross-language serialization with source-generated serializers and schema evolution support.</Description>
Expand Down
2 changes: 1 addition & 1 deletion csharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ From NuGet, reference the single `Apache.Fory` package. It includes the runtime

```xml
<ItemGroup>
<PackageReference Include="Apache.Fory" Version="0.17.0" />
<PackageReference Include="Apache.Fory" Version="1.0.0" />
</ItemGroup>
```

Expand Down
4 changes: 2 additions & 2 deletions dart/packages/fory-test/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@

name: fory_test
description: Apache Fory Dart consumer and integration tests
version: 0.18.0-dev
version: 1.1.0-dev

resolution: workspace

environment:
sdk: ^3.7.0

dependencies:
fory: 0.18.0-dev
fory: 1.1.0-dev

dev_dependencies:
build_runner: '>=2.7.0 <3.0.0'
Expand Down
Loading
Loading