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

solidity-coverage w/o truffle? #216

Closed
ewingrj opened this issue Apr 11, 2018 · 2 comments
Closed

solidity-coverage w/o truffle? #216

ewingrj opened this issue Apr 11, 2018 · 2 comments
Labels

Comments

@ewingrj
Copy link

ewingrj commented Apr 11, 2018

I'm not sure of the feasibility of this, but it would be great if this tool could be designed to work with tooling other then Truffle. Possibly by defining some type of interface that needs to be implemented?

@cgewecke
Copy link
Member

@perissology Completely agree. That's always been a goal and we've tried make the test runner configurable in the options.

Unfortunately for reasons relating to the event based instrumentation strategy used here and growing strictness at Solidity about what kinds of functions can fire events, we've become dependent on the truffle artifact / dev stack. We need to be able to modify the contract ABIs to end run restrictions for view and pure modifiers and run two compilation sweeps to get things to work correctly. That's meant that we need to have a clear definition of artifact location and compilation processes to be effective. Truffle provides those and is widely used. It's not adequate though.

You might be interested in work that has been going on at 0xProject to add coverage to their build. They're not on Truffle and have built an in-memory opcode based coverage tool tailored to their stack. I believe it's meant to be quite flexible though.

We've been interested in moving in that direction for a while, but this is a volunteer project and has limited engineering resources at the moment.

If you have any suggestions about how to make things work for your use case (or want to work on this), would be more than happy to discuss.

Thanks!

@cgewecke
Copy link
Member

Closing via 0.7.0. That releases exposes an API which lets you build a custom coverage runner.

There are two plugins - one for Truffle, one for Buidler - which can be used as recipes if you need to tailor the tool for a different dev stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants