Pass solc version into compiler rather than returning from compilation. Allows for better reporting

This commit is contained in:
James Wilson
2025-08-27 13:13:55 +01:00
parent 8229675ba8
commit 5c75228496
10 changed files with 174 additions and 171 deletions
-11
View File
@@ -5,7 +5,6 @@
use cache::get_or_download;
use download::SolcDownloader;
use semver::Version;
use std::path::{Path, PathBuf};
use revive_dt_common::types::VersionOrRequirement;
@@ -46,13 +45,3 @@ pub async fn download_solc(
let downloader = downloader(version, wasm).await?;
get_or_download(cache_directory, &downloader).await
}
/// Return the version of solc that will be downloaded via [`download_solc`]
/// given the version requirements and wasm flag.
pub async fn solc_version(
version: impl Into<VersionOrRequirement>,
wasm: bool,
) -> anyhow::Result<Version> {
let downloader = downloader(version, wasm).await?;
Ok(downloader.version.clone())
}