cool-easter-32542
02/19/2024, 1:16 AMfile(name="f", source="f.txt")
adhoc_tool(
name="tool",
runnable="a:cat",
args=["f.txt"],
execution_dependencies=[":f"],
log_output=True,
)
If that's in b/, then the execution_dependencies field refers to:
• 2.19: b:f
• 2.20: a:f
This is a regression/breakage that may require users to update code, so, if it's a desirable change, we'd preferably not do it without warning/deprecation (although it is experimental, so maybe we decide it's worth it)... but it seems undesirable?
Reproducer:
cd $(mktemp -d)
cat > pants.toml <<EOF
[GLOBAL]
pants_version = "2.20.0a0"
backend_packages = [
"pants.backend.experimental.adhoc",
]
EOF
mkdir -p a b
cat > a/BUILD <<EOF
system_binary(name="cat", binary_name="cat")
EOF
cat > b/BUILD <<EOF
file(name="f", source="f.txt")
adhoc_tool(
name="tool",
runnable="a:cat",
args=["f.txt"],
execution_dependencies=[":f"],
log_output=True,
)
EOF
echo "contents of f.txt here" > b/f.txt
# OKAY: successfully cats the file, and exports
PANTS_VERSION=2.19.0 pants export-codegen b:tool
# BUG: 'ResolveError: The address a:f from the `execution_dependencies` from the target a:cat does not exist.'
pants export-codegen b:tool
Pants version
2.20.0a0
This appears to be be a regression from 2.20.0.dev3 (works like 2.19) to 2.20.0.dev4 (has this new behaviour).
• https://github.com/pantsbuild/pants/releases/tag/release_2.20.0.dev4
• release_2.20.0.dev3...release_2.20.0.dev4
OS
macOS
Additional info
N/A
pantsbuild/pantscool-easter-32542
02/25/2024, 11:21 PM