Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

chore: fetch Cairo1 compiler version from Cargo.toml #1872

Open
wants to merge 3 commits into
base: dori/move-compilation-logic-to-feature-contracts-enum
Choose a base branch
from

Conversation

dorimedini-starkware
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware commented May 6, 2024

This change is Reviewable

@codecov-commenter
Copy link

codecov-commenter commented May 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 77.24%. Comparing base (7fba16f) to head (aed63a4).

Files Patch % Lines
crates/blockifier/src/test_utils/cairo_compile.rs 0.00% 9 Missing ⚠️
Additional details and impacted files
@@                                    Coverage Diff                                    @@
##           dori/move-compilation-logic-to-feature-contracts-enum    #1872      +/-   ##
=========================================================================================
- Coverage                                                  77.32%   77.24%   -0.09%     
=========================================================================================
  Files                                                         61       61              
  Lines                                                       8662     8671       +9     
  Branches                                                    8662     8671       +9     
=========================================================================================
  Hits                                                        6698     6698              
- Misses                                                      1525     1534       +9     
  Partials                                                     439      439              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dorimedini-starkware dorimedini-starkware force-pushed the dori/fetch-compiler-version branch 2 times, most recently from 8ccd959 to 76dcca0 Compare May 6, 2024 18:18
Copy link
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)


crates/blockifier/src/test_utils/cairo_compile.rs line 50 at r2 (raw file):

        DependencyValue::String(version) | DependencyValue::Object { version } => version.clone(),
    }
}

tested manually:

#[rstest]
fn test_manually() {
    assert_eq!("2.6.0", cairo1_compiler_version());
}

Code quote:

pub fn cairo1_compiler_version() -> String {
    let cargo_toml: CargoToml = toml::from_str(include_str!("../../../../Cargo.toml")).unwrap();
    match cargo_toml.workspace.dependencies.cairo_lang_casm {
        DependencyValue::String(version) | DependencyValue::Object { version } => version.clone(),
    }
}

@dorimedini-starkware dorimedini-starkware force-pushed the dori/move-compilation-logic-to-feature-contracts-enum branch from 7150c66 to 7fba16f Compare May 7, 2024 10:17
@dorimedini-starkware dorimedini-starkware force-pushed the dori/move-compilation-logic-to-feature-contracts-enum branch from 7fba16f to 72f5494 Compare May 21, 2024 08:18
gswirski pushed a commit to reilabs/blockifier that referenced this pull request Jun 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants