Skip to content

Commit

Permalink
update fmt version
Browse files Browse the repository at this point in the history
  • Loading branch information
rahxephon89 committed Sep 26, 2024
1 parent bb2e913 commit 2880eb0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
3 changes: 2 additions & 1 deletion crates/aptos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
All notable changes to the Aptos CLI will be captured in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and the format set out by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased
- Adds `aptos update prover-dependencies`, which installs the dependency of Move prover, boogie, z3 and cvc5.
- Add `aptos update prover-dependencies`, which installs the dependency of Move prover, boogie, z3 and cvc5.
- Update the default version of `movefmt` to be installed from 1.0.4 to 1.0.5

## [4.2.3] - 2024/09/20
- Fix the broken indexer in localnet in 4.2.2, which migrates table info from sycn to async ways.
Expand Down
2 changes: 1 addition & 1 deletion crates/aptos/src/update/movefmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use self_update::update::ReleaseUpdate;
use std::path::PathBuf;

const FORMATTER_BINARY_NAME: &str = "movefmt";
const TARGET_FORMATTER_VERSION: &str = "1.0.4";
const TARGET_FORMATTER_VERSION: &str = "1.0.5";

const FORMATTER_EXE_ENV: &str = "FORMATTER_EXE";
#[cfg(target_os = "windows")]
Expand Down
4 changes: 2 additions & 2 deletions crates/aptos/src/update/prover_dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ impl ProverDependencyInstaller {
set_env::set(env_var, install_path.to_string_lossy())
.map_err(|e| CliError::UnexpectedError(format!("Failed to set {}: {}", env_var, e)))?;
println!(
"Added {} to environment with value: {}.",
"Added {} to environment with value: {} to the profile.",
env_var,
install_path.to_string_lossy()
);
if env::var(env_var).is_err() {
println!("Please use the `source` command or reboot the terminal to check whether {} is set with the correct value. \
eprintln!("Please use the `source` command or reboot the terminal to check whether {} is set with the correct value. \
If not, please set it manually.", env_var);
}
Ok(())
Expand Down
10 changes: 9 additions & 1 deletion crates/aptos/src/update/prover_dependency_installer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,28 @@ use std::path::PathBuf;
/// Update Prover dependency.
#[derive(Debug)]
pub struct DependencyInstaller {
/// Binary name, such as `boogie` or `z3`
pub binary_name: String,

/// Actual executable name such as `boogie.exe` in Windows
pub exe_name: String,

/// Environment variable to be updated
pub env_var: String,

/// The string output by the tool before the version
pub version_match_string: String,

/// The option string to be passed to the command such as "/" or "--"
pub version_option_string: String,

/// The version to be installed
pub target_version: String,

/// The directory to install the binary
pub install_dir: Option<PathBuf>,

/// Whether to check availability of a newer version
pub check: bool,
}

Expand Down Expand Up @@ -57,7 +65,7 @@ impl DependencyInstaller {

impl BinaryUpdater for DependencyInstaller {
fn check(&self) -> bool {
false
self.check
}

fn pretty_name(&self) -> String {
Expand Down
11 changes: 1 addition & 10 deletions crates/aptos/src/update/update_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ pub fn build_updater(
let target = format!("{}-{}", arch_str, target);

let install_dir = match install_dir.clone() {
Some(dir) => {
println!("dir:{:?}", dir);
dir
},
Some(dir) => dir,
None => {
let dir = get_additional_binaries_dir();
// Make the directory if it doesn't already exist.
Expand All @@ -66,12 +63,6 @@ pub fn build_updater(
None => "0.0.0",
};

println!(
"install_dir:{:?}, is directory:{}",
install_dir,
install_dir.is_dir()
);

Update::configure()
.bin_install_dir(install_dir)
.bin_name(binary_name)
Expand Down

0 comments on commit 2880eb0

Please sign in to comment.