Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSRV 1.60.0 #181

Merged
merged 5 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: check
args: -Z msrv-policy
tkaitchuck marked this conversation as resolved.
Show resolved Hide resolved
- name: test nightly
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -167,6 +168,19 @@ jobs:
with:
command: check
args: --target wasm32-unknown-unknown --no-default-features
msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install 1.60.0
uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
- name: check
uses: actions-rs/cargo@v1
with:
command: check
no_std:
name: no-std build
runs-on: ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ edition = "2018"
readme = "README.md"
build = "./build.rs"
exclude = ["/smhasher", "/benchmark_tools"]
rust-version = "1.60.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good 👍


tkaitchuck marked this conversation as resolved.
Show resolved Hide resolved
[lib]
name = "ahash"
Expand Down Expand Up @@ -78,12 +79,12 @@ codegen-units = 1
version_check = "0.9.4"

[dependencies]
const-random = { version = "0.1.12", optional = true }
const-random = { version = "0.1.17", optional = true }
serde = { version = "1.0.117", optional = true }
cfg-if = "1.0"
atomic-polyfill = { version="1.0.1", optional=true}
getrandom = { version = "0.2.7", optional = true }
zerocopy = { version = "0.7.14", default-features = false, features = ["simd"] }
zerocopy = { version = "0.7.20", default-features = false, features = ["simd"] }
Copy link
Contributor

@polarathene polarathene Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raising minimum version in semver is not necessary unless your crate fails to build / support lower versions.

There is -Z direct-minimal-versions which (unlike -Z minimal-versions) will resolve only the lowest bound of your semver range for your dependencies (-Z minimal-versions does this for every crate in Cargo.lock which is more likely to fail). Using this would then verify a build compatibility at your lower bound, while the implicit dependencies would resolve their semver as per usual.

Raising the minimum version adds a constraint on the semver if other crates have an overlapping range, narrowing what is accepted AFAIK.

If your declared rust-version builds / resolves correctly, then there is no need to raise the minimum? It does not benefit your crate when published AFAIK, semver will be resolved when ahash is pulled in and typically use the latest release for the dependency unless Cargo.lock for example manipulates that like with the mentioned -Z nightly options.


[target.'cfg(not(all(target_arch = "arm", target_os = "none")))'.dependencies]
once_cell = { version = "1.18.0", default-features = false, features = ["alloc"] }
Expand Down
Loading