Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (0ae39ea 2023-12-11T00:27:32.487222000Z)
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
Running forge script in a repo that has a dependency with .sol files that don't contain a contract (e.g. the file contains only error definitions or constants) results in an error like
thedavidmeister@davids-iMac polytrade % forge script scripts/OrderBookNPE2.s.sol
[⠒] Compiling...
No files changed, compilation skipped
Error:
failed to read artifact source file for `lib/rain.interpreter/src/error/ErrBitwise.sol:ErrBitwise`
Context:
- Error #0: failed to read from "/Users/thedavidmeister/Code/polytrade/src/error/ErrBitwise.sol": No such file or directory (os error 2)
- Error #1: No such file or directory (os error 2)
This error can be worked around by adding an empty contract like contract ErrBitwise {} in the file that forge is complaining about
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (0ae39ea 2023-12-11T00:27:32.487222000Z)
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
Running
forge scriptin a repo that has a dependency with .sol files that don't contain a contract (e.g. the file contains only error definitions or constants) results in an error likeThis error can be worked around by adding an empty contract like
contract ErrBitwise {}in the file that forge is complaining about