truffle icon indicating copy to clipboard operation
truffle copied to clipboard

Solidity testing with Truffle Test always compiles all Truffle testing libraries

Open haltman-at opened this issue 4 years ago • 1 comments

Issue

Solidity testing will always compile all of Truffle's testing libraries, even if not all of them are imported. This is a problem because some of these libraries don't work for older versions of Solidity. The result is that if you're using these old versions of Solidity, rather than simply being unable to use these libraries (which I think wouldn't be that big a problem), you can't use Solidity test files at all.

Expected Behavior

Solidity testing should only compile the testing libraries that are actually imported, plus SafeSend (as that one may be needed even if it's not imported).

Environment

  • Truffle version (truffle version): 5.1.63

haltman-at avatar Jan 30 '21 06:01 haltman-at

(...and, yeah, I guess this is also a performance problem too. :P )

haltman-at avatar Feb 04 '21 06:02 haltman-at