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

Most upvoted comments

It’s been a while but I’m facing again this issue, any hint on this @mattsse?

Any follow up on this @mattsse ? 😃