-
Notifications
You must be signed in to change notification settings - Fork 269
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
Cannot find generated artifacts #573
Comments
Hi @wighawag, Do you have an example I could try to reproduce with? There is a basic e2e test at https://github.com/sc-forks/hardhat-e2e that we're using in CI here. To run solidity-coverage with it you would
|
I have this repo (branch: solidity-coverage) : https://github.com/wighawag/template-ethereum-contracts/tree/solidity-coverage |
interesting It seems that when not using |
I guess the artifacts are suposed to be generated in the temp folder , right ? |
note that generating temp in the default artifacts folder (but saving the cache in a different folder than the default cache folder) will make hardhat caching fails as it will keep using soldity-coverage artifacts unless changes to file happen |
Yes I think you're right that something is going wrong with the sequence that things are read in.
solidity-coverage/plugins/hardhat.plugin.js Lines 138 to 139 in 8660166
|
yes, hardhat-deploy read the path for artifacts from these newly update paths but because there is no files there it fails to get them (unless So hardhat should allow plugin to update the path, either by having hardhat read |
Mmm, I think under normal circumstances it does allow this and the problem is coming from plugin interaction. Normally the temporary artifacts are saved to the temp folder and HH reads from them correctly. |
Without hardhat-deploy I can see that the temp artifact folder are empty too. |
Oh I see. You might be right that this is |
I guess see here where the artifacts is set at env construction time : https://github.com/nomiclabs/hardhat/blob/6ffb8baf0ede8c8c73b502bba826b0f8196604b2/packages/hardhat-core/src/internal/core/runtime-environment.ts#L77 |
@wighawag To be clear, you don't set the paths anywhere in your code? Only read? |
yes only read |
Ah ok ok I just re-ran my e2e an now I see exactly what you're saying. Something's seriously wrong. Thanks for helping with all of this, sorry. |
No problem, glad to be of help. solidity-coverage is a great tool :) |
@wighawag This should be fixed with Have also added your a fork of your ethereum-template-contracts project as a smoke-test in CI here and everything seems to work as expected. Just lmk if you see any further problems on your side. |
I am using hardhat-deploy with solidity-coverage so there might be some incompatibilities but cannot find any obvious one
The issue I have is that there seems to be no generated artifacts in the temp folder, even though the
.coverage_cache
containssolidity-files-cache.json
I commented the line that delete the temp folder and after execution of
hardhat coverage
the folder exist but is empty.Any idea ?
The text was updated successfully, but these errors were encountered: