From 4542ba1f702b8f0d134e28b316f8d6ab2d395008 Mon Sep 17 00:00:00 2001 From: Jonathan Schwender Date: Tue, 2 Aug 2022 04:46:40 +0200 Subject: [PATCH] Increase the MSRV for Corrosion to 1.46 Recently all CI builds using rust 1.44.1 have been failing on CI with the following error message: ``` error: failed to get `cargo_metadata` as a dependency of package `corrosion-generator v0.1.0 (/home/runner/work/corrosion/corrosion/generator)` Caused by: failed to fetch `https://github.com/rust-lang/crates.io-index` Caused by: error reading from the zlib stream; class=Zlib (5) CMake Error at cmake/Corrosion.cmake:427 (message): corrosion-generator failed: 101 Call Stack (most recent call first): test/cpp2rust/CMakeLists.txt:1 (corrosion_import_crate) ``` The relevant issue is probably https://github.com/rust-lang/cargo/issues/8258. Starting with cargo 1.46 the CI failures are resolved --- .github/workflows/test.yaml | 20 ++------------------ RELEASES.md | 24 ++++++++++++++++-------- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 89c42ec6..62791eae 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -34,8 +34,7 @@ jobs: - 3.15.7 - 3.19.0 rust: - - 1.44.1 # Earliest targeted version - - 1.45.0 # Earliest version compatible with Windows GNU + - 1.46.0 # MSRV Minimum supported rust version - stable - nightly generator: @@ -82,21 +81,6 @@ jobs: - os: macos-12 abi: gnu - # Rust - # Build each set only with the earliest compatible versioned Rust - - os: macos-12 - rust: 1.45.0 - - os: ubuntu-latest - rust: 1.45.0 - - os: windows-2019 - abi: msvc - rust: 1.45.0 - # Prior to 1.45.0, -nostdlib is erroneously passed to g++ when for the *-pc-windows-gnu - # target. See: https://github.com/rust-lang/rust/pull/71769 - - os: windows-2019 - abi: gnu - rust: 1.44.1 - steps: - name: Determine Rust OS id: determine_rust_os @@ -266,7 +250,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.44.1 + toolchain: 1.46.0 default: true - name: CMake Version run: cmake --version diff --git a/RELEASES.md b/RELEASES.md index 5b155e79..4e48daa3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,10 +1,18 @@ +# Unreleased + +# Breaking + +- The minimum supported rust version was increased to 1.46. No breaking changes have been added + yet, but 1.44.1 is not officially supported anymore, due to an issue with cargo in CI for that + version. + # 0.2.1 (2022-05-07) ## Fixes - Fix missing variables provided by corrosion, when corrosion is used as a subdirectory ([181](https://github.com/corrosion-rs/corrosion/pull/181)): Public [Variables](https://github.com/corrosion-rs/corrosion#information-provided-by-corrosion) set - by Corrosion were not visible when using Corrosion as a subdirectory, due to the wrong scope of + by Corrosion were not visible when using Corrosion as a subdirectory, due to the wrong scope of the variables. This was fixed by promoting the respective variables to Cache variables. # 0.2.0 (2022-05-05) @@ -24,7 +32,7 @@ `corrosion_set_features()`. See the updated Readme for details. - `CORROSION_ENVIRONMENT_VARIABLES`. Please use `corrosion_set_env_vars()` instead. - `CORROSION_USE_HOST_BUILD`. Please use `corrosion_set_hostbuild()` instead. -- The Minimum CMake version will likely be increased for the next major release. At the very least we want to drop +- The Minimum CMake version will likely be increased for the next major release. At the very least we want to drop support for CMake 3.12, but requiring CMake 3.16 or even 3.18 is also on the table. If you are using a CMake version that would be no longer supported by corrosion, please comment on issue [#168](https://github.com/corrosion-rs/corrosion/issues/168), so that we can gauge the number of affected users. @@ -33,7 +41,7 @@ - Add `NO_STD` option to `corrosion_import_crate` ([#154](https://github.com/corrosion-rs/corrosion/pull/154)). - Remove the requirement of building the Rust based generator crate for CMake >= 3.19. This makes using corrosion as - a subdirectory as fast as the installed version (since everything is done in CMake). + a subdirectory as fast as the installed version (since everything is done in CMake). ([#131](https://github.com/corrosion-rs/corrosion/pull/131), [#161](https://github.com/corrosion-rs/corrosion/pull/161)) If you do choose to install Corrosion, then by default the old Generator is still compiled and installed, so you can fall back to using it in case you use multiple cmake versions on the same machine for different projects. @@ -44,13 +52,13 @@ [#164](https://github.com/corrosion-rs/corrosion/pull/164)). - Improve robustness of parsing the LLVM version (exported in `Rust_LLVM_VERSION`). It now also works for Rust versions, where the LLVM version is reported as `MAJOR.MINOR`. ([#148](https://github.com/corrosion-rs/corrosion/pull/148)) -- Fix a bug which occurred when Corrosion was added multiple times via `add_subdirectory()` +- Fix a bug which occurred when Corrosion was added multiple times via `add_subdirectory()` ([#143](https://github.com/corrosion-rs/corrosion/pull/143)). -- Set `CC_` and `CXX_` environment variables for the invocation of - `cargo build` to the compilers selected by CMake (if any) +- Set `CC_` and `CXX_` environment variables for the invocation of + `cargo build` to the compilers selected by CMake (if any) ([#138](https://github.com/corrosion-rs/corrosion/pull/138) and [#161](https://github.com/corrosion-rs/corrosion/pull/161)). This should ensure that C dependencies built in cargo buildscripts via [cc-rs](https://github.com/alexcrichton/cc-rs) - use the same compiler as CMake built dependencies. Users can override the compiler by specifying the higher + use the same compiler as CMake built dependencies. Users can override the compiler by specifying the higher priority environment variable variants with dashes instead of underscores (See cc-rs documentation for details). - Fix Ninja-Multiconfig Generator support for CMake versions >= 3.20. Previous CMake versions are missing a feature, which prevents us from supporting the Ninja-Multiconfig generator. ([#137](https://github.com/corrosion-rs/corrosion/pull/137)) @@ -64,7 +72,7 @@ September 2021. ## New features - [Add --profile support for rust >= 1.57](https://github.com/corrosion-rs/corrosion/pull/130): - Allows users to specify a custom cargo profile with + Allows users to specify a custom cargo profile with `corrosion_import_crate(... PROFILE )`. - [Add support for specifying per-target Rustflags](https://github.com/corrosion-rs/corrosion/pull/127): Rustflags can be added via `corrosion_add_target_rustflags( [rustflags1...])`