foundry: Build thinks there is nothing to build if --skip is provided with a path starting with *
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
1.2.1-stable
What version of Foundryup are you on?
1.1.0
What command(s) is the bug in?
forge build
Operating System
Linux
Describe the bug
Initialize a new project with forge init counter. Then the following steps:
$ mv counter/ myproject
$ cd myproject
$ ls
foundry.toml lib README.md script src test <--- as you can see there isn't any output yet, but there are sources
$ ls src
Counter.sol
$ forge build --force --skip '*/test/**'
[⠊] Compiling...
No files changed, compilation skipped
Clearly this isn’t expected because if I remove --skip it works fine
$ forge build --force
[⠊] Compiling...
[⠒] Compiling 23 files with Solc 0.8.30
[⠑] Solc 0.8.30 finished in 520.12ms
Compiler run successful!
Discovered this bug while working with @crytic/crytic-compile
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15
yep, as ‘*/test/**’ will match
~/test/middle/wtfpath and will try to compile from~/testdir. that’s an edge case that could be probably enhanced somehowOK I think I nailed it down. This seems to happen if you are inside of a parent directory named
test(???)It doesn’t reproduce outside if the parent directory is not named
test. @grandizzy Can you confirm if this repros for you?