Skip to content

Commit

Permalink
Increase the MSRV for Corrosion to 1.46
Browse files Browse the repository at this point in the history
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
  rust-lang/cargo#8258.

Starting with cargo 1.46 the CI failures are resolved
  • Loading branch information
jschwe committed Aug 2, 2022
1 parent 9c99293 commit 4542ba1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 26 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
24 changes: 16 additions & 8 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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_<target_triple_undercore>` and `CXX_<target_triple_undercore>` environment variables for the invocation of
`cargo build` to the compilers selected by CMake (if any)
- Set `CC_<target_triple_undercore>` and `CXX_<target_triple_undercore>` 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))
Expand All @@ -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 <profilename>)`.
- [Add support for specifying per-target Rustflags](https://github.com/corrosion-rs/corrosion/pull/127):
Rustflags can be added via `corrosion_add_target_rustflags(<target_name> [rustflags1...])`
Expand Down

0 comments on commit 4542ba1

Please sign in to comment.