WEB3-240: Re-export alloy from risc0-ethereum-contracts and risc0-steel #337
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ofalloy
in your crates tree. Becausealloy
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 fromalloy
, and the easiest way to do so is to re-export thealloy
crate. This helps with the versioning challenges because if the project ends up needing two distinct versions ofalloy
(e.g. one dependency specifies 0.4 and another 0.6) then the developer can use the re-exportedalloy
as an anchor for any places they are usingrisc0-steel
orrisc0-ethereum-contracts
.