question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Truffle Compile re-downloads solc even after running Truffle Obtain

See original GitHub issue

Issue

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:closed
  • Created 5 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
CruzMolinacommented, Mar 20, 2019

To recap, this issue directly relates to an older version of truffle-compile (maybe 4.0.0) that improperly cached solc and would attempt to re-download after using truffle obtain. This is now fixed on the latest version of truffle-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.9 soon.

0reactions
adrianmclicommented, Apr 3, 2019

Thanks, I’ll give it a shot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiler Version not Found After Downloading
When truffle compile was run, it had issues connecting to the internet to get potential compiler versions. As a workaround, You can download...
Read more >
Truffle still using old solc compiler even after updating ...
I am having a problem where truffle is still using old solidity compiler (- solc: 0.5.16+commit.9c3226ce.Emscripten.clang) even though i ...
Read more >
Compile contracts - Truffle Suite
Upon first run, all contracts will be compiled. Upon subsequent runs, Truffle will compile only the contracts that have been changed since the...
Read more >
Deploy with Truffle - Neon Docs
This command compiles all the contracts in the contracts/ , deploys them to the Neon Devnet, and runs all the tests in the...
Read more >
Errors when compiling smart contracts with Truffle and solc-js
I was using openzeppelin to import the code for the ERC721 token. When I tried to compile my smart contract, I kept getting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found