2

Each time I run the truffle migrate command, I see the following messages:

Compiling .\contracts\DateTime.sol...
Compiling .\contracts\DateTimeUtils.sol...
Compiling .\contracts\ERC20Token.sol...
Compiling .\contracts\Migrations.sol...
Compiling .\contracts\SafeMath.sol...
Compiling .\contracts\StringLib.sol...
Compiling .\contracts\getPrice.sol...
Compiling .\contracts\oraclizeAPI_0.4.sol...

Is truffle migrate compiling all my source files again, despite there being no changes? Or is truffle just showing which files it's checking?

If not, what is it doing when it shows "Compiling sourcefilename" when doing a migration?

How can I fix this, if it's really compiling?

I'm using Truffle v4.0.0-beta.0 (core: 4.0.0-beta.0)

Thanks!

1

Yeah, it seems like truffle is compiling all your source code again. Assuming you aren't making any changes to the code, this seems like a bug. Clearly you are using a early-beta version of truffle 4, so this might be the case.

In the current version of truffle (truffle 3.4.11 I believe), truffle migrate will only recompile contracts that have changed since the last compilation.

EDIT: Ah, after upgrading some of my contracts to solidity version 0.4.15, I am getting this same issue with truffle 3.4.11. I haven't found a work around, nor a --no-compile option to use.

From their documentation:

Truffle will compile only the contracts that have been changed since the last compile, to reduce any unnecessarily compilation.

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.