Skip to content

test: sync forge-std-rev to v1.16.2 to fix forge-std revision-mismatch warning#52

Closed
stephancill wants to merge 1 commit into
base-anvil-forkfrom
stephancilliers/bump-forge-std-rev
Closed

test: sync forge-std-rev to v1.16.2 to fix forge-std revision-mismatch warning#52
stephancill wants to merge 1 commit into
base-anvil-forkfrom
stephancilliers/bump-forge-std-rev

Conversation

@stephancill

Copy link
Copy Markdown
Contributor

Motivation

base-anvil-fork CI's test / test all job fails on three CLI tests:

  • forge::cli build::build_no_warning_without_soldeer_lock
  • forge::cli cmd::can_clean_without_warnings
  • forge::cli test_cmd::repros::issue_9272

All three fail for the same reasonforge build emits a spurious warning:

Warning: Dependency 'lib/forge-std' revision mismatch:
  expected 'bf647bd6046f2f7da30d0c2bf435e5c76a780c1b',
  found    '620536fa5277db4e3fd46772d5cbc1ea0696fb43'

The first two assert zero warnings; issue_9272 asserts an exact stderr snapshot and the warning is prepended as an extra line.

Root cause

The shared test template (crates/test-utils/src/util.rs) runs forge init (which writes a foundry.lock pinning forge-std at bf647bd6, i.e. v1.16.2) and then force-checks-out FORGE_STD_REVISION (= testdata/forge-std-rev) into lib/forge-std. Our testdata/forge-std-rev was stale at 620536fa (Apr 2026), so the checked-out rev no longer matched the lock and check_foundry_lock_consistency warned.

Solution

Bump testdata/forge-std-rev 620536fa → bf647bd6, matching upstream foundry-rs/foundry's testdata/forge-std-rev (forge-std v1.16.2). Now the template checkout matches the lock forge writes, so no mismatch warning is emitted.

One-line change; format preserved (40-byte SHA, no trailing newline). Validated the target value against upstream foundry's pin; the test / test all job on this PR exercises the fix end-to-end.

Not addressed

test / test external (ext_integration::gunilev, convex_shutdown_simulation) fork Ethereum mainnet over a public RPC and are environmental flakes, unrelated to this change.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

The test template (crates/test-utils/src/util.rs) force-checks-out
FORGE_STD_REVISION (= testdata/forge-std-rev) into lib/forge-std, while
'forge init' writes a foundry.lock pinning forge-std at bf647bd6 (v1.16.2).
Our pin was stale at 620536fa (Apr 2026), so 'forge build' emitted:

  Warning: Dependency 'lib/forge-std' revision mismatch:
    expected 'bf647bd6046f2f7da30d0c2bf435e5c76a780c1b',
    found    '620536fa5277db4e3fd46772d5cbc1ea0696fb43'

That warning breaks the no-warning / snapshot CLI tests:
- build::build_no_warning_without_soldeer_lock
- cmd::can_clean_without_warnings
- test_cmd::repros::issue_9272

Sync the pin to bf647bd6 to match upstream foundry-rs/foundry's
testdata/forge-std-rev, so the checked-out rev matches the lock.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
@stephancill

Copy link
Copy Markdown
Contributor Author

Folding this into the CI maintenance PR #51 instead.

@stephancill
stephancill deleted the stephancilliers/bump-forge-std-rev branch July 15, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant