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

Fix hashes version range in 0.29.1 #732

Merged
merged 6 commits into from
Sep 6, 2024

Conversation

Kixunil
Copy link
Collaborator

@Kixunil Kixunil commented Sep 6, 2024

We don't use `hashes` in public API and we also use ranged version which
makes items accessed through the reexport to break on `cargo update`. We
want to remove it eventually, so deprecate it first.
Use of `<= 0.14` was wrong because it would prevent upgrading to 0.14.1+
We expand the range by using `< 0.15` instead.
Rust is now checking cfg attributes for typos but this interferes with
our cfgs that rustc/cargo don't recognize. This whitelists them so they
no longer produce warnings.

This is a backport of 614fe81 because the warnings make development
very annoying.
@Kixunil Kixunil added the bug label Sep 6, 2024
The newest nightly stabilized `PanicMessage` with a slightly different
API. This updates the API and removes the `#![feature()]` attribute.
This is a legacy constant and it's better to just use `i32::MAX`. Note
that one cannot `use` an associated constant so this just removed the
import. This is better anyway since it's only used once and it didn't
provide meaningful line length reduction.
@Kixunil Kixunil force-pushed the fix-hashes-version-range branch from bbe8b79 to f74877a Compare September 6, 2024 11:31
@@ -41,7 +41,7 @@ serde = { version = "1.0.103", default-features = false, optional = true }

# You likely only want to enable these if you explicitly do not want to use "std", otherwise enable
# the respective -std feature e.g., hashes-std
hashes = { package = "bitcoin_hashes", version = ">= 0.12, <= 0.14", default-features = false, optional = true }
hashes = { package = "bitcoin_hashes", version = ">= 0.12, < 0.15", default-features = false, optional = true }
Copy link
Member

@apoelstra apoelstra Sep 6, 2024

Choose a reason for hiding this comment

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

I wonder if Clippy would accept a lint to say that <= [major rev] is likely to be wrong.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK f74877a; tested final commit locally

@apoelstra apoelstra merged commit 1a1fc57 into rust-bitcoin:0.29.x Sep 6, 2024
18 of 21 checks passed
@apoelstra
Copy link
Member

Tagged and published.

@tcharding
Copy link
Member

Tidy.

@Kixunil Kixunil deleted the fix-hashes-version-range branch September 6, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants