Skip to content

Commit

Permalink
chore(update constants): increment solc versions for install_commonly… (
Browse files Browse the repository at this point in the history
foundry-rs#5504)

* chore(update constants): increment solc versions for install_commonly_used_solc

function `install_commonly_used_solc` pre-installs commonly used solc versions

increment based of latest solc version update

* rename vars

---------

Co-authored-by: Matthias Seitz <[email protected]>
  • Loading branch information
sambacha and mattsse authored Jul 29, 2023
1 parent 41bae8e commit d93312b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/test-utils/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ pub fn setup_cast_project(test: TestProject) -> (TestProject, TestCommand) {
fn install_commonly_used_solc() {
let mut is_preinstalled = PRE_INSTALL_SOLC_LOCK.lock();
if !*is_preinstalled {
let v0_8_18 = std::thread::spawn(|| Solc::blocking_install(&"0.8.18".parse().unwrap()));
let v0_8_19 = std::thread::spawn(|| Solc::blocking_install(&"0.8.19".parse().unwrap()));
let v0_8_20 = std::thread::spawn(|| Solc::blocking_install(&"0.8.20".parse().unwrap()));
let v0_8_21 = std::thread::spawn(|| Solc::blocking_install(&"0.8.21".parse().unwrap()));

let wait = |res: std::thread::JoinHandle<_>| -> Result<(), ()> {
if let Err(err) = res.join().unwrap() {
Expand All @@ -208,7 +208,7 @@ fn install_commonly_used_solc() {
};

// only set to installed if succeeded
*is_preinstalled = wait(v0_8_18).and(wait(v0_8_19)).and(wait(v0_8_20)).is_ok();
*is_preinstalled = wait(v0_8_19).and(wait(v0_8_20)).and(wait(v0_8_21)).is_ok();
}
}

Expand Down

0 comments on commit d93312b

Please sign in to comment.