0.8.7
What's Changed
viaIR
now allowed
This release (hopefully) fixes a long-running problem solidity-coverage had with solc's viaIR
compilation mode - It's now possible to use it without any special configuration. (Please report any ongoing issues with this to issue #861)
If you've been using .solcover.js
options like configureYulOptimizer
and solcOptimizerDetails
as a work around, you should remove them when upgrading. (Don't forget to run the hardhat clean task after updating any coverage config stuff).
--network
no longer allowed
Sadly the ganache client has been deprecated. The coverage plugin never worked with its latest major version and the network
flag only existed for its sake. Going forward, the network
option throws an error notifying the user that coverage only uses the HardhatEVM network.
--sources
cli option
You can now select a single file (or folder) at the command line to generate coverage for. This option should speed things up if you've been waiting for the plugin to instrument everything in a large project whenever you run the command.
$ npx hardhat coverage --sources MyFile.sol
$ npx hardhat coverage --sources MyFolder
(Thanks so much @clauBv23 for adding this!)
Funding
OpenZeppelin has very generously funded recent work at solidity-coverage via DRIPS, a public goods protocol which helps you direct money to projects in your dependency tree. Thanks so much! ❤️
Links to relevant PRs
- Add command option to specify the source files to run the coverage on (#806) by @clauBv23 in #838
- Remove ganache-cli related code from API & tests by @cgewecke in #849
- Add missing
onPreCompile
stage hook by @cgewecke in #851 - Enable coverage when
viaIR
compiler flag is true by @cgewecke in #854
Full Changelog: v0.8.6...v0.8.7