In Bazel 8, the singular $(rootpath) expansions require that the target expands to a
single file. The py rules have an unfortunate legacy behavior where their default outputs
are the executable and the main py file, thus causing an error.
To fix, use the plural $(rootpaths), then post-process the space-separated string to get
just the executable portion of it.
Along the way...
Add tests/integration/py_cc_toolchain_registered/bazel-* symlink to Bazel ignore.
This avoids an infinite symlink expansions error and performance issues when those
symlinks exist.
In Bazel 8, the singular
$(rootpath)
expansions require that the target expands to a single file. The py rules have an unfortunate legacy behavior where their default outputs are the executable and the main py file, thus causing an error.To fix, use the plural
$(rootpaths)
, then post-process the space-separated string to get just the executable portion of it.Along the way...
Work towards https://github.com/bazelbuild/rules_python/issues/2378