Skip to content

Commit

Permalink
[11.0.0] Update some minimum version requirements. (#6758)
Browse files Browse the repository at this point in the history
* Try adding a `minimal-versions` test to CI

This commit is an attempt to add another CI check for Wasmtime to ensure
that the minimum version bounds on all of our dependencies are accurate.
This is not a stable feature of Cargo and thus requires usage of
nightly. Additionally one of the reasons it's not stable is that the DX
is not great as many minimal-versions errors come from transitive
dependencies that we can't do anything about. Nevertheless I figure it
might be good to try out having it on CI and see how it fares.

This is inspired by #6755 where we picked up a dependency on a newer
version of `system-interface` but forgot to update the minimum version
bound. Whether or not this prevents the issue or causes too many
headaches is I think yet to be seen.

* Update some minimum version requirements
  • Loading branch information
alexcrichton authored Jul 21, 2023
1 parent 92ccdcb commit 1aff665
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,44 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}

# Use Cargo's `-Z minimal-versions` feature to ensure that the lower bound
# of our dependencies are ideally all valid.
check-minimal-versions:
needs: determine
if: needs.determine.outputs.run-full
name: Check Minimal Verisons
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-rust
with:
toolchain: nightly-2023-03-20
- run: cargo generate-lockfile -Z minimal-versions

# Update some dependencies manually which cause issues in transitive
# dependencies. Having to need to do this is a bummer and is why this is
# still a `-Z` flag and not a stable cargo feature.
#
# Here `futures-util` is a transitive dep of HTTP things that needed a
# higher lower bound. The `syn` dep for example is tricky since we don't
# explicitly depend on `syn` 1.x.x but it's transitively used through other
# crates like `tracing` and we're using syntax not supported by the lower
# bounds of those crates, so it's a bit odd there too.
- run: cargo update -p futures-util -p syn@1.0.74

# Make sure everything works. Note that this isn't super exhaustive, but
# it's meant to cover our bases braodly.
- run: cargo check

# common logic to cancel the entire run if this job fails
- run: gh run cancel ${{ github.run_id }}
if: failure() && github.event_name != 'pull_request'
env:
GH_TOKEN: ${{ github.token }}


# Perform release builds of `wasmtime` and `libwasmtime.so`. Builds a variety
# of platforms and architectures and then uploads the release artifacts to
# this workflow run's list of artifacts.
Expand Down Expand Up @@ -782,6 +820,7 @@ jobs:
- determine
- miri
- build-preview1-component-adapter
- check-minimal-versions
if: always()
steps:
- name: Dump needs context
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ cap-rand = { version = "1.0.12", features = ["small_rng"] }
cap-fs-ext = "1.0.12"
cap-time-ext = "1.0.0"
fs-set-times = "0.19.0"
system-interface = { version = "0.25.1", features = ["cap_std_impls"] }
system-interface = { version = "0.25.2", features = ["cap_std_impls"] }
io-lifetimes = { version = "1.0.0", default-features = false }
rustix = "0.37.13"

Expand All @@ -217,7 +217,7 @@ anyhow = "1.0.22"
windows-sys = "0.48.0"
env_logger = "0.10"
log = { version = "0.4.8", default-features = false }
clap = { version = "3.2.0", features = ["color", "suggestions", "derive"] }
clap = { version = "3.2.8", features = ["color", "suggestions", "derive"] }
hashbrown = "0.13.2"
capstone = "0.9.0"
once_cell = "1.12.0"
Expand Down

0 comments on commit 1aff665

Please sign in to comment.