fix: add forge version check to check-build.sh#4677
Open
tenderdeve wants to merge 3 commits into
Open
Conversation
check-build.sh validates other tool versions but not forge, allowing make build to fail with cryptic Yul compilation errors when an incompatible forge version is installed. Add a version check that ensures forge 1.0.0 is present and prints a clear error with remediation steps if not. Fixes OffchainLabs#4379
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4677 +/- ##
==========================================
+ Coverage 52.39% 60.15% +7.75%
==========================================
Files 506 506
Lines 73739 60415 -13324
==========================================
- Hits 38636 36340 -2296
+ Misses 29947 18770 -11177
- Partials 5156 5305 +149 |
bragaigor
requested changes
May 6, 2026
Contributor
bragaigor
left a comment
There was a problem hiding this comment.
Thanks for the contribution. Just a few comments. And you're also missing a changelog file :)
Co-authored-by: Igor Braga <5835477+bragaigor@users.noreply.github.com>
tenderdeve
pushed a commit
to tenderdeve/nitro
that referenced
this pull request
May 14, 2026
Address review feedback on OffchainLabs#4677: - rename forge_max_version -> forge_version_needed (compare_versions uses exact match, not a ceiling) - collapse Foundry/forge installation blocks into one cascade so the user sees a single appropriate error - print success message when forge version matches (previously the matched branch printed the "not compatible" error) - add changelog/tenderdeve-nit-4379.md
Address review feedback on OffchainLabs#4677: - rename forge_max_version -> forge_version_needed (compare_versions uses exact match, not a ceiling) - collapse Foundry/forge installation blocks into one cascade so the user sees a single appropriate error - print success message when forge version matches (previously the matched branch printed the "not compatible" error) - add changelog/tenderdeve-nit-4379.md
2c28d6f to
e2c3993
Compare
bragaigor
approved these changes
May 14, 2026
Contributor
bragaigor
left a comment
There was a problem hiding this comment.
Thanks for the fix and for iterating on the comments, much appreciated. The PR looks great from my side.
Quick heads-up: We recently changed our internal process around merging PRs, so this may take a bit longer than usual to land. Please bear with us, and thanks again for the contribution!
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
scripts/check-build.shsolarinstead ofsolcfor Yul compilation, which breaks the buildfoundryup --version 1.0.0as remediationThe check follows the same pattern as existing tool version checks in the script, using the
command_existsandcompare_versionshelpers.Fixes #4379
Test plan
./scripts/check-build.shwith forge 1.0.0 installed — should pass