From 6e9b5af88d53c7a265fed6fa3aabf66e9b3feee3 Mon Sep 17 00:00:00 2001 From: cflmy Date: Sun, 22 Nov 2026 22:08:04 +0800 Subject: [PATCH] Prepare 3.0.0-rc.1 and verify the locked Rust minimum --- .woodpecker/main.yml | 9 +++++- CHANGELOG.md | 7 ++++- Cargo.lock | 30 +++++++++---------- Cargo.toml | 4 +-- README.md | 6 ++-- crates/cli/tests/package_env.rs | 49 ++++++++++++++++++------------- crates/cli/tests/tool_protocol.rs | 42 ++++++++++++++------------ 7 files changed, 85 insertions(+), 62 deletions(-) diff --git a/.woodpecker/main.yml b/.woodpecker/main.yml index 84cb984..e4a6691 100644 --- a/.woodpecker/main.yml +++ b/.woodpecker/main.yml @@ -32,9 +32,16 @@ steps: - rustup target add x86_64-pc-windows-gnu - cargo check --workspace --all-targets --target x86_64-pc-windows-gnu + minimum-rust: + image: rust:1.89-bookworm + commands: + - apt-get update + - apt-get install -y --no-install-recommends build-essential ca-certificates + - cargo check --locked --workspace --all-targets + build: image: rust:1.100-bookworm - depends_on: [test] + depends_on: [test, minimum-rust] commands: - apt-get update - apt-get install -y --no-install-recommends ca-certificates git openssl python3 build-essential diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c355c6..9db6034 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,12 @@ Foreign wire v1, Provider manifest v2, lock v4) and independent package versions (including the bundled stdlib `0.1.0`) are versioned separately and do not follow the product version. Dates use ISO 8601. -## Unreleased (post `3.0.0-beta.1`) +## 3.0.0-rc.1 (candidate) + +- The Rust workspace, CLI version output and protocol producers report + `3.0.0-rc.1`. The locked workspace requires Rust 1.89. +- The candidate targets Linux x86_64 with glibc. See + [release gates](docs/releasing.md) for the evidence required for publication. ### Core/extension boundary — RFC-EXT-0003 (issue #3) diff --git a/Cargo.lock b/Cargo.lock index 23f6537..5cb9260 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -412,7 +412,7 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "marqdo-cli" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "clap", "hex", @@ -438,7 +438,7 @@ dependencies = [ [[package]] name = "marqdo-expression" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "marqdo-span", "num-bigint", @@ -449,7 +449,7 @@ dependencies = [ [[package]] name = "marqdo-foreign" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "hex", "libc", @@ -465,7 +465,7 @@ dependencies = [ [[package]] name = "marqdo-frontend" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "marqdo-expression", "marqdo-ir", @@ -480,7 +480,7 @@ dependencies = [ [[package]] name = "marqdo-host" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "flate2", "getrandom 0.4.3", @@ -504,7 +504,7 @@ dependencies = [ [[package]] name = "marqdo-ir" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "marqdo-expression", "marqdo-span", @@ -514,7 +514,7 @@ dependencies = [ [[package]] name = "marqdo-markdown" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "comrak", "marqdo-span", @@ -525,7 +525,7 @@ dependencies = [ [[package]] name = "marqdo-package" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "hex", "semver", @@ -539,7 +539,7 @@ dependencies = [ [[package]] name = "marqdo-plugin-abi" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "hex", "libloading", @@ -554,7 +554,7 @@ dependencies = [ [[package]] name = "marqdo-plugin-sdk" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "marqdo-plugin-abi", "serde", @@ -563,7 +563,7 @@ dependencies = [ [[package]] name = "marqdo-provider-worker" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "libloading", "marqdo-host", @@ -575,7 +575,7 @@ dependencies = [ [[package]] name = "marqdo-runtime" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "marqdo-expression", "marqdo-frontend", @@ -594,7 +594,7 @@ dependencies = [ [[package]] name = "marqdo-sandbox" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "libc", "serde", @@ -602,14 +602,14 @@ dependencies = [ [[package]] name = "marqdo-span" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "serde", ] [[package]] name = "marqdo-value" -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" dependencies = [ "marqdo-span", "num-bigint", diff --git a/Cargo.toml b/Cargo.toml index 3c03a72..fb221f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,9 +19,9 @@ members = [ ] [workspace.package] -version = "3.0.0-beta.1" +version = "3.0.0-rc.1" edition = "2021" -rust-version = "1.82" +rust-version = "1.89" license = "MIT OR Apache-2.0" repository = "https://github.com/cflmy/marqdo-cli" authors = ["Marqdo contributors"] diff --git a/README.md b/README.md index c9a4b61..e8b8e75 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The official implementation is a Rust workspace; Python/Node are optional foreign kernels, never the compiler target. This repository is the new, independent Marqdo toolchain, now at product -version **`3.0.0-beta.1`**. It is **not** a compatibility rewrite of +version **`3.0.0-rc.1`** in this checkout. It is **not** a compatibility rewrite of `cflmy/marqdo`; the old syntax, package format and plugin ABI v2 are not claimed to work here. See [docs/developers/](docs/developers/README.md) for the third-party entry point and `docs/MARQDO_3_0_PRERELEASE_PLAN.md` for the beta @@ -27,7 +27,7 @@ release policy. > [`docs/STATUS.md`](docs/STATUS.md) and > [`docs/migration/README.md`](docs/migration/README.md). -> **Status: `3.0.0-beta.1` prerelease** — +> **Published baseline: `3.0.0-beta.1` prerelease** — > [release](https://git.cflmy.cn/cflmy/marqdo-cli/releases/tag/v3.0.0-beta.1), > source `2c7c4f31e7a388d3fcfa717a77067e696ed13854`. The public beta target is **Linux x86_64 (glibc)**; macOS and Windows are experimental and not claimed, and the > C ABI plugin/provider paths are Linux-only in this beta. The language @@ -53,7 +53,7 @@ mirror is not used as the authoritative lane for this beta. ## Build -Requires Rust 1.82+. +Requires Rust 1.89 or newer for the locked workspace. ```bash cargo build -p marqdo-cli diff --git a/crates/cli/tests/package_env.rs b/crates/cli/tests/package_env.rs index 6470ad4..d345d2e 100644 --- a/crates/cli/tests/package_env.rs +++ b/crates/cli/tests/package_env.rs @@ -436,30 +436,37 @@ fn tampered_path_dependency_content_is_rejected_by_locked_sync() { } #[test] -fn incompatible_project_marqdo_range_fails_closed_before_program_load() { +fn project_marqdo_range_applies_to_the_running_core() { let dir = TempDir::new("runtime-range"); let root = dir.path(); - write( - &root.join("marqdo.yaml"), - "project:\n name: stale\n version: 0.1.0\n marqdo: \">=0.1,<1\"\n", - ); + let core = env!("CARGO_PKG_VERSION"); write(&root.join("index.mq.md"), "## @exec main\n\n`return 1`\n"); - for command in [["check", "index.mq.md"], ["run", "index.mq.md"]] { - let output = cli(root, &command); - assert!( - !output.status.success(), - "{} must fail closed: {}", - command[0], - String::from_utf8_lossy(&output.stderr) - ); - let stderr = String::from_utf8_lossy(&output.stderr); - assert!( - stderr.contains("package.marqdo_incompatible"), - "unexpected stderr: {stderr}" - ); - assert!( - stderr.contains(env!("CARGO_PKG_VERSION")), - "diagnostic must name the running core: {stderr}" + + for (range, compatible) in [ + (">=3.0.0-beta.1,<4.0.0".to_string(), true), + (format!("={core}"), true), + (">=3.0.0,<4.0.0".to_string(), !core.contains('-')), + (">=0.1,<1".to_string(), false), + ] { + write( + &root.join("marqdo.yaml"), + &format!("project:\n name: runtime-range\n version: 0.1.0\n marqdo: \"{range}\"\n"), ); + for command in ["check", "run"] { + let output = cli(root, &[command, "index.mq.md"]); + let stderr = String::from_utf8_lossy(&output.stderr); + assert_eq!( + output.status.success(), + compatible, + "{command}: {range} on {core}: {stderr}" + ); + if !compatible { + assert!(stderr.contains("package.marqdo_incompatible"), "{stderr}"); + assert!( + stderr.contains(core), + "diagnostic must name the running core: {stderr}" + ); + } + } } } diff --git a/crates/cli/tests/tool_protocol.rs b/crates/cli/tests/tool_protocol.rs index d727efa..2189bd8 100644 --- a/crates/cli/tests/tool_protocol.rs +++ b/crates/cli/tests/tool_protocol.rs @@ -451,35 +451,39 @@ fn a_root_record_json_in_the_source_package_is_rejected() { } #[test] -fn beta_core_requires_an_explicit_prerelease_compatible_range() { +fn prerelease_core_requires_an_explicit_prerelease_compatible_range() { let dir = TempDir::new("prerelease-range"); let home = dir.path().join("home"); let core = env!("CARGO_PKG_VERSION"); - // The shipped example range opt-in must install on this real core. - let manifest = write_tool(dir.path(), "prerelease", "#!/bin/sh\nexit 0\n"); - let install = cli(&home, &["tool", "install", manifest.to_str().unwrap()]); - assert_eq!(install.status.code(), Some(0), "{}", stderr(&install)); - - if core.contains('-') { - // SemVer: a stable-only requirement must not silently accept a - // prerelease core. The operator has to opt in with a prerelease range. - let manifest = write_tool(dir.path(), "stableonly", "#!/bin/sh\nexit 0\n"); + for (range, compatible) in [ + (">=3.0.0-beta.1,<4.0.0".to_string(), true), + (format!("={core}"), true), + (">=3.0.0,<4.0.0".to_string(), !core.contains('-')), + (">=0.1,<1".to_string(), false), + ] { + let manifest = write_tool(dir.path(), "prerelease", "#!/bin/sh\nexit 0\n"); let text = std::fs::read_to_string(&manifest) .unwrap() - .replace(">=3.0.0-beta.1,<4.0.0", ">=3.0.0,<4.0.0"); + .replace(">=3.0.0-beta.1,<4.0.0", &range); std::fs::write(&manifest, text).unwrap(); let output = cli(&home, &["tool", "install", manifest.to_str().unwrap()]); assert_eq!( - output.status.code(), - Some(1), - "a stable-only range must reject prerelease core {core}: {}", - stderr(&output) - ); - assert!( - stderr(&output).contains("requires marqdo"), - "{}", + output.status.success(), + compatible, + "{range} on {core}: {}", stderr(&output) ); + if compatible { + assert!(cli(&home, &["tool", "remove", "prerelease"]) + .status + .success()); + } else { + assert!( + stderr(&output).contains("requires marqdo"), + "{}", + stderr(&output) + ); + } } }