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

chore(general): bump MSRV to 1.81, use core::error::Error on no-std compatible crates #1552

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Evalir
Copy link
Contributor

@Evalir Evalir commented Oct 23, 2024

Motivation

For no-std compatible crates, we can use core::error::Error instead of std::error::Error to avoid gating the Error impl under std for the impl blocks.

Solution

replace std::error::Error with core::error::Error on the impl blocks.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@Evalir Evalir marked this pull request as draft October 23, 2024 14:09
…r` on no-std compatible crates

For `no-std` compatible crates, we can use `core::error::Error` instead of `std::error::Error` to avoid gating the Error impl under `std`.
@Evalir Evalir closed this Oct 23, 2024
@Evalir Evalir deleted the evalir/impl-core-error branch October 23, 2024 14:15
@DaniPopes
Copy link
Member

I'm ok with bumping MSRV for this since it's in line with our policy. Do you want to do this in alloy-core too?

@Evalir Evalir restored the evalir/impl-core-error branch October 23, 2024 15:03
@Evalir
Copy link
Contributor Author

Evalir commented Oct 23, 2024

Yep, happy to do it on alloy core too. Sounds good!

@Evalir Evalir reopened this Oct 23, 2024
@Evalir
Copy link
Contributor Author

Evalir commented Oct 23, 2024

@DaniPopes i've not removed any std error feature gates where we reuse errors from alloy-rlp/const-hex/ruint. should we bump there too, or is leaving it like it OK for now?

Core PR: alloy-rs/core#780

@Evalir Evalir marked this pull request as ready for review October 23, 2024 15:43
@Evalir Evalir changed the title chore(general): use impl core::error::Error instead of impl std::error::Error on no-std compatible crates chore(general): bump MSRV to 1.81, use core::error::Error on no-std compatible crates Oct 23, 2024
@@ -124,7 +124,7 @@ When updating this, also update:
- .github/workflows/ci.yml
-->

The current MSRV (minimum supported rust version) is 1.79.
The current MSRV (minimum supported rust version) is 1.81.

Alloy will keep a rolling MSRV policy of **at least** two versions behind the
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should remove this comment as it is not true anymore no?

Copy link
Member

Choose a reason for hiding this comment

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

Ah oops I thought the latest stable was 1.83. We should wait on this until the next version.

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.

3 participants