-
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
chore: display warning to user if running nightly
version
#9683
Conversation
…E_NIGHTLY_WARNING environment variable
@zerosnacks wonder if this addresses #5722 too which basically requires a -debug label? |
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.
lgtm!
Good call, adding this - will postfix the profile as follows: |
Added in 92ba0d9 |
…yVersion() cheatcode
…n foundry_common and export from there
This comment was marked as outdated.
This comment was marked as outdated.
…nix timestamp for cheatcode, fix nits
…n readable --version
@@ -8,19 +8,38 @@ contract GetFoundryVersionTest is DSTest { | |||
Vm constant vm = Vm(HEVM_ADDRESS); | |||
|
|||
function testGetFoundryVersion() public view { | |||
// (e.g. 0.3.0-nightly+3cb96bde9b.1737036656.debug) |
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.
if we're going to commit to a format that users want to parse themselves, maybe we should provide a function that does the comparison directly? Like vm.versionAtLeast("1.2.3")
and/or vm.versionTimestampAtLeast(unix)
; I would prefer just the former for 1.0
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.
Agreed, can be done in a follow up imo
Updated description, performed additional manual tests and opened #9725 as a followup Going to merge this so it is available in the next nightly |
Motivation
Closes: #9676 + Closes #2212 (exposes
SEMVER_VERSION
) + Closes #5722Three new version strings are exposed:
-V
)--version
)Short / long use the format as used by
rustc
/reth
/solar
Updates: #8530 to use the new Foundry version format
On
nightly
builds - yields the warning:If
--silent
or--json
is passed the warning is mutedSolution
Creates a unified build script logic for the different binaries
Raises the warning right after global initialization of the shell as this is common logic for all binaries
Offers a user a way to mute the warning by setting
FOUNDRY_DISABLE_NIGHTLY_WARNING
in their shellTo test the
nightly
case:it will use the
-nightly
suffix:which raises
To test any other case (e.g.
stable
):it will use the
-stable
suffix:Notice if you do not have a tag name set:
it will use the
-dev
version suffix:Note: I can't think of a good way to test this fully without actually creating a nightly build
Breaking changes
vm.getFoundryVersion
will now use the formatforge 0.3.0-dev+b3d0002118.1737037945.debug
:as opposed to