Compare commits

..

1 Commits

Author SHA1 Message Date
Omar Abdulla 507f12491e Remove the cwd setting from the export-chainspec command 2025-11-04 06:30:04 +03:00
+2 -9
View File
@@ -2,13 +2,12 @@
use std::{
collections::HashMap,
str::FromStr,
sync::{LazyLock, Mutex},
};
use revive_dt_common::types::VersionOrRequirement;
use semver::{Version, VersionReq};
use semver::Version;
use sha2::{Digest, Sha256};
use crate::list::List;
@@ -66,9 +65,6 @@ impl SolcDownloader {
target: &'static str,
list: &'static str,
) -> anyhow::Result<Self> {
static MAXIMUM_COMPILER_VERSION_REQUIREMENT: LazyLock<VersionReq> =
LazyLock::new(|| VersionReq::from_str("<=0.8.30").unwrap());
let version_or_requirement = version.into();
match version_or_requirement {
VersionOrRequirement::Version(version) => Ok(Self {
@@ -83,10 +79,7 @@ impl SolcDownloader {
.builds
.into_iter()
.map(|build| build.version)
.filter(|version| {
MAXIMUM_COMPILER_VERSION_REQUIREMENT.matches(version)
&& requirement.matches(version)
})
.filter(|version| requirement.matches(version))
.max()
else {
anyhow::bail!("Failed to find a version that satisfies {requirement:?}");