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

WEB3-240: Re-export alloy from risc0-ethereum-contracts and risc0-steel #337

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

nategraf
Copy link
Contributor

One the common pieces of feedback we do from the Boundless private devnet was that alloy versioning was one of the biggest challenges. In particular, a developer would encounter a type mismatch error where "alloy::Foo is the not the same as alloy::Foo", which is a somewhat difficult to debug issue related to having two version of alloy in your crates tree. Because alloy is pre-1.0 and changing often, there is no silver bullet here.

One rule of thumb though is that an types that appear in the public interface of a crate should be (re-)exported from that crate. In our case, we do have alloy types in our public interface. So, if we apply this rule, we should export the types we use from alloy, and the easiest way to do so is to re-export the alloy crate. This helps with the versioning challenges because if the project ends up needing two distinct versions of alloy (e.g. one dependency specifies 0.4 and another 0.6) then the developer can use the re-exported alloy as an anchor for any places they are using risc0-steel or risc0-ethereum-contracts.

@nategraf nategraf requested a review from Wollac November 25, 2024 04:15
@nategraf nategraf requested review from capossele and a team as code owners November 25, 2024 04:15
@github-actions github-actions bot changed the title Re-export alloy from risc0-ethereum-contracts and risc0-steel WEB3-240: Re-export alloy from risc0-ethereum-contracts and risc0-steel Nov 25, 2024
@nategraf nategraf merged commit 6a4eff5 into main Nov 25, 2024
10 of 11 checks passed
@nategraf nategraf deleted the victor/reexport-alloy branch November 25, 2024 17:11
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