foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.34k stars 1.77k forks source link

fix(forge test): install missing dependencies before creating `Project` #9379

Closed klkvr closed 3 days ago

klkvr commented 4 days ago

Motivation

Closes https://github.com/foundry-rs/foundry/issues/9375

With #8668 we now resolve the Graph when creating project as we need data about all sources for restrictions. This caused forge test to fail in CI if there are any missing dependencies which were being installed only after call to config.project()

This PR changes order of operations so that we always install dependencies first. Also I've added an optimization to skip graph resolution if user did not specify any restrictions