foundry: bug(`config`): Error: `Could not read source code for analysis` w/ remappings
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 (4e11d1f 2022-08-24T00:12:55.883067Z)
What command(s) is the bug in?
forge coverage
Operating System
macOS (Intel)
Describe the bug
After running forge coverage on this directory I’m getting the following message:
Analysing contracts...
Error:
Could not read source code for analysis
Context:
- Error #0: failed to read from "/src/Divider.sol": No such file or directory (os error 2)
- Error #1: No such file or directory (os error 2)
We are using yarn as dependency manager and we are using yarn workspaces to handle multiple packages on the same repo.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 16 (1 by maintainers)
Commits related to this issue
- feat(ci): Add solidity code coverage to push trigger Note: we currently run it from the root; otherwise, the coverage reporting cannot find our contracts. This may be related to https://github.com/fo... — committed to mangrovedao/mangrove.js by lnist 4 years ago
- feat(ci): Add solidity code coverage to push trigger Note: we currently run it from the root; otherwise, the coverage reporting cannot find our contracts. This may be related to https://github.com/fo... — committed to mangrovedao/mangrove.js by lnist 4 years ago
- feat(ci): Fix race in coveralls, add solidity coverage, check mgv cli, improve dependabot triggers (#669) * fix(ci): Dependabot workflow should only trigger for select branches * feat(ci): Verify mg... — committed to mangrovedao/mangrove.js by lnist 4 years ago
- fix: use absolute imports to fix forge coverage when Kernel is used as a dependency on a project, that project's forge coverage might fail to run because of a dependency resolution issue when relativ... — committed to RollaProject/kernel by 0xca11 3 years ago
- fix: use absolute imports to fix forge coverage when Kernel is used as a dependency on a project, that project's forge coverage might fail to run because of a dependency resolution issue when relativ... — committed to RollaProject/kernel by 0xca11 3 years ago
- fix: use absolute imports to fix forge coverage (#38) when Kernel is used as a dependency on a project, that project's forge coverage might fail to run because of a dependency resolution issue when r... — committed to zerodevapp/kernel by 0xca11 3 years ago
- Use relative imports for interfaces When importing Flexible Voting into another repository, the forge coverage tool was failing with the error: "Could not read source code for analysis" linked to the... — committed to ScopeLift/flexible-voting by apbendi 3 years ago
- Use relative imports for interfaces When importing Flexible Voting into another repository, the forge coverage tool was failing with the error: "Could not read source code for analysis" linked to the... — committed to ScopeLift/flexible-voting by apbendi 3 years ago
- fix: use absolute imports to fix forge coverage (#38) when Kernel is used as a dependency on a project, that project's forge coverage might fail to run because of a dependency resolution issue when r... — committed to MaxMoskalenko/kernel by 0xca11 3 years ago
It’s been a while but I’m facing again this issue, any hint on this @mattsse?
Any follow up on this @mattsse ? 😃