gentle-spoon-40388
06/23/2025, 1:55 PMrust
backend -- when I run pants tailor ::
, it repeatedly re-adds the targets to the BUILD
files. I couldn't find any reference to this kind of issue on github/google, but I did put together a minimal example to repro (threaded). Am I missing some sort of configuration, or is a caveat with the experimental backend?gentle-spoon-40388
06/23/2025, 1:57 PMmyproject
crate, and then runs pants tailor ::
3 times. Each time it re-detects the myproject
and I end up with targets myproject
, myproject0
, and myproject1
mkdir pants-demo
cd pants-demo
cargo new --lib myproject
cat > pants.toml <<EOF
[GLOBAL]
pants_version = "2.26.1"
# pants_version = "2.28.0dev4"
backend_packages = [
"pants.backend.experimental.rust",
]
EOF
pants tailor ::
pants tailor ::
pants tailor ::
cat myproject/BUILD
Output of the above script (the BUILD
file contents start with rust_package()
):
Creating library `myproject` package
note: see more `Cargo.toml` keys and their definitions at <https://doc.rust-lang.org/cargo/reference/manifest.html>
12:34:16.03 [INFO] Initializing scheduler...
12:34:16.12 [INFO] Scheduler initialized.
Created myproject/BUILD:
- Add rust_package target myproject
Updated myproject/BUILD:
- Add rust_package target myproject0
Updated myproject/BUILD:
- Add rust_package target myproject1
rust_package()
# NOTE: Sources restricted from the default for rust_package due to conflict with
# - myproject:myproject
rust_package(
name="myproject0",
sources=[
"Cargo.toml",
],
)
# NOTE: Sources restricted from the default for rust_package due to conflict with
# - myproject:myproject
rust_package(
name="myproject1",
sources=[
"Cargo.toml",
],
)
happy-kitchen-89482
06/23/2025, 3:06 PMhappy-kitchen-89482
06/23/2025, 3:07 PMhappy-kitchen-89482
06/23/2025, 3:07 PMhappy-kitchen-89482
06/23/2025, 3:07 PMwide-midnight-78598
06/23/2025, 3:36 PMgentle-spoon-40388
06/23/2025, 4:13 PMgorgeous-winter-99296
06/23/2025, 4:15 PMgentle-spoon-40388
06/23/2025, 4:17 PMBUILD
for the whole workspace and uses cargo build
directly? I can probably emulate that for nowhappy-kitchen-89482
06/23/2025, 4:54 PM