-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Feat: Export data via cheatcode #5525
Conversation
It will not be missed anyway
This reverts commit 3f836e0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry missed this one
Draft PR for a new cheatcode that enables to export of structured data from the testing environment.
what exactly does export do and how is this different from writing to files?
So, returning to this fossil @mattsse because managing my fork is a pain in the ass. This aims to enable the foundry to export structured data when used as a dependency. I am using it in phylax, which I plan to ship by the end of the month (a monitoring tool). We could use the same machinery for more cheatcodes, but the general gist is to enable structured data export so that other consumers can use it. More specifically, I use this to enable a cheatcode where a user can easily expose data of a test over a Prometheus endpoint. I understand that it's a very low priority, and we try to keep the code as simple as possible, but is there a way we can get this merged (once conflicts have been resolved, etc. ) |
Hey @odyslam, we recently refactored how cheatcodes are implemented in #6131. You can read more about it in the dev docs. Please let me know if you have any problems rebasing! |
Closing as stale, plus would need a full rewrite. @odyslam feel free to reopen / open a new PR with a modern cheatode impl, and we could probably get this merged |
Draft PR for a new cheatcode that enables to export of structured data from the testing environment.
This is not very useful for Foundry as-is (since users can already do that via writeFile + serialiseJson), but it's useful for libraries that consume Foundry.
I am already using this in my fork of foundry (I have removed some ledger, etherscan functionality that makes Forge test not Send), so feel free not to accept the PR.
Happy to do any work that needs to be done in order to accept it though (the less diff my fork has from upstream, the better)