Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Enhancement: Remove solc-js compiler from the bundle #2042

Merged
merged 22 commits into from
May 29, 2019
Merged

Conversation

CruzMolina
Copy link
Contributor

@CruzMolina CruzMolina commented May 21, 2019

This PR seeks to resolve #2034 by removing the solc-js compiler component completely from the bundle.

This is handled by:

  • leveraging truffle obtain in a postinstall to download and cache a default soljson when installing truffle via npm.
  • Importing only the solc/wrapper to parse soljson's.
  • Removing the Bundled strategy from the CompilerSupplier.

The current implementation of this can be tested at truffle@unbundled-solc.

@CruzMolina CruzMolina requested a review from gnidan May 21, 2019 20:32
Copy link
Contributor

@gnidan gnidan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple other things:

  • Even though the compiler supplier default has changed, I think it's worth adding a separate truffle obtain step to the .travis.yml file, just so it doesn't make any single test slower than it should be.
  • Probably worth including the README change so users know to <truffle?> obtain after yarn bootstrap we can do this later, if anyone complains
  • Should we add the compilers directory to the Travis cache?

All in all, this is exciting stuff! I think we should wait for solc to at least respond before we start using that truffle-solc-wrapper, however.

packages/truffle/scripts/postinstall.js Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented May 21, 2019

Coverage Status

Coverage decreased (-0.4%) to 69.692% when pulling d5b6543 on wrapper-solc into 017a712 on develop.

@CruzMolina CruzMolina requested a review from gnidan May 28, 2019 23:03
@CruzMolina CruzMolina changed the title Enhancement: Remove solc-js NPM dependency Enhancement: Remove solc-js compiler from the bundle May 28, 2019
Copy link
Contributor

@gnidan gnidan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎈 woot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove solc NPM dependency and use Truffle's obtain mechanism instead
3 participants