chore(blockifier_test_utils): implement download_cairo_package#5585
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f74a30c to
149d96d
Compare
|
Benchmark movements: |
149d96d to
46d1295
Compare
46d1295 to
f6f5df6
Compare
giladchase
left a comment
There was a problem hiding this comment.
Reviewed 1 of 3 files at r1.
Reviewable status: 1 of 3 files reviewed, all discussions resolved (waiting on @elintul and @noaov1)
crates/blockifier_test_utils/Cargo.toml line 12 at r1 (raw file):
cairo_native = [] [dependencies]
If you want, I think you can Command curl and tar, since we already guarantee through dependencies.sh that the former is installed, and the latter is installed by default.
Motivation: three new deps might be a bit pricey for a test-utils crate (that other crates require during testing), especially if they're single use. Using curl/tar should keep compilation-time unchanged,
|
Benchmark movements: full_committer_flow performance regressed! |
f6f5df6 to
e81d559
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 1 of 3 files reviewed, all discussions resolved (waiting on @elintul and @noaov1)
crates/blockifier_test_utils/Cargo.toml line 12 at r1 (raw file):
Previously, giladchase wrote…
If you want, I think you can Command
curlandtar, since we already guarantee through dependencies.sh that the former is installed, and the latter is installed by default.
Motivation: three new deps might be a bit pricey for a test-utils crate (that other crates require during testing), especially if they're single use. Using curl/tar should keep compilation-time unchanged,
IDK, using rust crates at least looks cleaner; and shouldn't we be writing towards the glorious day when we build a single project and run all tests once, with good caching?
3649dea to
9561130
Compare
e81d559 to
091fd64
Compare
RoeiE-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @elintul, @giladchase, and @noaov1)
crates/blockifier_test_utils/src/cairo_compile.rs line 67 at r4 (raw file):
let filename = "release-x86_64-unknown-linux-musl.tar.gz"; let package_url = format!("https://github.com/starkware-libs/cairo/releases/download/v{version}/{filename}");
As this can be a general function to download artifacts from GH, I think package_url, filename and maybe directory should be input parameters and not constants.
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @elintul, @giladchase, @noaov1, and @RoeiE-starkware)
crates/blockifier_test_utils/src/cairo_compile.rs line 67 at r4 (raw file):
Previously, RoeiE-starkware wrote…
As this can be a general function to download artifacts from GH, I think package_url, filename and maybe directory should be input parameters and not constants.
in this context it is highly specific to cairo packages; only the cairo compiler version should be input.
a "general url" util would be unsafe, no?
where else in our code do we download files via URL? if we have other locations I can share code
giladchase
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @elintul, @noaov1, and @RoeiE-starkware)
crates/blockifier_test_utils/Cargo.toml line 12 at r1 (raw file):
Previously, dorimedini-starkware wrote…
IDK, using rust crates at least looks cleaner; and shouldn't we be writing towards the glorious day when we build a single project and run all tests once, with good caching?
Can you clr this with Lior? AFAIK he's against single-use ext deps, and here each dep is 1/3-use 😅
Also, it's not just about compilation caching, there is also:
- potential for breakage (which does happen on cargo due to semver adherenece)
- linking time: we area already forced to use
llddue to our irregularly inflated dep-tree, we want to minimize the issue and hopefully not have to use this linker anymore (until it's added to stable rust I guess).
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @elintul, @giladchase, @noaov1, and @RoeiE-starkware)
crates/blockifier_test_utils/Cargo.toml line 12 at r1 (raw file):
Previously, giladchase wrote…
Can you clr this with Lior? AFAIK he's against single-use ext deps, and here each dep is 1/3-use 😅
Also, it's not just about compilation caching, there is also:
- potential for breakage (which does happen on cargo due to semver adherenece)
- linking time: we area already forced to use
llddue to our irregularly inflated dep-tree, we want to minimize the issue and hopefully not have to use this linker anymore (until it's added to stable rust I guess).
Lior is in favor of curl + tar, making the change :)
091fd64 to
ca9d63c
Compare
cf514cc to
cacd63d
Compare
giladchase
left a comment
There was a problem hiding this comment.
Reviewed 1 of 3 files at r1, 2 of 2 files at r5.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @elintul, @noaov1, and @RoeiE-starkware)
cacd63d to
d39f64f
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewed 2 of 3 files at r9, 1 of 1 files at r10, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @elintul and @noaov1)
d39f64f to
b6d57b7
Compare
Signed-off-by: Dori Medini <dori@starkware.co>
Signed-off-by: Dori Medini <dori@starkware.co>
b6d57b7 to
be64508
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
Reviewed 2 of 3 files at r12, 1 of 1 files at r13, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @elintul and @noaov1)

No description provided.