foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Debug uses backslash in path when compiling

Open gtech opened this issue 4 months ago • 0 comments

Component

Forge

Have you ensured that all of these are up to date?

  • [X] Foundry
  • [X] Foundryup

What version of Foundry are you on?

forge 0.2.0 (adb6aba 2024-10-17T00:23:10.989722000Z)

What command(s) is the bug in?

forge debug Contract.sol

Operating System

Windows

Describe the bug

When using debug on windows, forge debug uses a backslash to connect the absolute path, and the relative path to the file being compiled, causing the path to be malformed.

<REPO_PATH> and <RELATIVE_PATH> are substituted for the literal paths in this error.

2024-10-17T17:32:41.843446Z ERROR foundry_compilers_artifacts_solc::sources: error="C:/<REPO_PATH>\<RELATIVE_PATH_>/Contract.sol": The system cannot find the file specified. (os error 2) Error: failed to read artifact source file for <REPO_PATH>\<RELATIVE_PATH_>/Contract.sol

gtech avatar Oct 17 '24 17:10 gtech