You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you ensured that all of these are up to date?
Foundry
Foundryup
What version of Foundry are you on?
forge --version
What command(s) is the bug in?
forge test
Operating System
macOS (Apple Silicon)
Describe the bug
When running a forge test containing snapshotGasLastCall, forge will remove the folder and recreate the files.
This behavior is quite problematic on bigger codebases as it's recommended to check the snapshots in git, but running test via forge test --mc SomeTestContract will remove all snapshots, but only recreate the ones created within the test I am running.
Imo it would be far less problematic & better UX, to just overwrite the affected file instead of removing the whole folder.
On some editors (at least zed) the current behavior is also problematic in regards to file watching as the removal and recreation will not be properly detected. Instead the stale(removed) file will be shown till a manual reload (close/open) by the user happens.
The text was updated successfully, but these errors were encountered:
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge --version
What command(s) is the bug in?
forge test
Operating System
macOS (Apple Silicon)
Describe the bug
When running a forge test containing
snapshotGasLastCall
, forge will remove the folder and recreate the files.This behavior is quite problematic on bigger codebases as it's recommended to check the
snapshots
in git, but running test viaforge test --mc SomeTestContract
will remove all snapshots, but only recreate the ones created within the test I am running.Imo it would be far less problematic & better UX, to just overwrite the affected file instead of removing the whole folder.
On some editors (at least
zed
) the current behavior is also problematic in regards to file watching as the removal and recreation will not be properly detected. Instead the stale(removed) file will be shown till a manual reload (close/open) by the user happens.The text was updated successfully, but these errors were encountered: