From c622b157f59417f9b26effa7697cd07a948f770a Mon Sep 17 00:00:00 2001 From: howardwu Date: Sun, 28 Jun 2020 19:36:45 -0700 Subject: [PATCH] Cleanup --- compiler/src/constraints/mod.rs | 1 - leo/commands/build.rs | 4 +++- leo/commands/clean.rs | 5 +---- leo/commands/load.rs | 2 +- leo/commands/prove.rs | 2 ++ leo/commands/unload.rs | 2 +- leo/files/proof.rs | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/compiler/src/constraints/mod.rs b/compiler/src/constraints/mod.rs index 2045087aff..42a3ce22f4 100644 --- a/compiler/src/constraints/mod.rs +++ b/compiler/src/constraints/mod.rs @@ -53,7 +53,6 @@ pub fn generate_constraints, CS: Constrai match main.clone() { ConstrainedValue::Function(_circuit_identifier, function) => { let result = resolved_program.enforce_main_function(cs, program_name, function, parameters)?; - log::debug!("{}", result); Ok(result) } _ => Err(CompilerError::NoMainFunction), diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 2e78600a85..4bd745c4d7 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -52,6 +52,8 @@ impl CLI for BuildCommand { return Err(BuildError::MainFileDoesNotExist(package_path.as_os_str().to_owned()).into()); } + log::info!("Compiling..."); + // Create the outputs directory OutputsDirectory::create(&package_path)?; @@ -95,7 +97,7 @@ impl CLI for BuildCommand { // Write the new checksum to the outputs directory checksum_file.write_to(&path, program_checksum)?; - log::info!("Checksum saved ({:?})", path); + log::debug!("Checksum saved ({:?})", path); } log::info!("Compiled program ({:?})", main_file_path); diff --git a/leo/commands/clean.rs b/leo/commands/clean.rs index cd0f620a6c..3c41690019 100644 --- a/leo/commands/clean.rs +++ b/leo/commands/clean.rs @@ -1,7 +1,6 @@ use crate::{ cli::*, cli_types::*, - commands::BuildCommand, errors::CLIError, files::{ChecksumFile, Manifest, ProofFile, ProvingKeyFile, VerificationKeyFile}, }; @@ -29,9 +28,7 @@ impl CLI for CleanCommand { } #[cfg_attr(tarpaulin, skip)] - fn output(options: Self::Options) -> Result { - let (_program, _checksum_differs) = BuildCommand::output(options)?; - + fn output(_options: Self::Options) -> Result { // Get the package name let path = current_dir()?; let package_name = Manifest::try_from(&path)?.get_package_name(); diff --git a/leo/commands/load.rs b/leo/commands/load.rs index 8cef939d0b..8129b98179 100644 --- a/leo/commands/load.rs +++ b/leo/commands/load.rs @@ -30,7 +30,7 @@ impl CLI for LoadCommand { let path = current_dir()?; let _package_name = Manifest::try_from(&path)?.get_package_name(); - log::info!("Unimplemented - `leo deploy`"); + log::info!("Unimplemented - `leo load`"); Ok(()) } diff --git a/leo/commands/prove.rs b/leo/commands/prove.rs index 14d66e450b..9fd9993e22 100644 --- a/leo/commands/prove.rs +++ b/leo/commands/prove.rs @@ -40,6 +40,8 @@ impl CLI for ProveCommand { let path = current_dir()?; let package_name = Manifest::try_from(&path)?.get_package_name(); + log::info!("Proving..."); + // Fetch program inputs here let inputs_string = InputsFile::new(&package_name).read_from(&path)?; program.parse_inputs(&inputs_string)?; diff --git a/leo/commands/unload.rs b/leo/commands/unload.rs index 52fe84b2b0..614506fe55 100644 --- a/leo/commands/unload.rs +++ b/leo/commands/unload.rs @@ -30,7 +30,7 @@ impl CLI for UnloadCommand { let path = current_dir()?; let _package_name = Manifest::try_from(&path)?.get_package_name(); - log::info!("Unimplemented - `leo deploy`"); + log::info!("Unimplemented - `leo unload`"); Ok(()) } diff --git a/leo/files/proof.rs b/leo/files/proof.rs index 75e4f22680..2353699ef8 100644 --- a/leo/files/proof.rs +++ b/leo/files/proof.rs @@ -43,7 +43,7 @@ impl ProofFile { let mut file = File::create(&path)?; file.write_all(proof)?; - log::info!("Proof stored to {:?}", path); + log::info!("Proof stored ({:?})", path); Ok(()) }