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

feat(solc): compiler pipeline improvements #866

Merged

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Feb 5, 2022

Motivation

improve how versions are autodetected. The old algorithm simply picked the highest compatible version, without considering other source files. So that A (=0.8.10) and B(>0.8.0) would result in two versions (0.8.10 and 0.8.11). Now we're trying to find a single versions that satisfies all sets, see resolver.rs docs.

limit the CompilerOutput's contracts: solc may include additional contracts in the CompilerOutput than were provided in the CompilerInput which is not desired in the ProjectCompiler since that already provides all contracts, so we simply restrict the CompilerOutput to those files provided in the CompilerInput Solc::compile_exact

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@mattsse mattsse force-pushed the matt/some-compiler-pipeline-improvements branch from b4e9e82 to f2fb044 Compare February 5, 2022 12:13
@@ -384,6 +397,8 @@ fn compile_parallel(
.collect::<Result<Vec<_>>>()
})?;

// TODO need to do post filtering as the output can contain more files than provided in the
Copy link
Owner

Choose a reason for hiding this comment

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

Wdym post filtering?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh this should have been removed...no longer relevant

@@ -14,6 +14,26 @@
//! Finding all dependencies is fairly simple, we're simply doing a DFS, starting the source
//! contracts
//!
//! ## Solc version auto-detection
Copy link
Owner

Choose a reason for hiding this comment

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

Excellent doc

@gakonst gakonst merged commit 7463e2d into gakonst:master Feb 5, 2022
gakonst added a commit to foundry-rs/foundry that referenced this pull request Feb 9, 2022
bumps svm-rs.
fixes #525
fixes #684

driveby: re-enable geb integration test (fixed in gakonst/ethers-rs#866)
fixes #561
gakonst added a commit to foundry-rs/foundry that referenced this pull request Feb 9, 2022
bumps svm-rs.
fixes #525
fixes #684

driveby: re-enable geb integration test (fixed in gakonst/ethers-rs#866)
fixes #561
gakonst added a commit to foundry-rs/foundry that referenced this pull request Feb 9, 2022
bumps svm-rs.
fixes #525
fixes #684

driveby: re-enable geb integration test (fixed in gakonst/ethers-rs#866)
fixes #561
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