Skip to content
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

Hardhat-network-helpers loadFixture is not working when running coverage #4474

Closed
Amxx opened this issue Oct 13, 2023 · 4 comments
Closed

Hardhat-network-helpers loadFixture is not working when running coverage #4474

Amxx opened this issue Oct 13, 2023 · 4 comments
Assignees
Labels
status:needs-more-info There's not enough information to start working on this issue

Comments

@Amxx
Copy link
Contributor

Amxx commented Oct 13, 2023

Version of Hardhat

2.18.0

What happened?

See sc-forks/solidity-coverage#819

Minimal reproduction steps

See sc-forks/solidity-coverage#819

Search terms

chai fixture coverage

@cgewecke
Copy link
Contributor

The companion issue for this at solidity-coverage has been resolved & the test helpers seem to work ok. See sc-forks/solidity-coverage#819 (comment) for details.

@fvictorio
Copy link
Member

Sorry, I'm not sure if there's something we need to do here?

@fvictorio fvictorio added status:needs-more-info There's not enough information to start working on this issue and removed status:triaging labels Oct 20, 2023
@Amxx
Copy link
Contributor Author

Amxx commented Oct 23, 2023

The companion issue for this at solidity-coverage has been resolved & the test helpers seem to work ok.

I would disagree with that. Solidity-coverage not properly handling the hardhat env extension is a major drawback that can't simply be ignored.
Not sure anything should be done at the hardhat level though.

@Amxx Amxx closed this as completed Oct 23, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in Hardhat Oct 23, 2023
@cgewecke
Copy link
Contributor

I would disagree with that. Solidity-coverage not properly handling the hardhat env extension is a major drawback that can't simply be ignored.

For more context I think the problem was caused by:

It's kind of related to #1374 and #3491 although there are places in Hardhat itself (notably hardhat_reset) where the provider is recreated and it's possible doing this kind of stuff in extendEnv would run into trouble there too? Not certain.

Ideally the coverage tool would be entirely passive, rely on source-maps & a tracer api, and never touch the provider. This is difficult to get right though (for example, see Foundry coverage issues

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:needs-more-info There's not enough information to start working on this issue
Projects
Archived in project
Development

No branches or pull requests

3 participants