-
Notifications
You must be signed in to change notification settings - Fork 65
chore(blockifier_test_utils,ci): consolidate cairo-lang version and recompile deprecated contracts #5868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b5d836f to
e3030df
Compare
|
Artifacts upload workflows: |
1bbf23b to
9b9ee5f
Compare
e908e85 to
2c846ea
Compare
2c846ea to
389d706
Compare
389d706 to
d157ddd
Compare
TzahiTaub
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 13 of 14 files at r1, all commit messages.
Reviewable status: 13 of 14 files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware)
taplo.toml line 5 at r2 (raw file):
"crates/blockifier/cairo_native/**/*.toml", "crates/native_blockifier/.cargo/config.toml", "sequencer_venv/**/*.toml",
Why should there be a toml in here?
Code quote:
"sequencer_venv/**/*.toml",
TzahiTaub
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 13 of 14 files at r1, all commit messages.
Reviewable status: 13 of 14 files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware)
taplo.toml line 5 at r2 (raw file):
"crates/blockifier/cairo_native/**/*.toml", "crates/native_blockifier/.cargo/config.toml", "sequencer_venv/**/*.toml",
Why should there be a toml in here?
Code quote:
"sequencer_venv/**/*.toml",There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 13 of 14 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @nimrod-starkware)
crates/blockifier_test_utils/src/cairo_compile.rs line 181 at r2 (raw file):
Command::new("sh").arg("-c").arg("pip freeze | grep cairo-lang").output().unwrap().stdout; let cairo_lang_version_untrimmed = String::from_utf8(cairo_lang_version_output).unwrap(); let cairo_lang_version = cairo_lang_version_untrimmed.trim();
If we're here
Suggestion:
let cairo_lang_version = String::from_utf8(cairo_lang_version_output).unwrap().trim();crates/blockifier_test_utils/src/cairo_compile.rs line 189 at r2 (raw file):
panic!("Could not find cairo-lang in {:?}.", *CAIRO0_PIP_REQUIREMENTS_FILE) }) .trim();
I think it's better for the "version" to only hold the version instead of the entire string, something like the suggestion.
And even better to push it into a Semver struct with semver::Version::parse(
The ends_with check below is a bit unclear - with this you can check equality.
Suggestion:
.trim().split("==").nth(1).expect("Missing == in cairo lang version string")d157ddd to
fc26ebe
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 13 of 14 files reviewed, all discussions resolved (waiting on @nimrod-starkware and @TzahiTaub)
taplo.toml line 5 at r2 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
Why should there be a toml in here?
when I remove this line, taplo fails; so, there is, somewhere in the venv. doesn't matter, we can ignore everything in this venv...
crates/blockifier_test_utils/src/cairo_compile.rs line 181 at r2 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
If we're here
nope:
temporary value dropped while borrowed
crates/blockifier_test_utils/src/cairo_compile.rs line 189 at r2 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
I think it's better for the "version" to only hold the version instead of the entire string, something like the suggestion.
And even better to push it into a Semver struct withsemver::Version::parse(
Theends_withcheck below is a bit unclear - with this you can check equality.
the split("==") forces the version to always be equality... which is not actually a bad thing, so ok.
done
…ecompile deprecated contracts
fc26ebe to
cefb40c
Compare
TzahiTaub
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)
crates/blockifier_test_utils/src/cairo_compile.rs line 181 at r2 (raw file):
Previously, dorimedini-starkware wrote…
nope:
temporary value dropped while borrowed
:(

No description provided.