Skip to content

Conversation

@febo
Copy link
Contributor

@febo febo commented Oct 31, 2025

Problem

There was a major version of solana-hash since features were created so dependencies are optional and the crate was made no_std compatible. Although the types between the version have not changed, the major bump makes them to be considered different.

Solution

Follow the semver trick and re-export the v4 type on v3, so they will be considered the same type.

[profile.dev.build-override]
opt-level = 1

[patch.crates-io]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are all solana-* dependencies from the hash crate so they will always use the repository version instead of crates.io ones.

# Note: fixed version of solana-hash is needed here to avoid
# dependency resolution issues since v3 just re-exports
# v4 of the `solana-hash` crate.
./cargo nightly miri test -p [email protected] -p solana-account-info
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was needed since miri was complaining that there were 2 solana-hash crates available.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can actually remove solana-hash from this script, since there are no tests in the crate.

Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Just a fly-by

Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks good to me! (assuming CI passes this time)

@febo febo marked this pull request as ready for review November 5, 2025 00:18
@febo febo merged commit ac7ed3a into anza-xyz:maintenance/v3.x Nov 5, 2025
26 checks passed
@febo febo deleted the hash-semver branch November 5, 2025 00:43
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