From b6d9ef666f91ca7508a37535a7103aa1e8df1ca1 Mon Sep 17 00:00:00 2001 From: Lexo Liu Date: Sun, 13 Sep 2026 19:55:14 -0400 Subject: [PATCH 1/3] fix: mark the erased task handles `#[must_use]` Both `AnyLocalExecutorTask` and `AnyExecutorTask` cancel their future on drop, so a spawn whose handle is discarded never runs. The attribute turns that silent drop into a warning naming `.detach()`. Fixes #8 --- src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index bc5feb0..aca940a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -357,6 +357,10 @@ impl AnyLocalExecutor { /// This task can be awaited like any other task and provides the same /// cancellation and error handling capabilities as other task implementations. /// It wraps tasks from any [`LocalExecutor`] implementation in a type-erased manner. +/// +/// Dropping the task cancels the future, so a fire-and-forget spawn must call +/// [`detach`](Self::detach); the `must_use` turns a dropped handle into a warning. +#[must_use = "dropping the task cancels its future; await it, keep it, or call `.detach()`"] pub struct AnyLocalExecutorTask { inner: Pin + 'static>>, receiver: Receiver>, @@ -512,6 +516,10 @@ pub struct AnyExecutor(Box); /// /// This task can be awaited like any other task and provides the same /// cancellation and error handling capabilities. +/// +/// Dropping the task cancels the future, so a fire-and-forget spawn must call +/// [`detach`](Self::detach); the `must_use` turns a dropped handle into a warning. +#[must_use = "dropping the task cancels its future; await it, keep it, or call `.detach()`"] pub struct AnyExecutorTask { inner: Pin + Send>>, receiver: Receiver>, From f07b0b8589a75fe35085e90e697a9241b2008973 Mon Sep 17 00:00:00 2001 From: Lexo Liu Date: Mon, 9 Nov 2026 17:56:58 -0500 Subject: [PATCH 2/3] ci: open the release-plz bump PR against dev, publish on main --- .github/workflows/release.yml | 106 ++++++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e67c0dc..b93fd73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,36 +1,82 @@ name: Release +# `release` publishes what a push to `main` carries; the required checks on +# `main` already proved the merged commit. `release-pr` keeps the version bump +# and changelog pull request open against `dev` on every push to `dev`. The +# bump belongs on `dev` because a pull request opened with the default +# `GITHUB_TOKEN` starts no workflow runs, so one targeting `main` could never +# satisfy the required check there. on: - push: - branches: - - main - -permissions: - contents: write - pull-requests: write - id-token: write + push: + branches: [main, dev] jobs: - release-plz: - name: Release-plz - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install Rust - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: stable - - # Mint a short-lived crates.io token from the GitHub OIDC - # identity instead of a stored CARGO_REGISTRY_TOKEN. - - uses: rust-lang/crates-io-auth-action@v1 - id: crates-io-auth + release: + name: Publish release + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: read + id-token: write + concurrency: + group: release-publish-main + cancel-in-progress: false + steps: + - name: Checkout the pushed main commit + uses: actions/checkout@v6 + with: + ref: ${{ github.sha }} + fetch-depth: 0 + persist-credentials: false + - &rust-toolchain + name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + # Mint a short-lived crates.io token from the GitHub OIDC identity + # instead of a stored CARGO_REGISTRY_TOKEN. + - uses: rust-lang/crates-io-auth-action@v1 + id: crates-io-auth + - name: Publish unpublished crate version + uses: release-plz/action@v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} - - name: Run release-plz - uses: MarcoIeni/release-plz-action@v0.5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} + release-pr: + name: Prepare next release + if: github.ref == 'refs/heads/dev' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + concurrency: + group: release-plz-dev + cancel-in-progress: false + steps: + - name: Checkout the pushed dev commit + uses: actions/checkout@v6 + with: + ref: dev + fetch-depth: 0 + persist-credentials: false + - name: Verify pushed commit + env: + EXPECTED_SHA: ${{ github.sha }} + run: | + actual_sha="$(git rev-parse HEAD)" + if [[ "$actual_sha" != "$EXPECTED_SHA" ]]; then + echo "::error::dev moved after this push: expected $EXPECTED_SHA, checked out $actual_sha" + exit 1 + fi + - *rust-toolchain + # The pull request lands the bump on `dev`; the release itself is the + # `dev` -> `main` pull request that carries it, which runs the full + # check set. + - name: Create or update release PR + uses: release-plz/action@v0.5 + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 163173b5137f77c24feb627f12981e541e8a43af Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 23:02:40 +0000 Subject: [PATCH 3/3] chore: release v0.7.2 --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ Cargo.toml | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a00de36..95cd3bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.7.2](https://github.com/lexoliu/executor-core/compare/v0.7.1...v0.7.2) - 2026-11-09 + +### Added + +- compio backend + +### Fixed + +- mark the erased task handles `#[must_use]` +- gate the tokio backend to non-wasm targets + +### Other + +- Merge pull request #9 from lexoliu/fix/task-must-use +- open the release-plz bump PR against dev, publish on main +- accept an empty test run for the default feature set +- merge main into dev +- raise the MSRV to 1.95 +- gate compio off wasm32 and raise the MSRV to 1.93 +- run tests with cargo nextest ([#10](https://github.com/lexoliu/executor-core/pull/10)) +- publish to crates.io via OIDC trusted publishing ([#6](https://github.com/lexoliu/executor-core/pull/6)) +- gate pull requests into main so only dev may merge ([#7](https://github.com/lexoliu/executor-core/pull/7)) +- use Waker::noop() instead of a hand-rolled TestWaker +- use stable toolchain +- add rust-cache to dep-check workflow +- add weekly dependency check workflow + ## [0.7.1](https://github.com/lexoliu/executor-core/compare/v0.7.0...v0.7.1) - 2025-12-09 ### Other diff --git a/Cargo.toml b/Cargo.toml index eee1638..0522e30 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "executor-core" -version = "0.7.1" +version = "0.7.2" authors = ["Lexo Liu "] edition = "2024" rust-version = "1.95"