quaint-telephone-89068
02/17/2023, 1:29 AMpants --loop ... :doesnt_exist with any goal, pants will spew ResolveError: The address //:doesnt_exist from CLI arguments does not exist forever.
Any repo will reproduce it, but for the sake of self-contained-ness:
cd $(mktemp -d)
cat > pants.toml <<EOF
[GLOBAL]
pants_version = "2.16.0.dev6"
backend_packages = [
"pants.backend.shell",
]
[anonymous-telemetry]
enabled = false
EOF
touch BUILD
# BUG 1: (root) directory exists, but target doesn't
pants --loop run :doesnt_exist
# BUG 2: directory doesn't exist either
pants --loop run doesnt/exist:target
Output from bug 1:
...
12:25:40.02 [ERROR] 1 Exception encountered:
Engine traceback:
in `export-codegen` goal
in Find targets from input specs
ResolveError: The address //:doesnt_exist from CLI arguments does not exist.
The target name ':doesnt_exist' is not defined in the directory . Did you mean one of these target names?
* :esc_failure
* :esc_success
12:25:40.02 [ERROR] 1 Exception encountered:
Engine traceback:
in `export-codegen` goal
in Find targets from input specs
ResolveError: The address //:doesnt_exist from CLI arguments does not exist.
The target name ':doesnt_exist' is not defined in the directory . Did you mean one of these target names?
* :esc_failure
* :esc_success
...
Output from bug 2:
...
12:27:47.49 [ERROR] 1 Exception encountered:
Engine traceback:
in `export-codegen` goal
in Find targets from input specs
ResolveError: The file or directory 'doesnt/exist' does not exist on disk in the workspace, so the address 'doesnt/exist:target' from CLI arguments cannot be resolved.
12:27:47.50 [ERROR] 1 Exception encountered:
Engine traceback:
in `export-codegen` goal
in Find targets from input specs
ResolveError: The file or directory 'doesnt/exist' does not exist on disk in the workspace, so the address 'doesnt/exist:target' from CLI arguments cannot be resolved.
...
Pants version
2.14.0, 2.16.0.dev6
OS
macOS
Additional info
A similar invalid spec bug: #18277. Other infinite --loop bugs: #16727, #18275.
pantsbuild/pantsuser
02/21/2023, 9:52 PMuser
02/21/2023, 10:43 PM