Truffle Compile re-downloads solc even after running Truffle Obtain
See original GitHub issueIssue
Truffle Compile re-downloads solc even after running Truffle Obtain. Do note that we use truffle to run truffle obtain.
But in our tests we use truffle-compile by itself (as in we did npm install truffle-compile and used it with require("truffle-compile")).
Steps to Reproduce
This is the .travis.yml used here:
language: node_js
node_js:
- "node"
- "--lts"
cache:
yarn: true
directories:
- node_modules
before_script:
- "truffle obtain --solc=0.5.2"
And this is the truffle-compile usage: https://github.com/trufflesuite/drizzle-utils/blob/master/packages/test-chain/compile.js#L3
Expected Behavior
Since truffle obtain is already run, it shouldn’t try to download the solidity compiler again.
Actual Results
Check out this build:
https://travis-ci.org/trufflesuite/drizzle-utils/jobs/508220795
Note that on line 468, it already downloaded the compiler. But on line 539 it tries to do it again. It’s able to fetch it in time for this build, but not in other builds.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (11 by maintainers)

Top Related StackOverflow Question
To recap, this issue directly relates to an older version of
truffle-compile(maybe4.0.0) that improperly cachedsolcand would attempt to re-download after usingtruffle obtain. This is now fixed on the latest version oftruffle-compile, but there is another issue outlined in #1813 .Keeping this open for now as a reminder, hoping to have the solution for #1813 merged and released in
truffle-compile: 4.0.9soon.Thanks, I’ll give it a shot!