foundry: Forge crashes with message `No target contract named :`.
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.2.0 (6c0fce3 2023-07-14T02:45:24.569798838Z)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
Hello, my name is Guilherme. I am one of the core contributors of cartesi/rollups. Our test workflow started failing since earlier today (10 a.m. BRT), because forge test is crashing. I managed to replicate the error locally, and this is the error message. The back trace is not very helpful, so I omitted it.
The application panicked (crashed).
Message: No target contract named ../node_modules/@cartesi/util/contracts/CartesiMathV2.sol:CartesiMathV2
Location: utils/src/lib.rs:269
I easily managed to pinpoint the line that raised the error: here. Also, it seems that this section of code was last updated by this PR: here.
You can replicate the error yourself by following these steps:
- Start the latest Ubuntu machine
- Install
jq,yarnanddocker - Clone
https://github.com/cartesi/rollups.git - Initialize the submodules (
git submodule update --init --recursive) - Go to
onchain/rollups - Run
yarn(installs contract dependencies) - Run
./test/foundry/dapp/helper/update-proofs.sh --setup - Run
forge test
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (7 by maintainers)
No worries @tommyrharper , weβll take it from here π
@Evalir I found the responsible commit:
6fbf0177a06fd6b0a17e1aef91be5e86f6ecb511Itβs here: https://github.com/foundry-rs/foundry/commit/6fbf0177a06fd6b0a17e1aef91be5e86f6ecb511This is exactly the commit which causes it to break.
Let me know if there is anything else I can do to help debug this, and thanks for responding so quickly π
@Evalir I get the error with the latest version of foundry - I was just trying to narrow down between which commits the issue appeared.
Thanks for the speedy effort, everyone! π
@guidanoli
Iβm unable to install via yarn, tried several node versions but:
> error hardhat@2.14.0: The engine βnodeβ is incompatible with this module. Expected version β>=14.0.0β. Got β8.16.2βnvm user error