Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

sol-compiler: 0.6 support #2532

Merged
merged 6 commits into from
Apr 1, 2020
Merged

Conversation

dorothy-zbornak
Copy link
Contributor

@dorothy-zbornak dorothy-zbornak commented Mar 27, 2020

Description

Addresses #2528

This adds solidity 0.6 support to sol-compiler. I've also done some decent-sized refactors to (hopefully) make compatibility with new versions/features easier to integrate, and to tidy up the code. There are some other small changes listed below.

Parallelization

I rewrote a bunch of the code to be parallelized, to speed up build times.

Artifact Changes

  • solc version string in artifact settings object is now normalized to {VERSION}+commit.{COMMIT_HASH}. Previously it could take on many forms, depending on where your compiler comes from (docker, npm, direct path).
  • Paths for source files in the output artifacts are now expressed in dot-notation relative paths. Previously they were expressed as path segments, which made it difficult to tell if a source file was an npm module or not.
  • Input artifacts now include the solidity version in their settings object. This makes automated verification a bit easier because we don't have to look up the solidity version used from the output artifacts as well.

Testing instructions

Types of changes

Checklist:

  • Prefix PR title with [WIP] if necessary.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • Add new entries to the relevant CHANGELOG.jsons.

@dorothy-zbornak dorothy-zbornak force-pushed the feat/sol-compiler/support-0.6 branch 5 times, most recently from e322fab to a9de941 Compare March 30, 2020 20:20
@dorothy-zbornak dorothy-zbornak marked this pull request as ready for review March 30, 2020 20:56
Copy link
Contributor

@jalextowle jalextowle left a comment

Choose a reason for hiding this comment

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

Looks pretty good! I have a few questions and comments, but it looks ready to merge once those are addressed.

packages/sol-compiler/src/compiler.ts Show resolved Hide resolved
packages/sol-compiler/test/compiler_test.ts Outdated Show resolved Hide resolved
packages/sol-compiler/src/utils/compiler.ts Show resolved Hide resolved
packages/sol-compiler/src/utils/compiler.ts Show resolved Hide resolved
packages/sol-compiler/src/compiler.ts Outdated Show resolved Hide resolved
packages/sol-compiler/src/solc_wrapper_v05.ts Outdated Show resolved Hide resolved
packages/sol-compiler/src/solc_wrapper_v05.ts Show resolved Hide resolved
packages/sol-compiler/src/solc_wrapper_v06.ts Show resolved Hide resolved
packages/sol-compiler/src/utils/compiler.ts Show resolved Hide resolved
packages/sol-compiler/src/utils/compiler.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@hysz hysz left a comment

Choose a reason for hiding this comment

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

LGTM! (~‾▿‾)~

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 79.588% when pulling b9a68c0 on feat/sol-compiler/support-0.6 into 424cbd4 on development.

@dorothy-zbornak dorothy-zbornak merged commit 2086bff into development Apr 1, 2020
@dorothy-zbornak dorothy-zbornak deleted the feat/sol-compiler/support-0.6 branch April 1, 2020 19:07
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.

None yet

4 participants