chore: update to xtask v5 (#5404)

This commit is contained in:
Sylvain Benner
2026-08-21 07:33:54 -04:00
committed by GitHub
parent dbf3e740c8
commit 498710ba13
7 changed files with 82 additions and 228 deletions
Generated
+36 -200
View File
@@ -204,9 +204,6 @@ name = "arbitrary"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
dependencies = [
"derive_arbitrary",
]
[[package]]
name = "arc-swap"
@@ -752,7 +749,7 @@ version = "3.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dee98b0db6a962de883bf5d20362dee4d7ca0d12fe39a7c6c73c844e1cd7c1f"
dependencies = [
"darling 0.20.11",
"darling 0.23.0",
"ident_case",
"prettyplease 0.2.37",
"proc-macro2",
@@ -1313,7 +1310,7 @@ dependencies = [
"divan",
"half",
"hashbrown 0.16.1",
"lzma-rust2 0.16.5",
"lzma-rust2",
"memmap2",
"num-traits",
"regex",
@@ -1912,12 +1909,6 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "constant_time_eq"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
[[package]]
name = "constant_time_eq"
version = "0.4.2"
@@ -2037,21 +2028,6 @@ dependencies = [
"libc",
]
[[package]]
name = "crc"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d"
dependencies = [
"crc-catalog",
]
[[package]]
name = "crc-catalog"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853"
[[package]]
name = "crc32fast"
version = "1.5.0"
@@ -2220,17 +2196,6 @@ dependencies = [
"cipher 0.4.4",
]
[[package]]
name = "ctrlc"
version = "3.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162"
dependencies = [
"dispatch2",
"nix 0.31.3",
"windows-sys 0.61.2",
]
[[package]]
name = "ctutils"
version = "0.4.2"
@@ -2411,7 +2376,7 @@ dependencies = [
"serde_bytes",
"serde_json",
"spin 0.12.2",
"toml 1.1.3+spec-1.1.0",
"toml",
"tracing",
"wasm-bindgen-futures",
"web-time",
@@ -2556,7 +2521,7 @@ dependencies = [
"serde",
"serde_json",
"thiserror 2.0.19",
"toml 1.1.3+spec-1.1.0",
"toml",
"tracing",
"wasm-bindgen-futures",
]
@@ -3174,17 +3139,6 @@ dependencies = [
"syn 2.0.119",
]
[[package]]
name = "derive_arbitrary"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.119",
]
[[package]]
name = "derive_builder"
version = "0.20.2"
@@ -4032,15 +3986,6 @@ dependencies = [
"slab",
]
[[package]]
name = "fuzzy-matcher"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94"
dependencies = [
"thread_local",
]
[[package]]
name = "gemm"
version = "0.19.0"
@@ -4473,10 +4418,6 @@ name = "hashbrown"
version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
dependencies = [
"ahash",
"allocator-api2",
]
[[package]]
name = "hashbrown"
@@ -5097,20 +5038,6 @@ dependencies = [
"hybrid-array",
]
[[package]]
name = "inquire"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6654738b8024300cf062d04a1c13c10c8e2cea598ec1c47dc9b6641159429756"
dependencies = [
"bitflags 2.13.1",
"crossterm",
"dyn-clone",
"fuzzy-matcher",
"unicode-segmentation",
"unicode-width",
]
[[package]]
name = "instability"
version = "0.3.12"
@@ -5786,16 +5713,6 @@ dependencies = [
"libc",
]
[[package]]
name = "lzma-rust2"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c60a23ffb90d527e23192f1246b14746e2f7f071cb84476dd879071696c18a4a"
dependencies = [
"crc",
"sha2 0.10.9",
]
[[package]]
name = "lzma-rust2"
version = "0.16.5"
@@ -5817,7 +5734,7 @@ version = "1.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0aeb26bf5e836cc1c341c8106051b573f1766dfa05aa87f0b98be5e51b02303"
dependencies = [
"nix 0.29.0",
"nix",
"winapi",
]
@@ -6367,18 +6284,6 @@ dependencies = [
"memoffset",
]
[[package]]
name = "nix"
version = "0.31.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d"
dependencies = [
"bitflags 2.13.1",
"cfg-if",
"cfg_aliases",
"libc",
]
[[package]]
name = "no_std_io2"
version = "0.9.4"
@@ -6974,12 +6879,6 @@ dependencies = [
"num-traits",
]
[[package]]
name = "owo-colors"
version = "4.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d"
[[package]]
name = "p2p-remote-training"
version = "0.22.0-pre.2"
@@ -7090,16 +6989,6 @@ dependencies = [
"sha2 0.10.9",
]
[[package]]
name = "pbkdf2"
version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
dependencies = [
"digest 0.10.7",
"hmac 0.12.1",
]
[[package]]
name = "pbkdf2"
version = "0.13.0"
@@ -7309,7 +7198,7 @@ dependencies = [
"combine",
"downcast-rs",
"dyn-clone",
"hashbrown 0.14.5",
"hashbrown 0.17.1",
"hi_sparse_bitset",
"indexmap",
"inventory",
@@ -7322,7 +7211,7 @@ dependencies = [
"rustc_apfloat",
"slotmap",
"smallvec",
"spin 0.11.1",
"spin 0.12.2",
"thiserror 2.0.19",
"utf8-chars",
]
@@ -10157,7 +10046,7 @@ dependencies = [
"libc",
"log",
"memmem",
"nix 0.29.0",
"nix",
"num-derive",
"num-traits",
"ordered-float",
@@ -10503,20 +10392,6 @@ dependencies = [
"tokio-util",
]
[[package]]
name = "toml"
version = "0.9.12+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"
dependencies = [
"serde_core",
"serde_spanned",
"toml_datetime 0.7.5+spec-1.1.0",
"toml_parser",
"toml_writer",
"winnow 0.7.15",
]
[[package]]
name = "toml"
version = "1.1.3+spec-1.1.0"
@@ -10526,19 +10401,10 @@ dependencies = [
"indexmap",
"serde_core",
"serde_spanned",
"toml_datetime 1.1.1+spec-1.1.0",
"toml_datetime",
"toml_parser",
"toml_writer",
"winnow 1.0.4",
]
[[package]]
name = "toml_datetime"
version = "0.7.5+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"
dependencies = [
"serde_core",
"winnow",
]
[[package]]
@@ -10557,9 +10423,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b"
dependencies = [
"indexmap",
"toml_datetime 1.1.1+spec-1.1.0",
"toml_datetime",
"toml_parser",
"winnow 1.0.4",
"winnow",
]
[[package]]
@@ -10568,7 +10434,7 @@ version = "1.1.2+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526"
dependencies = [
"winnow 1.0.4",
"winnow",
]
[[package]]
@@ -10682,45 +10548,48 @@ dependencies = [
[[package]]
name = "tracel-xtask"
version = "4.15.1"
version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58031a2e8da33f2807d97effead6bf38b73abccec082eb09bf0adab357dd6032"
checksum = "16964a08da1135049102add41c58c1ed5eba186a7f194a05eff0c71d6bb4bed0"
dependencies = [
"anyhow",
"clap",
"ctrlc",
"derive_more",
"dotenvy",
"env_logger",
"home",
"humantime",
"inquire",
"log",
"owo-colors",
"rand 0.9.5",
"regex",
"serde",
"serde_json",
"strum 0.27.2",
"time",
"toml 0.9.12+spec-1.1.0",
"tracel-xtask-macros",
"tracel-xtask-utils",
"ureq 3.3.0",
"zip 6.0.0",
]
[[package]]
name = "tracel-xtask-macros"
version = "4.15.1"
version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6e019e77107aac569cead075b5710996898ec8b4633a4a4be52a59eac5b0960"
checksum = "bb43f2ea1072f0f70d92ddfbbc26165950b81b352aa3100992ffa8a90f4e9239"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.119",
]
[[package]]
name = "tracel-xtask-utils"
version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28e80517bc7457139a1d126b03439f4670fffb377206ea7add65233aa4f91a9b"
dependencies = [
"anyhow",
"clap",
"dotenvy",
"env_logger",
"log",
"rand 0.9.5",
"regex",
"serde_json",
"strum 0.27.2",
]
[[package]]
name = "tracing"
version = "0.1.44"
@@ -12066,12 +11935,6 @@ version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
[[package]]
name = "winnow"
version = "0.7.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
[[package]]
name = "winnow"
version = "1.0.4"
@@ -12324,33 +12187,6 @@ dependencies = [
"zstd 0.11.2+zstd.1.5.2",
]
[[package]]
name = "zip"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b"
dependencies = [
"aes 0.8.4",
"arbitrary",
"bzip2 0.6.1",
"constant_time_eq 0.3.1",
"crc32fast",
"deflate64",
"flate2",
"getrandom 0.3.4",
"hmac 0.12.1",
"indexmap",
"lzma-rust2 0.13.0",
"memchr",
"pbkdf2 0.12.2",
"ppmd-rust",
"sha1 0.10.7",
"time",
"zeroize",
"zopfli",
"zstd 0.13.3",
]
[[package]]
name = "zip"
version = "8.6.0"
@@ -12366,7 +12202,7 @@ dependencies = [
"getrandom 0.4.3",
"hmac 0.13.0",
"indexmap",
"lzma-rust2 0.16.5",
"lzma-rust2",
"memchr",
"pbkdf2 0.13.0",
"ppmd-rust",
+1 -1
View File
@@ -14,7 +14,7 @@ log = { workspace = true }
strum = { workspace = true }
cargo_metadata = "0.23.1"
tracel-xtask = "=4.15.1"
tracel-xtask = { version = "=5.0.0", features = ["bump", "check", "compile", "coverage", "doc", "dependencies", "fix", "publish", "vulnerabilities", "build", "test", "validate", "utils-helpers", "utils-time"] }
# ### For local development. ###
# tracel-xtask = { path = "../xtask/crates/tracel-xtask", default-features = false }
+3 -3
View File
@@ -45,7 +45,7 @@ pub(crate) fn handle_command(
"--cfg portable_atomic_unsafe_assume_single_core",
);
}
helpers::custom_crates_build(
build_helpers::custom_crates_build(
crates,
build_args.clone(),
Some(env_vars.clone()),
@@ -71,7 +71,7 @@ pub(crate) fn handle_command(
&& v != "burn-capture"
});
helpers::custom_crates_build(
build_helpers::custom_crates_build(
crates,
build_args,
None,
@@ -100,7 +100,7 @@ pub(crate) fn handle_command(
base_commands::build::handle_command(args.try_into().unwrap(), env, context)?;
// Specific additional commands to test specific features
// burn-dataset
helpers::custom_crates_build(
build_helpers::custom_crates_build(
vec!["burn-dataset"],
vec!["--all-features"],
None,
+1 -1
View File
@@ -28,7 +28,7 @@ pub(crate) fn handle_command(
// Specific additional commands to build other docs
if args.get_command() == DocSubCommand::Build {
// burn-dataset
helpers::custom_crates_doc_build(
build_helpers::custom_crates_doc_build(
vec!["burn-dataset"],
vec!["--all-features"],
None,
+11 -11
View File
@@ -95,7 +95,7 @@ pub(crate) fn handle_backend_tests(
let mut fusion_args = test_args.clone();
fusion_args.extend(["--features", "fusion"]);
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
vec!["burn-backend-tests"],
handle_test_args(&fusion_args, args.release),
None,
@@ -106,7 +106,7 @@ pub(crate) fn handle_backend_tests(
}
// base_commands::test::handle_command(args, env, context)
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
vec!["burn-backend-tests"],
handle_test_args(&test_args, args.release),
None,
@@ -203,7 +203,7 @@ pub(crate) fn handle_command(
if *test_target != "Default" {
test_args.extend(vec!["--target", *test_target]);
}
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
no_std_test_crates.clone(),
handle_test_args(&test_args, args.release),
None,
@@ -371,7 +371,7 @@ pub(crate) fn handle_command(
CiTestType::Crates => {
// Capture is intentionally opt-in, so workspace-default tests don't compile
// the dispatch, tensor, core, or facade integration tests that exercise it.
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
vec!["burn-dispatch", "burn-tensor", "burn-core", "burn"],
handle_test_args(&["--features", "capture"], args.release),
None,
@@ -380,7 +380,7 @@ pub(crate) fn handle_command(
)?;
// burn-dataset
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
vec!["burn-dataset"],
handle_test_args(&["--all-features"], args.release),
None,
@@ -390,7 +390,7 @@ pub(crate) fn handle_command(
// burn-core
set_burn_device("tch"); // test-tch
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
vec!["burn-core"],
handle_test_args(&["--features", "tch"], args.release),
None,
@@ -405,7 +405,7 @@ pub(crate) fn handle_command(
// }
// burn-vision
set_burn_device("flex");
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
vec!["burn-vision"],
handle_test_args(&["--features", "flex", "loss"], args.release),
None,
@@ -414,7 +414,7 @@ pub(crate) fn handle_command(
)?;
// burn-train vision (LPIPS, DISTS metrics)
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
vec!["burn-train"],
handle_test_args(&["--features", "vision"], args.release),
None,
@@ -426,7 +426,7 @@ pub(crate) fn handle_command(
CiTestType::GcpVulkanRunner | CiTestType::GcpWgpuRunner => (), // handled in tests above
CiTestType::GithubMacRunner => {
// burn-ndarray
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
vec!["burn-ndarray"],
handle_test_args(&["--features", "blas-accelerate"], args.release),
None,
@@ -435,14 +435,14 @@ pub(crate) fn handle_command(
)?;
set_burn_device("metal");
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
vec!["burn-core"],
handle_test_args(&["--features", "metal"], args.release),
None,
None,
"std metal",
)?;
helpers::custom_crates_tests(
build_helpers::custom_crates_tests(
vec!["burn-vision"],
handle_test_args(&["--features", "metal"], args.release),
None,
+1 -1
View File
@@ -59,7 +59,7 @@ pub fn handle_command(
no_capture: false,
release: true,
test: None,
miri: false,
miri: None,
},
args.backend,
Context::Std,
+29 -11
View File
@@ -22,18 +22,17 @@ const NO_STD_CRATES: &[&str] = &[
"burn-no-std-tests",
];
#[macros::base_commands(
Bump,
Check,
Compile,
Coverage,
Doc,
Dependencies,
Fix,
Publish,
Vulnerabilities
)]
#[derive(clap::Subcommand, strum::Display)]
pub enum Command {
Bump(BumpCmdArgs),
Check(CheckCmdArgs),
Compile(CompileCmdArgs),
Coverage(CoverageCmdArgs),
Dependencies(DependenciesCmdArgs),
Doc(DocCmdArgs),
Fix(FixCmdArgs),
Publish(PublishCmdArgs),
Vulnerabilities(VulnerabilitiesCmdArgs),
/// Run commands to manage Burn Books.
Books(commands::books::BooksArgs),
/// Build Burn in different modes.
@@ -47,6 +46,25 @@ pub enum Command {
Validate(commands::validate::BurnValidateCmdArgs),
}
fn dispatch_base_commands(args: XtaskArgs<Command>, env: Environment) -> anyhow::Result<()> {
match args.command {
Command::Bump(cmd) => base_commands::bump::handle_command(cmd, env, args.context),
Command::Check(cmd) => base_commands::check::handle_command(cmd, env, args.context),
Command::Compile(cmd) => base_commands::compile::handle_command(cmd, env, args.context),
Command::Coverage(cmd) => base_commands::coverage::handle_command(cmd, env, args.context),
Command::Dependencies(cmd) => {
base_commands::dependencies::handle_command(cmd, env, args.context)
}
Command::Doc(cmd) => base_commands::doc::handle_command(cmd, env, args.context),
Command::Fix(cmd) => base_commands::fix::handle_command(cmd, env, args.context, None),
Command::Publish(cmd) => base_commands::publish::handle_command(cmd, env, args.context),
Command::Vulnerabilities(cmd) => {
base_commands::vulnerabilities::handle_command(cmd, env, args.context)
}
_ => Err(anyhow::anyhow!("Unknown command")),
}
}
fn main() -> anyhow::Result<()> {
let start = Instant::now();
let (args, environment) = init_xtask::<Command>(parse_args::<Command>()?)?;