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

Internal improvement: Update compile interface #3252

Merged
merged 110 commits into from
Sep 15, 2020

Conversation

eggplantzzz
Copy link
Contributor

@eggplantzzz eggplantzzz commented Aug 12, 2020

This PR changes a couple of interfaces in Truffle:

First, it aims to standardize and interface for compilation packages. They all now export a Compile object which has an all and necessary method which is required to use with workflow-compile.

compile-solidity, compile-vyper, and external-compile now return a CompilerResult which is an array of Compilations. (see the new types in compile-common) Currently they all still only return 1 compilation per package but in the future we plan to potentially return multiple compilations per package. This would be especially helpful when, for example, we might need to use multiple versions of the Solidity compiler for a set of contracts.

Second, it changes the return from workflow-compile (WorkflowCompileResult). It now returns an object with contracts and compilations.

In addition to the above, it also begins moving some shimming logic to compile-common.

🛠️ NOTE: This is a breaking change for compile-solidity, workflow-compile, compile-vyper, and external-compile.

@eggplantzzz eggplantzzz force-pushed the update-compile-interface branch from 8e5d19b to fb11826 Compare August 13, 2020 11:37
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.

Here's a round of changes to the types!

Just looked over this at large and it's nice how it's taking shape!

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.

Here we go!

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.

2 participants