Skip to content

Commit

Permalink
Merge branch 'main' into cl/remove-evmla
Browse files Browse the repository at this point in the history
  • Loading branch information
xermicus committed Jan 31, 2025
2 parents cb1dd20 + ab90af4 commit 8786d01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This is a development pre-release.
- Removed support for legacy EVM assembly (EVMLA) translation.

### Fixed
- Solidity: Add the solc `--libraries` files to sources.

## v0.1.0-dev.9

Expand Down
10 changes: 7 additions & 3 deletions crates/solidity/src/solc/standard_json/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,17 @@ impl Input {
metadata: Option<SolcStandardJsonInputSettingsMetadata>,
suppressed_warnings: Option<Vec<Warning>>,
) -> anyhow::Result<Self> {
let mut paths: BTreeSet<PathBuf> = paths.iter().cloned().collect();
let libraries = Settings::parse_libraries(library_map)?;
for library_file in libraries.keys() {
paths.insert(PathBuf::from(library_file));
}

#[cfg(feature = "parallel")]
let iter = paths.into_par_iter(); // Parallel iterator

#[cfg(not(feature = "parallel"))]
let iter = paths.iter(); // Sequential iterator

let sources = iter
.map(|path| {
let source = Source::try_from(path.as_path()).unwrap_or_else(|error| {
Expand All @@ -76,8 +82,6 @@ impl Input {
})
.collect();

let libraries = Settings::parse_libraries(library_map)?;

Ok(Self {
language,
sources,
Expand Down

0 comments on commit 8786d01

Please sign in to comment.