Discussed this with @CruzMolina & we believe this is a separate issue from https://github.com/trufflesuite/truffle/issues/469
I have a large number of contracts in a subdirectory for development purposes. I will never edit these contracts and therefore do not want to recompile them yet running truffle test recompiles all of these contracts every time.
truffle compiletruffle testMy understanding was you could prevent contracts in the contract folder from being recompiled by compiling them separately before running tests.
When I:
truffle compiletruffle testAll contracts in my subdirectory are recompiled every time. Full log output here:
https://gist.github.com/sbrichards/e057c51042bf509082bba35cb95d5498
$ truffle version
Truffle v5.0.21 (core: 5.0.21)
Solidity - 0.4.24 (solc-js)
Node v10.13.0
Web3.js v1.0.0-beta.37
HI @sbrichards can you upgrade to the latest Truffle version and see if you issue is fixed? @CruzMolina tried to reproduce and everything seemed ok. Thanks!
@samajammin closing this for issue maintenance... but I have a feeling this hasn't gone away so let us know if you get the chance to try a newer version!
The issue still persists in 5.0.39
Truffle v5.0.39 (core: 5.0.39)
Solidity - 0.5.12 (solc-js)
Node v10.15.1
Web3.js v1.2.1
Would it be better just to introduce a flag for truffle-config.js that if turned on would skip the compilation process at all when running truffle test?
I'm getting this also in CircleCI. I am caching and restoring the build folder between processes - is there a tmp file or some such where truffle caches the last compilation time? Either way, a flag on truffle test seems like an easy win.
Most helpful comment
The issue still persists in 5.0.39
Truffle v5.0.39 (core: 5.0.39)
Solidity - 0.5.12 (solc-js)
Node v10.15.1
Web3.js v1.2.1
Would it be better just to introduce a flag for truffle-config.js that if turned on would skip the compilation process at all when running
truffle test?