bug(forge build
): failed to read artifact source
error when previously built source file is removed
#9068
Labels
C-forge
Command: forge
Cmd-forge-build
Command: forge build
T-bug
Type: bug
T-to-reproduce
Type: requires reproduction
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (e215f3f 2024-10-08T00:25:05.208317000Z)
What command(s) is the bug in?
forge script, forge build
Operating System
macOS (Apple Silicon)
Describe the bug
I don't recall this happening before and seems to have surfaced recently. This generally happens when you are working on a
.sol
file,forge build
, then remove the source file before building again. Forge seems to still want to find the source file by its artifact. I see this most often when switching branches where Solidity files come and go.To fix/workaround, I have to
forge clean
manually, but would expect forge to be smart enough to figure this out.The text was updated successfully, but these errors were encountered: