Skip to content
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

fix(cli): don't check sources directory existance during compilation #2121

Merged
merged 1 commit into from Jun 25, 2022

Conversation

shekhirin
Copy link
Contributor

Motivation

Closes #2093

Solution

mev-example git:(curve20220521) ls
cache  foundry.toml  interface  lib  out  README.md  remappings.txt  test

Before

mev-example git:(curve20220521) forge test --fork-url $ETH_RPC_URL --fork-block-number 14811888 -vvv
Error:
no contracts to compile, contracts folder "/Users/shekhirin/Projects/mev-example/src" does not exist.
Check the configured workspace settings:
root: /Users/shekhirin/Projects/mev-example
contracts: /Users/shekhirin/Projects/mev-example/src
artifacts: /Users/shekhirin/Projects/mev-example/out
tests: /Users/shekhirin/Projects/mev-example/test
scripts: /Users/shekhirin/Projects/mev-example/script
libs:
    /Users/shekhirin/Projects/mev-example/lib
remappings:
    ds-test/=/Users/shekhirin/Projects/mev-example/lib/forge-std/lib/ds-test/src/
    forge-std/=/Users/shekhirin/Projects/mev-example/lib/forge-std/src/
    openzeppelin-contracts/=/Users/shekhirin/Projects/mev-example/lib/openzeppelin-contracts/contracts/
    src/=/Users/shekhirin/Projects/mev-example/src/
    test/=/Users/shekhirin/Projects/mev-example/test/

If you are in a subdirectory in a Git repository, try adding `--root .`

After

mev-example git:(curve20220521) ../foundry/target/debug/forge test --fork-url $ETH_RPC_URL --fork-block-number 14811888 -vvv
[⠘] Compiling...
No files changed, compilation skipped

Running 1 test for test/MEV.t.sol:MEVSimulation
[PASS] testMEV() (gas: 2043432)
Test result: ok. 1 passed; 0 failed; finished in 133.98ms

@shekhirin shekhirin marked this pull request as ready for review June 25, 2022 21:06
@mattsse mattsse merged commit d55af2d into foundry-rs:master Jun 25, 2022
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.

Allow to run tests even when contracts folder doesn't exist
3 participants