From 5684d744de99f7b8631c160f9e76b7c6944444bd Mon Sep 17 00:00:00 2001 From: stranger80 Date: Mon, 2 Sep 2024 20:16:37 +0200 Subject: [PATCH 1/5] Update Cargo.toml - Update Scarb references to 2.8.1 --- Cargo.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 12ba3e631..2e9c78c57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,12 +24,12 @@ glob = "0.3.0" cairo-felt = "0.8.2" # Cairo runner dependencies -cairo-lang-test-runner = "2.6.3" -cairo-lang-test-plugin = "2.6.3" -cairo-lang-runner = "2.6.3" -cairo-lang-sierra = "2.6.3" -scarb = { git = "https://github.com/software-mansion/scarb", tag = "v2.6.3" } -scarb-ui = { git = "https://github.com/software-mansion/scarb", tag = "v2.6.3" } +cairo-lang-test-runner = "2.8.0" +cairo-lang-test-plugin = "2.8.0" +cairo-lang-runner = "2.8.0" +cairo-lang-sierra = "2.8.0" +scarb = { git = "https://github.com/software-mansion/scarb", tag = "v2.8.1" } +scarb-ui = { git = "https://github.com/software-mansion/scarb", tag = "v2.8.1" } anyhow = "1.0.66" ark-ff = "0.4.0-alpha.7" From 3b8f855ab0f2b997ac0b2008f3372acdd8e33076 Mon Sep 17 00:00:00 2001 From: stranger80 Date: Mon, 2 Sep 2024 20:17:32 +0200 Subject: [PATCH 2/5] Update scarb.rs - naive updates to adhere to changes in Scarb code base --- src/scarb.rs | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/src/scarb.rs b/src/scarb.rs index 20a0bdfa6..a85f64269 100644 --- a/src/scarb.rs +++ b/src/scarb.rs @@ -10,7 +10,7 @@ use std::{env::current_dir, fs, path::PathBuf}; use itertools::Itertools; use scarb::{ core::{Config, TargetKind}, - ops::{self, collect_metadata, CompileOpts, MetadataOptions}, + ops::{self, collect_metadata, CompileOpts, MetadataOptions, FeaturesOpts, FeaturesSelector}, }; const AVAILABLE_GAS: usize = 999999999; @@ -64,6 +64,10 @@ pub fn scarb_run(file_path: &PathBuf) -> anyhow::Result { &MetadataOptions { version: 1, no_deps: false, + features: FeaturesOpts { + features: FeaturesSelector::AllFeatures, + no_default_features: false, + }, }, &ws, )?; @@ -150,6 +154,10 @@ pub fn scarb_test(file_path: &PathBuf) -> anyhow::Result { &MetadataOptions { version: 1, no_deps: false, + features: FeaturesOpts { + features: FeaturesSelector::AllFeatures, + no_default_features: false, + }, }, &ws, ) @@ -188,6 +196,8 @@ pub fn scarb_test(file_path: &PathBuf) -> anyhow::Result { include_ignored: false, ignored: false, run_profiler: RunProfilerConfig::None, + gas_enabled: false, + print_resource_usage: false, }; let runner = CompiledTestRunner::new(test_compilation, config); runner.run(None)?; @@ -210,12 +220,22 @@ pub fn compile(config: &Config, test_targets: bool) -> anyhow::Result<()> { let ws = ops::read_workspace(config.manifest_path(), config)?; let opts: CompileOpts = match test_targets { false => CompileOpts { - include_targets: vec![], - exclude_targets: vec![TargetKind::TEST], + include_target_names: vec![], + include_target_kinds: vec![], + exclude_target_kinds: vec![TargetKind::TEST], + features: FeaturesOpts { + features: FeaturesSelector::AllFeatures, + no_default_features: false, + } }, true => CompileOpts { - include_targets: vec![TargetKind::TEST], - exclude_targets: vec![], + include_target_names: vec![], + include_target_kinds: vec![TargetKind::TEST], + exclude_target_kinds: vec![], + features: FeaturesOpts { + features: FeaturesSelector::AllFeatures, + no_default_features: false, + } }, }; From 0ef2b491b2ebc4515e70122b2c463b38e7c6efee Mon Sep 17 00:00:00 2001 From: stranger80 Date: Thu, 5 Sep 2024 15:54:26 +0200 Subject: [PATCH 3/5] Update rust.yml - Upgrade to Rust 1.80.0 --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4b893fe7c..f35d5f5c6 100755 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,8 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Setup Rust v1.76 - run: rustup default 1.76 + - name: Setup Rust v1.80.0 + run: rustup default 1.80.0 - name: Build run: cargo build --verbose - name: Run tests From 82b24a68c2094831431d91e1e7fcb46231df8219 Mon Sep 17 00:00:00 2001 From: stranger80 Date: Thu, 5 Sep 2024 17:28:57 +0200 Subject: [PATCH 4/5] Update rust.yml - Rust 1.80.1 --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f35d5f5c6..8b95327a7 100755 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,8 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Setup Rust v1.80.0 - run: rustup default 1.80.0 + - name: Setup Rust v1.80.1 + run: rustup default 1.80.1 - name: Build run: cargo build --verbose - name: Run tests From a85330a880a8051477866e3931df1436a19f1f77 Mon Sep 17 00:00:00 2001 From: stranger80 Date: Thu, 5 Sep 2024 17:30:50 +0200 Subject: [PATCH 5/5] Update rust.yml - add cargo update step --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8b95327a7..5041907f3 100755 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,7 +16,8 @@ jobs: - uses: actions/checkout@v3 - name: Setup Rust v1.80.1 run: rustup default 1.80.1 + - name: Update dependencies - name: Build - run: cargo build --verbose + run: cargo update - name: Run tests run: cargo test --verbose