-
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(cheatcodes
): add vm.foundryVersionAtLeast
+ vm.foundryVersionCmp
to make it easier to write conditional version logic
#9725
Comments
cheatcodes
): add vm.versionAtLeast
utility cheatcode to make it easier for users to write at-least conditional version logiccheatcodes
): add vm.versionAtLeast
utility cheatcode to make it easier to write conditional version logic
cheatcodes
): add vm.versionAtLeast
utility cheatcode to make it easier to write conditional version logiccheatcodes
): add vm.versionAtLeast
to make it easier to write conditional version logic
I'd like to handle this task. |
I think we want to prefix with foundry so Another variation is This is implemented as parsing the string input as semver, getting the Ordering from parsed.cmp(FOUNDRY_VERSION), and returning it as isize |
cheatcodes
): add vm.versionAtLeast
to make it easier to write conditional version logiccheatcodes
): add vm.foundryVersionAtLeast
to make it easier to write conditional version logic
cheatcodes
): add vm.foundryVersionAtLeast
to make it easier to write conditional version logiccheatcodes
): add vm.foundryVersionAtLeast
+ vm.foundryVersionCmp
to make it easier to write conditional version logic
foundry does not build hermetically across OS's, setting a defined timestamp would fix the issue w.r.t. different binaries having different build timestamps but coming from the same commit |
Could I take over this issue? |
Followup from #9683
vm.getFoundryVersion
will now use the formatforge 0.3.0-dev+b3d0002118.1737037945.debug
<cargo_version>-<tag>+<git_sha_short>.<unix_build_timestamp>.<profile>
We should provide a function that does the comparison directly like
vm.versionAtLeast("1.2.3")
and/orvm.versionTimestampAtLeast(unix)
Originally posted by @DaniPopes in #9683 (comment)
The text was updated successfully, but these errors were encountered: