Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: cache global template build at initialization #6299

Merged
merged 8 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/common/src/term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@ impl Reporter for SpinnerReporter {

/// Invoked before a new [`Solc`] bin is installed
fn on_solc_installation_start(&self, version: &Version) {
self.send_msg(format!("Installing solc version {version}"));
self.send_msg(format!("Installing Solc version {version}"));
}

/// Invoked before a new [`Solc`] bin was successfully installed
fn on_solc_installation_success(&self, version: &Version) {
self.send_msg(format!("Successfully installed solc {version}"));
self.send_msg(format!("Successfully installed Solc {version}"));
}

fn on_solc_installation_error(&self, version: &Version, error: &str) {
self.send_msg(Paint::red(format!("Failed to install solc {version}: {error}")).to_string());
self.send_msg(Paint::red(format!("Failed to install Solc {version}: {error}")).to_string());
}

fn on_unresolved_imports(&self, imports: &[(&Path, &Path)], remappings: &[Remapping]) {
Expand Down
8 changes: 4 additions & 4 deletions crates/forge/tests/cli/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ forgetest!(can_list_specific_chain, |_prj, cmd| {
});

forgetest_init!(can_test_no_cache, |prj, cmd| {
let _ = std::fs::remove_dir_all(prj.cache_path());
prj.clear_cache();

cmd.args(["test", "--no-cache"]).assert_success();
assert!(!prj.cache_path().exists(), "cache file should not exist");
assert!(!prj.cache().exists(), "cache file should not exist");

cmd.forge_fuse().args(["test"]).assert_success();
assert!(prj.cache_path().exists(), "cache file should exist");
cmd.forge_fuse().arg("test").assert_success();
assert!(prj.cache().exists(), "cache file should exist");
});
Loading