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

build: pin home version to 0.5.9 #103

Closed
wants to merge 1 commit into from
Closed

Conversation

tisonkun
Copy link

@tisonkun tisonkun commented Dec 17, 2024

error: rustc 1.80.0 is not supported by the following package:
  home@0.5.11 requires rustc 1.81

Terribly they bump MSRV in a patch version ..

This refers to rust-lang/cargo#14944.

@tisonkun
Copy link
Author

cc @harryfei

@epage
Copy link

epage commented Dec 17, 2024

The Cargo team discourages =, especially for MSRV, see https://doc.rust-lang.org/nightly/cargo/reference/specifying-dependencies.html#version-metadata

Instead lockfiles should be used to preserve one's own MSRV. Libraries just need to ensure their version range has a version within its MSRV, see also https://doc.rust-lang.org/nightly/cargo/reference/rust-version.html

@tisonkun
Copy link
Author

@epage Good to know. So either binary and library, check in the lockfile is always a recommended practice?

@tisonkun
Copy link
Author

Another question is that, when my new project depends on which 7.0.0 now, the dep to home gets resolved to 0.5.11 and requires Rust 1.81. How can I downgrade the indirect dependency to home? I guess it's possible to edit Cargo.lock manually but would like to know if there is other pratice.

@epage
Copy link

epage commented Dec 17, 2024

Yes, we changed the recommendation from "don't check-in locks for libs" to "if you don't have a better reason, always check-in the lock".

You can use cargo update home --precise 0.5.9 or use cargo +nightly generate-lockfile with the env set for msrv aware resolver, see cargo's nightly config docs.

@tisonkun
Copy link
Author

OK. Closed as better solution provided.

Thanks a lot for your information @epage!

@tisonkun tisonkun closed this Dec 17, 2024
@tisonkun tisonkun deleted the patch-1 branch December 17, 2024 14:12
@epage
Copy link

epage commented Dec 17, 2024

With the 2024 edition, the MSRV-aware rerolver will be the default which should smooth this process out rather than requiring someone to guide people through this whenever this happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants