forge build
is generating multiple keys under build-info.output.source
#8797
Labels
forge build
is generating multiple keys under build-info.output.source
#8797
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (d75318c 2024-09-02T00:24:18.763851000Z)
What command(s) is the bug in?
forge build
Operating System
macOS (Apple Silicon)
Describe the bug
running
forge build --build-info --skip test/** script/** --force
generates multiple keys for the same file:❯ cat $(find out/build-info/*.json) | jq '.output.sources | keys' | grep 'ITransferValidator.sol' "contracts/interfaces/callbacks/ITransferValidator.sol", "lib/core-v1/contracts/interfaces/callbacks/ITransferValidator.sol",
ITransferValidator.sol
is a file in the submodule of the repo, and the correct path islib/core-v1/contracts/interfaces/callbacks/ITransferValidator.sol
. However, there is an additional key in thesources
with this path:contracts/interfaces/callbacks/ITransferValidator.sol
, which is the path in the repo that it belongs to.This is causing issues for when I run
slither . --ignore-compile --config-file=slither.config.json --fail-low
, which is yielding this error:crytic_compile.platform.exceptions.InvalidCompilation: Unknown file: contracts/interfaces/callbacks/ITransferValidator.sol
.I would expect forge build to only generate one key in the
output.sources
, could use some insight to pinpoint the issue and what is causing the key generate with the incorrect path. Thank you!Ref ticket in
crytic-compile
: crytic/crytic-compile#572The text was updated successfully, but these errors were encountered: