From 981caa649b280fe2df1a23b2c611486dcdd16032 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Sat, 15 Jul 2023 13:05:54 +0200 Subject: [PATCH] Fix workspace issues when building for stable. --- .github/workflows/test.yml | 2 +- Cargo.stable.toml | 20 ++++++++++++++++++++ Cargo.toml | 5 ++--- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 Cargo.stable.toml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9314fc3..a2fa0d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: toolchain: ${{ matrix.rust }} target: ${{ matrix.target }} - - run: sed -i '/nightly-only/d' Cargo.toml + - run: mv Cargo.stable.toml Cargo.toml if: matrix.rust != 'nightly' - run: cargo check --target=${{ matrix.target }} --features=${{ matrix.features }} diff --git a/Cargo.stable.toml b/Cargo.stable.toml new file mode 100644 index 0000000..78f6fd3 --- /dev/null +++ b/Cargo.stable.toml @@ -0,0 +1,20 @@ +# CI moves this file to `Cargo.toml` when building for stable. + +[workspace] +resolver = "2" + +members = [ + "embedded-hal", + "embedded-hal-nb", + "embedded-hal-bus", + "embedded-can", + "embedded-io", + "embedded-io-adapters", +] + +# Cargo implicitly adds path dependencies to the workspace. +# Even if they're optional and not enabled. This prevents that. +exclude = [ + "embedded-hal-async", + "embedded-io-async", +] \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index ccfa1e0..eb28321 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,13 @@ [workspace] resolver = "2" -# CI removes lines containing 'nightly-only' when not building with nightly. members = [ "embedded-hal", - "embedded-hal-async", # nightly-only + "embedded-hal-async", "embedded-hal-nb", "embedded-hal-bus", "embedded-can", "embedded-io", - "embedded-io-async", # nightly-only + "embedded-io-async", "embedded-io-adapters", ]