From c5796faa2f0bce01125ee4a22f17c83dc6037220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn?= Date: Wed, 8 Jan 2025 23:23:39 -0300 Subject: [PATCH] Detect Missing Libraries no more --- crates/cli/src/opts/build/zksync.rs | 10 ---------- crates/config/src/zksync.rs | 6 ------ .../zksync/compilers/src/compilers/zksolc/settings.rs | 7 ------- 3 files changed, 23 deletions(-) diff --git a/crates/cli/src/opts/build/zksync.rs b/crates/cli/src/opts/build/zksync.rs index 14398a528..1a0cb9d74 100644 --- a/crates/cli/src/opts/build/zksync.rs +++ b/crates/cli/src/opts/build/zksync.rs @@ -82,12 +82,6 @@ pub struct ZkSyncArgs { )] pub fallback_oz: Option, - /// Detect missing libraries, instead of erroring - /// - /// Currently unused - #[clap(long = "zk-detect-missing-libraries")] - pub detect_missing_libraries: bool, - /// Set the LLVM optimization parameter `-O[0 | 1 | 2 | 3 | s | z]`. /// Use `3` for best performance and `z` for minimal size. #[clap( @@ -164,10 +158,6 @@ impl ZkSyncArgs { set_if_some!(self.llvm_options.clone(), zksync.llvm_options); set_if_some!(self.force_evmla, zksync.force_evmla); set_if_some!(self.fallback_oz, zksync.fallback_oz); - set_if_some!( - self.detect_missing_libraries.then_some(true), - zksync.detect_missing_libraries - ); set_if_some!(self.optimizer.then_some(true), zksync.optimizer); set_if_some!( diff --git a/crates/config/src/zksync.rs b/crates/config/src/zksync.rs index 1f501282f..0181bd18f 100644 --- a/crates/config/src/zksync.rs +++ b/crates/config/src/zksync.rs @@ -59,10 +59,6 @@ pub struct ZkSyncConfig { pub force_evmla: bool, pub llvm_options: Vec, - /// Detect missing libraries, instead of erroring - /// - /// Currently unused - pub detect_missing_libraries: bool, /// Enable optimizer for zkSync pub optimizer: bool, @@ -91,7 +87,6 @@ impl Default for ZkSyncConfig { fallback_oz: Default::default(), enable_eravm_extensions: Default::default(), force_evmla: Default::default(), - detect_missing_libraries: Default::default(), llvm_options: Default::default(), optimizer: true, optimizer_mode: '3', @@ -137,7 +132,6 @@ impl ZkSyncConfig { via_ir: Some(via_ir), // Set in project paths. remappings: Vec::new(), - detect_missing_libraries: self.detect_missing_libraries, enable_eravm_extensions: self.enable_eravm_extensions, force_evmla: self.force_evmla, llvm_options: self.llvm_options.clone(), diff --git a/crates/zksync/compilers/src/compilers/zksolc/settings.rs b/crates/zksync/compilers/src/compilers/zksolc/settings.rs index c10cca0c0..e111a4eb8 100644 --- a/crates/zksync/compilers/src/compilers/zksolc/settings.rs +++ b/crates/zksync/compilers/src/compilers/zksolc/settings.rs @@ -109,10 +109,6 @@ pub struct ZkSettings { #[serde(default)] /// Libraries pub libraries: Libraries, - /// Switch to missing deployable libraries detection mode. - /// Contracts are not compiled in this mode, and all compilation artifacts are not included. - #[serde(default, rename = "detectMissingLibraries")] - pub detect_missing_libraries: bool, // zksolc arguments /// A flag indicating whether to enable the system contract compilation mode. /// Whether to enable EraVM extensions. @@ -204,7 +200,6 @@ impl Default for ZkSettings { via_ir: None, libraries: Default::default(), remappings: Default::default(), - detect_missing_libraries: false, enable_eravm_extensions: false, llvm_options: Default::default(), force_evmla: false, @@ -244,7 +239,6 @@ impl CompilerSettings for ZkSolcSettings { optimizer, metadata, libraries, - detect_missing_libraries, enable_eravm_extensions, llvm_options, force_evmla, @@ -262,7 +256,6 @@ impl CompilerSettings for ZkSolcSettings { *optimizer == other.settings.optimizer && *metadata == other.settings.metadata && *libraries == other.settings.libraries && - *detect_missing_libraries == other.settings.detect_missing_libraries && *enable_eravm_extensions == other.settings.enable_eravm_extensions && *llvm_options == other.settings.llvm_options && *force_evmla == other.settings.force_evmla &&