From 9471ecdcf04a5431074f0ac1a0ef993faf7205ea Mon Sep 17 00:00:00 2001 From: capossele Date: Tue, 7 May 2024 18:03:25 +0100 Subject: [PATCH 1/3] skip build --- .vscode/settings.json | 5 ++++- methods/build.rs | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 6e354a22..71813c5e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,8 @@ "./apps/Cargo.toml", "./methods/Cargo.toml", "./methods/guest/Cargo.toml", - ] + ], + "rust-analyzer.check.extraEnv": { + "RISC0_SKIP_BUILD": "1", + } } \ No newline at end of file diff --git a/methods/build.rs b/methods/build.rs index 11130e59..d9274cd8 100644 --- a/methods/build.rs +++ b/methods/build.rs @@ -37,6 +37,11 @@ fn main() { }, )])); + // Skip Solidity source files generation if RISC0_SKIP_BUILD is enabled. + if env::var("RISC0_SKIP_BUILD").is_ok() { + return; + } + // Generate Solidity source files for use with Forge. let solidity_opts = risc0_build_ethereum::Options::default() .with_image_id_sol_path(SOLIDITY_IMAGE_ID_PATH) From 3b498d11a55354723e1a6778c6be5384c861ba6a Mon Sep 17 00:00:00 2001 From: capossele Date: Wed, 15 May 2024 11:54:01 +0100 Subject: [PATCH 2/3] drop check --- methods/build.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/methods/build.rs b/methods/build.rs index d9274cd8..76bdcdcb 100644 --- a/methods/build.rs +++ b/methods/build.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::{collections::HashMap, env}; +use std::collections::HashMap; use risc0_build::{embed_methods_with_options, DockerOptions, GuestOptions}; use risc0_build_ethereum::generate_solidity_files; @@ -37,11 +37,6 @@ fn main() { }, )])); - // Skip Solidity source files generation if RISC0_SKIP_BUILD is enabled. - if env::var("RISC0_SKIP_BUILD").is_ok() { - return; - } - // Generate Solidity source files for use with Forge. let solidity_opts = risc0_build_ethereum::Options::default() .with_image_id_sol_path(SOLIDITY_IMAGE_ID_PATH) From 4aa23473d3a75c528533646b1a0be0e53405b28a Mon Sep 17 00:00:00 2001 From: capossele Date: Thu, 16 May 2024 18:03:18 +0100 Subject: [PATCH 3/3] fix env import --- methods/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/methods/build.rs b/methods/build.rs index 76bdcdcb..11130e59 100644 --- a/methods/build.rs +++ b/methods/build.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::HashMap; +use std::{collections::HashMap, env}; use risc0_build::{embed_methods_with_options, DockerOptions, GuestOptions}; use risc0_build_ethereum::generate_solidity_files;