Skip to content

Commit ab3fe5d

Browse files
authored
Use cairo-toolchain-xtasks (#37)
1 parent eb6a1ae commit ab3fe5d

10 files changed

+21
-325
lines changed

.github/workflows/cairo-update-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: |
3333
CAIRO_REV=$(git ls-remote --refs "https://github.com/starkware-libs/cairo" main | awk '{print $1}')
3434
echo "::notice::Checking Cairo commit: https://github.com/starkware-libs/cairo/commit/$CAIRO_REV"
35-
cargo xtask set-cairo-version --rev "$CAIRO_REV"
35+
cargo xtask upgrade cairo --rev "$CAIRO_REV"
3636
3737
- run: cargo test --profile=ci --no-fail-fast
3838

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ We have a script that edits the `Cargo.toml` file to use a local checkout of the
119119
To use this tool, run:
120120

121121
```shell
122-
cargo xtask set-cairo-version --path ../path/to/cairo
122+
cargo xtask upgrade cairo --path ../path/to/cairo
123123
```
124124

125125
And then you can `cargo build` CairoLS with your custom Cairo compiler changes.

Cargo.lock

+14-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ testing = []
2727
# all tools *always* depend on some crates.io versions of Cairo crates and Scarb uses
2828
# [patch.crates.io] table to set final git revision for everything.
2929
#
30-
# To keep our Cargo.toml following this contract, always use `cargo xtask set-cairo-version`
30+
# To keep our Cargo.toml following this contract, always use `cargo xtask upgrade`
3131
# for manipulating these dependencies.
3232
[dependencies]
3333
anyhow = "1"

xtask/Cargo.toml

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ edition = "2021"
55

66
[dependencies]
77
anyhow = "1"
8+
cairo-toolchain-xtasks = "1"
89
clap = { version = "4.5", features = ["derive"] }
9-
semver = "1"
10-
toml_edit = "0.22.22"
11-
xshell = "0.2.7"

xtask/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ macro_rules! command {
2121
}
2222
}
2323

24-
command!(Command(set_cairo_version, set_version,));
24+
command!(Command(sync_version, upgrade,));
2525

2626
#[derive(Parser)]
2727
struct Args {

xtask/src/set_cairo_version.rs

-244
This file was deleted.

xtask/src/set_version.rs

-71
This file was deleted.

xtask/src/sync_version.rs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub use cairo_toolchain_xtasks::sync_version::{Args, main};

xtask/src/upgrade.rs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub use cairo_toolchain_xtasks::upgrade::{Args, main};

0 commit comments

Comments
 (0)