From b4703e5041365c21222a4d36114218ab153776e7 Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Sat, 14 Nov 2026 11:37:13 +0000 Subject: [PATCH 1/3] Allow modern hosts to omit the default compiler compatibility pin --- Cargo.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cd9b06a..d5eede5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -107,7 +107,11 @@ name = "durable_workflow" path = "src/lib.rs" [features] -default = [] +default = ["msrv-1-86"] +# Keep the legacy compiler dependency pin for default SDK builds. A host +# already using a newer Rust toolchain may disable default features to +# compose with libraries that require a newer builder macro. +msrv-1-86 = ["dep:bon"] telemetry = ["dep:opentelemetry", "dep:opentelemetry_sdk"] metrics-prometheus = ["dep:prometheus"] @@ -120,7 +124,7 @@ tracing = { version = "0.1", default-features = false, features = ["std"] } apache-avro = { version = "0.21", default-features = false } base64 = "0.22" # Keep apache-avro's dependency resolution compatible with the Rust 1.86 MSRV. -bon = { version = "=3.8.1", default-features = false } +bon = { version = "=3.8.1", default-features = false, optional = true } chrono = { version = "0.4", default-features = false, features = ["alloc"] } futures-util = "0.3" # Keep reqwest's IDNA dependency resolution compatible with the Rust 1.86 MSRV. From ff75c2a59029cc5c6ab510ca5af2e3acc06ae7b4 Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Sat, 14 Nov 2026 11:51:05 +0000 Subject: [PATCH 2/3] Document compiler opt-out and test native dependency composition --- .github/workflows/ci.yml | 6 ++++++ CHANGELOG.md | 6 ++++++ README.md | 10 ++++++++++ scripts/ci/README.md | 3 ++- scripts/ci/check-native-composition.sh | 26 ++++++++++++++++++++++++++ tests/native-composition/.gitignore | 2 ++ tests/native-composition/Cargo.toml | 15 +++++++++++++++ tests/native-composition/src/main.rs | 4 ++++ 8 files changed, 71 insertions(+), 1 deletion(-) create mode 100755 scripts/ci/check-native-composition.sh create mode 100644 tests/native-composition/.gitignore create mode 100644 tests/native-composition/Cargo.toml create mode 100644 tests/native-composition/src/main.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c6f271..191c5f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -231,6 +231,12 @@ jobs: key: ${{ runner.os }}-${{ runner.arch }}-sdk-tests-v2-lines-${{ steps.toolchain.outputs.cachekey }}-${{ steps.dependencies.outputs.key }} - run: cargo fmt --all --check - run: cargo test --locked --all-targets --all-features + - name: Check explicit Rust 1.86 compatibility without default features + if: ${{ matrix.rust == '1.86.0' }} + run: cargo check --locked --no-default-features --features msrv-1-86 + - name: Check modern native host dependency composition + if: ${{ matrix.rust == 'stable' }} + run: scripts/ci/check-native-composition.sh - name: Qualify ready-age metrics against the published native Server if: ${{ matrix.rust == '1.86.0' }} run: python3 scripts/ci/qualify-worker-metrics.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 13be16f..d4de3c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +- The default `msrv-1-86` feature retains the existing compiler-compatibility + dependency pin. Modern hosts can disable it to compose the SDK with native + Server's newer official Avro dependency. Rust 1.86 consumers that disable + default features must explicitly enable `msrv-1-86`; an unpinned fresh graph + can require a newer compiler. + - Service activity contexts expose negotiated, immutable acknowledged-heartbeat checkpoint details and a typed acknowledgement time. Unsupported claims stay unavailable, separately from a supported claim with no checkpoint. Heartbeat diff --git a/README.md b/README.md index 0c73867..0d07faa 100644 --- a/README.md +++ b/README.md @@ -1214,6 +1214,16 @@ negotiation remain required for individual features. ## Development +Default builds enable `msrv-1-86`, which keeps the builder-macro dependency pin +needed by fresh Rust 1.86 consumers. If you disable default features and still +require Rust 1.86, explicitly enable `msrv-1-86`. + +A host on a newer compiler can omit that feature to compose the SDK with the +native Server library and its newer official Avro dependency. Without the pin, +fresh dependency resolution can require a newer compiler. The native composition +check uses Rust 1.88 or later; this opt-out does not change SDK runtime APIs or +protocol negotiation. + ```sh cargo fmt --all --check cargo test --locked --all-targets --all-features diff --git a/scripts/ci/README.md b/scripts/ci/README.md index bf2ecf1..dbce270 100644 --- a/scripts/ci/README.md +++ b/scripts/ci/README.md @@ -1,10 +1,11 @@ # CI support -These scripts support four public repository checks: +These scripts support public repository checks: - replay and codec regression-corpus validation; - Apache Avro interoperability and performance checks; - publishable crate and fresh-consumer verification; +- compiler compatibility and native host dependency composition; - API documentation, analytics, navigation, and base-URL checks. The release workflow uses the crates.io publishing scripts after an immutable diff --git a/scripts/ci/check-native-composition.sh b/scripts/ci/check-native-composition.sh new file mode 100755 index 0000000..060d85e --- /dev/null +++ b/scripts/ci/check-native-composition.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +set -euo pipefail + +composition_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)" +composition_manifest="$composition_root/tests/native-composition/Cargo.toml" +composition_log="$(mktemp)" +trap 'rm -f -- "$composition_log"' EXIT + +# The modern host opts out; Cargo must compile both official Avro versions. +cargo check --manifest-path "$composition_manifest" + +# Re-enabling the legacy compiler pin must retain the real resolver refusal. +if cargo metadata --format-version 1 --manifest-path "$composition_manifest" \ + --features sdk-msrv-pin >"$composition_log" 2>&1; then + printf 'native composition unexpectedly accepted the incompatible MSRV pin\n' >&2 + exit 1 +fi +python3 -I -S -B - "$composition_log" <<'PY' +import pathlib +import sys + +error = pathlib.Path(sys.argv[1]).read_text() +if not all(value in error for value in ("bon", "3.8.1", "3.9.1")): + raise SystemExit("native composition failed without the expected bon constraint conflict") +print("modern composition builds; the explicit MSRV pin retains its resolver refusal") +PY diff --git a/tests/native-composition/.gitignore b/tests/native-composition/.gitignore new file mode 100644 index 0000000..042776a --- /dev/null +++ b/tests/native-composition/.gitignore @@ -0,0 +1,2 @@ +/Cargo.lock +/target/ diff --git a/tests/native-composition/Cargo.toml b/tests/native-composition/Cargo.toml new file mode 100644 index 0000000..6a7e5fb --- /dev/null +++ b/tests/native-composition/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "durable-workflow-native-composition-check" +version = "0.0.0" +edition = "2021" +rust-version = "1.88" +publish = false + +[workspace] + +[features] +sdk-msrv-pin = ["durable-workflow/msrv-1-86"] + +[dependencies] +durable-workflow = { path = "../..", default-features = false } +apache-avro = { version = "=0.22.0", default-features = false } diff --git a/tests/native-composition/src/main.rs b/tests/native-composition/src/main.rs new file mode 100644 index 0000000..37bff0a --- /dev/null +++ b/tests/native-composition/src/main.rs @@ -0,0 +1,4 @@ +fn main() { + let _client = durable_workflow::Client::builder("http://127.0.0.1:8080"); + let _schema = apache_avro::Schema::parse_str("\"null\"").unwrap(); +} From 60d99e64e894aafb9b39db98d9acd6181b82f747 Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Sat, 14 Nov 2026 11:54:19 +0000 Subject: [PATCH 3/3] Keep the positive composition lock free of the negative feature --- scripts/ci/check-native-composition.sh | 2 +- tests/native-composition/Cargo.toml | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/ci/check-native-composition.sh b/scripts/ci/check-native-composition.sh index 060d85e..6fe5103 100755 --- a/scripts/ci/check-native-composition.sh +++ b/scripts/ci/check-native-composition.sh @@ -11,7 +11,7 @@ cargo check --manifest-path "$composition_manifest" # Re-enabling the legacy compiler pin must retain the real resolver refusal. if cargo metadata --format-version 1 --manifest-path "$composition_manifest" \ - --features sdk-msrv-pin >"$composition_log" 2>&1; then + --features durable-workflow/msrv-1-86 >"$composition_log" 2>&1; then printf 'native composition unexpectedly accepted the incompatible MSRV pin\n' >&2 exit 1 fi diff --git a/tests/native-composition/Cargo.toml b/tests/native-composition/Cargo.toml index 6a7e5fb..7218bc0 100644 --- a/tests/native-composition/Cargo.toml +++ b/tests/native-composition/Cargo.toml @@ -7,9 +7,6 @@ publish = false [workspace] -[features] -sdk-msrv-pin = ["durable-workflow/msrv-1-86"] - [dependencies] durable-workflow = { path = "../..", default-features = false } apache-avro = { version = "=0.22.0", default-features = false }