2

This is a highly specific bottleneck encountered when using Truffle.

  1. In my normal truffle-config.js file, I have the optimizer enabled.
  2. I run a CI pipeline which has a coverage job.
  3. I use 0x/sol-coverage and it seems that when enabling the Solidity optimizer some information about the source code is lost and the aggregate coverage is lower than it should be.
  4. Therefore, I would ideally be able to run truffle compile --disable-optimizer - or some way to modify the compiler settings.

At worst, I could modify the truffle-config.js file before running the coverage job, but I feel this is not good practice.

Are there any other workarounds?

0

I resorted to checking for some environment variables in the truffle-config.js file, although I'm not fully satisfied by this solution. I'll keep this thread open until I find a better alternative.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.