-
Notifications
You must be signed in to change notification settings - Fork 343
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
Move the Vm
interface to a dedicated repo for enhanced modularity
#353
Comments
All cheats will eventually be moved out of forge-std and directly into foundry foundry-rs/foundry#3782. The result will be that forge-std now only has things like the |
I see, but this is still not as "slim" as my original proposal. I prefer my PRBTest users not to have access to those Forge Std helpers so they don't accidentally end up using them. I reckon the same rationale applies to future Vulcan versions and would-be testing frameworks not developed yet. Anyway, I am happy to wait until all cheats are moved to Foundry to get a better sense of how Forge Std will look then. |
I agree with @PaulRBerg , having a library with the core foundry stuff would enable the development of new frameworks that don't depend on forge std. As Paul said, it should include the vm interface and also struct definitions such as Log and any others that might be relevant to vm specific stuff. Including constants such as console address also makes sense. |
Any further thoughts on this issue, @mds1? I could cobble up a simple repo that implements my proposal, which would use the The advantage of using that version instead of Forge Std is that my implementation uses NatSpec comments, which we could use for generating a simple documentation website with
This is the end goal, yes, but because of backward compatibility, it is likely that Forge Std will keep referencing the existing custom cheats and utils (i.e. |
After thinking about it more, I don't think this is worthwhile and is likely to cause more confusion/work than benefit:
Can't NatSpec just be upstreamed to the forge-std repo? Maybe I'm misunderstanding here. To be clear, I definitely want to encourage forge-std alternatives, and love that users have both vulcan and PRB-Test as alternates. But I don't see how the current forge-std strucutre is problematic, as there are two options for vulcan/PRB-Test:
|
Thanks for your feedback. I don't agree with everything you said, but I also don't care so much about this issue, so I'm happy to agree to disagree and consider this issue settled.
Doesn't this run counter to your first point? If all cheats are eventually upstreamed in Foundry, then there won't be any confusion about what's a native cheat anymore.
Fair point, but, as I said above, the book part could be automated by
Yeah, it could. That was a moot point on my part.
I have deliberately attempted to avoid installing Forge Std because of its dependency on DSTest. Even if I don't use it explicitly, it feels awkward to have another testing assertions library as a dependency, which gets pulled every time PRBTest is installed (this would also increase the installation times with git submodules).
Yes - and which may accidentally be used by some users.
Well, this is what all of us (Vulcan, plus all future Foundry ecosystem devs) will have to do if we want to avoid installing Forge Std as a dependency. |
To make my project PRBTest compatible with Foundry, I need access to the
Vm
interface (which is called the HEVM but I think in practice it's the REVM that is used now?), and this requires me to maintain aVm
copy.Vulcan, another Foundry-based testing framework, is currently positioned as a layer built on top of Forge Std. However, I wonder if their primary interest isn't actually to build directly on Foundry? I see that there are several places where Vulcan imports
Vm
:The general point is that by keeping the
Vm
isolated in this repository, Foundry inadvertently discourages the development of third-party testing frameworks beyond Forge Std.Therefore, I suggest relocating the
Vm
interface to a dedicated repository. Doing so would enable the broader ecosystem to utilize it as a standalone module. Possible names for the repo include:foundry-rs/vm
foundry-rs/forge-vm
Cc-ing @mds1, @ZeroEkkusu, @PatrickAlphaC, @gnkz, and @vdrg for feedback 🙏
The text was updated successfully, but these errors were encountered: