-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crytic_compile.platform.exceptions.InvalidCompilation: Unknown file #572
Comments
Hi! Thanks for the report; can you confirm if it works locally or if you see the same error there? e.g. git clone --recursive https://github.com/Ammalgam-Protocol/peripheral-v1
cd peripheral-v1
forge install --quiet
forge build --build-info --skip */test/** */script/** --force
slither . --ignore-compile --config-file=slither.config.json --fail-low |
Hi @elopez - I had to adjust to use this build command but running
|
Alright, so this is not an issue on the action then, but on either crytic-compile or Foundry's artifact generation. Out of curiosity, can you try again without the skip flags and report back? i.e. do a plain |
@elopez - that makes sense. so running:
|
@Uhan19 can you upgrade your slither and crytic-compile and see if that still happens? I see you're using quite old versions (0.9.2, 0.3.0 respectively) |
@elopez - I have just upgraded to Also running a simple |
It's possible the artifacts don't reflect the correct path of the file, does In the meantime I'll move this issue to the crytic-compile repo to keep things organized. |
so I just tooked at the the
The second source with the correct path, has the |
I wonder if this could be related to foundry-rs/foundry#7591 @0xalpharush have you seen this issue with the paths in the Foundry artifacts before? |
@elopez - yea that looks very familiar to my issue: what's interesting is that some files are duped, but not all of them. For example: cat $(find out/build-info/*.json) | jq '.output.sources | keys' | grep 'ITransferValidator.sol' cat $(find out/build-info/*.json) | jq '.output.sources | keys' | grep 'IAmmalgamCallee.sol' |
It could also be an instance of gakonst/ethers-rs#2609 as it seems like the remappings may not be preserving the leading path prefix. Would you mind reporting this on the foundry repo so it gets looked at by them? |
sure will do, I just checked in the ❯ cat $(find out/build-info/*.json) | jq '.output.sources | keys' | grep 'ITransferValidator.sol' |
Hi team,
running into some issues when I am reusing a slither workflow from one of my solidity repos (core-v1) in another repo (peripheral-v1). Core-v1 repo is submodule in the Peripheral-v1,
lib/core-v1
. The slither analysis passes in CI on the core-v1 repo, however it fails when the workflow is being called by the peripheral CI workflow. Here is the error:ITransferValidator.sol is a file in the core-v1 repo, and it is not used or imported in the peripheral-v1 repo, so I am not sure why slither is trying to compile this file.
here is my slither.yml in core-v1:
and this is the calling workflow CI.yml in the Peripheral-v1 repo:
I also have added
slither.config.json
in both repos:I had thought that perhaps I needed to define the targets for slither to run and perhaps it was running in the run context or root level, but after adding a step to list the directories, I could see that the file structure is as I expected. I also commented out the cache restore and build the contracts as part of the slither workflow, however this did not resolve the issue either. Would love some input in terms of why the compiler is reading a file in the submodule when it should've been filtered out. Please let me know if I can provide any additional information. Thanks.
The text was updated successfully, but these errors were encountered: