Skip to content

refactor(precompile): add new specific PrecompileError variants#2907

Merged
rakita merged 1 commit intobluealloy:mainfrom
mablr:feature/precompileerror-copy-trait
Aug 27, 2025
Merged

refactor(precompile): add new specific PrecompileError variants#2907
rakita merged 1 commit intobluealloy:mainfrom
mablr:feature/precompileerror-copy-trait

Conversation

@mablr
Copy link
Contributor

@mablr mablr commented Aug 21, 2025

Initially the goal was to make PrecompileError compatible with Copy, but this actually not possible. We can close #2906. (as not planned)

So I just propose to extend PrecompileError enum as in cases where it is feasible, more specific variants should be used in place of the Other() error variant.

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 21, 2025

CodSpeed Performance Report

Merging #2907 will not alter performance

Comparing mablr:feature/precompileerror-copy-trait (b8aeb94) with main (784d30d)

Summary

✅ 173 untouched benchmarks

@mablr mablr force-pushed the feature/precompileerror-copy-trait branch from 3c7b3b0 to de50364 Compare August 21, 2025 16:30
Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

Fatal and Other PrecompileErrors are needed for users of lib, so they should be brought back.

I do like that this PR adds errors of new precompiles, so we should merge that part in

@mablr
Copy link
Contributor Author

mablr commented Aug 26, 2025

@rakita Thanks for your insightful feedback.

I'll remove the errors which are not supposed to be inside revm (custom/op/examples related). And restore the error variants i deleted.

Given that, making PrecompileError Copy-compatible isn't possible, so i'll rename this PR as well.

In cases where it is feasible, more specific variants should be used in place of the Other() error variant.
@mablr mablr force-pushed the feature/precompileerror-copy-trait branch from de50364 to b8aeb94 Compare August 26, 2025 21:51
@mablr mablr changed the title refactor(precompile): make PrecompileError compatible with Copy refactor(precompile): add new specific PrecompileError variants Aug 26, 2025
Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

lgtm

@rakita rakita merged commit a736048 into bluealloy:main Aug 27, 2025
33 checks passed
Soubhik-10 added a commit to Soubhik-10/revm that referenced this pull request Sep 5, 2025
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.

Make PrecompileError compatible with Copy trait

2 participants