fix(config): accept legacy invariant assert_all key#14988
Closed
BROCCOLO1D wants to merge 1 commit into
Closed
Conversation
mablr
reviewed
May 31, 2026
Member
There was a problem hiding this comment.
Thanks for your help @BROCCOLO1D.
But I'm unsure we want assert_all to be accepted as "legacy" since it lived about ten days? Moreover this doesn't address the gas snapshot problem later #14987 (comment)
Contributor
Author
|
Closing this based on maintainer feedback: accepting assert_all as a legacy key does not look like the right direction, and the gas snapshot regression is being handled separately in #14990. Happy to revisit if a compatibility shim is still desired. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
invariant.assert_allconfig key in warning validation for both standalone and profile-scoped invariant sections.assert_all.Why
invariant.assert_allwas introduced as a public config key in #12587, then later removed from the serialized invariant config when invariant campaigns became contract-level. Existing projects now see an unknown-key warning on every forge command even though the config was previously valid.Changes
assert_allas a backward-compatibleinvariantkey.[invariant]and[profile.default.invariant]usages do not emit unknown-key warnings.Validation
cargo fmt --checkgit diff --checkcargo test -p foundry-config no_unknown_key_warning_for_legacy_invariant_assert_allcargo test -p foundry-config unknown_key_warningcargo check -p foundry-configScope
Closes #14987