Open ghost opened 4 years ago
Hi, thanks for the report! Do you have an example repo we could check out that would allow us to reproduce this, or other instructions we could follow to create a reproduction example? Thank you!
Hi, @haltman-at will try to upload a testing repo to try it.
@haltman-at I uploaded this sample https://github.com/drbullock/TruffleTest
I have added now Interfaces to my original project now and it looks like it is partially fixed, but it is still recompiling the Interfaces.
In the meantime, from the test repo (only for compiling) here are the logs:
Fresh compile:
Compiling your contracts...
===========================
> Compiling @openzeppelin/contracts-upgradeable/token/ERC20/ERC20BurnableUpgradeable.sol
> Compiling @openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol
> Compiling @openzeppelin\contracts-upgradeable\GSN\ContextUpgradeable.sol
> Compiling @openzeppelin\contracts-upgradeable\math\SafeMathUpgradeable.sol
> Compiling @openzeppelin\contracts-upgradeable\proxy\Initializable.sol
> Compiling @openzeppelin\contracts-upgradeable\token\ERC20\ERC20Upgradeable.sol
> Compiling @openzeppelin\contracts-upgradeable\token\ERC20\IERC20Upgradeable.sol
> Compiling @openzeppelin\contracts-upgradeable\utils\AddressUpgradeable.sol
> Compiling .\contracts\Migrations.sol
> Compiling .\contracts\inc\Base.sol
> Compiling .\contracts\interfaces\IToken.sol
> Compiling .\contracts\tokens\AToken.sol
> Compiling .\contracts\tokens\BToken.sol
> Compiling .\contracts\inc\Base.sol
> Compiling .\contracts\interfaces\IToken.sol
> Artifacts written to C:\TruffleTest\build\contracts
> Compiled successfully using:
- solc: 0.7.4+commit.3f05b770.Emscripten.clang
Next compiles:
Compiling your contracts...
===========================
> Compiling .\contracts\inc\Base.sol
> Compiling .\contracts\interfaces\IToken.sol
> Artifacts written to C:\TruffleTest\build\contracts
> Compiled successfully using:
- solc: 0.7.4+commit.3f05b770.Emscripten.clang
Truffle Version:
Truffle v5.1.53 (core: 5.1.53)
Solidity - 0.7.4 (solc-js)
Node v12.18.4
Web3.js v1.2.9
@drbullock Thanks very much for the report and the repro repo! We'll dig into this and see if we can see what's going on here.
Issue
1- I have
Artifacts are from different compiler runs
when trying to migrate my contracts. When I try to compile all the contracts I see: 2- some contracts are double-compiling and 3- some of OZ imports are double-compiling and their paths are messed up with slashed and backslashes 4- when I runtruffle compile
, it compiles all my contracts (not OZ) again, even when there are no changes thereEnvironment
truffle version
): Truffle v5.1.52 (core: 5.1.52) Solidity - 0.7.4 (solc-js) Node v12.18.4 Web3.js v1.2.9node --version
): v12.18.4npm --version
): 6.14.6