Skip to content

Commit

Permalink
Use @rules_python's py_binary over builtin
Browse files Browse the repository at this point in the history
This is to resolve the error
```
util/BUILD.bazel:50:10: in deps attribute of py_binary rule //util:update_filegroups: '@@rules_python~//python/runfiles:runfiles' does not have mandatory providers: 'PyInfo' or 'CcInfo'. Since this rule was created by the macro 'py_binary', the error might have been caused by the macro implementation
```
Observed [on
CI](https://github.com/aherrmann/rules_zig/actions/runs/11571742693/job/32210283098?pr=380#step:3:758)
for [#380](#380) caused by
different identities assigned to the builtin and the @rules_python
`PyInfo` and `CcInfo` providers.
```
$ bazel cquery --output starlark --starlark:expr 'providers(target)' @@rules_python~//python/runfiles:runfiles
{
  "@@rules_python~//python/private:py_info.bzl%PyInfo": struct(...),
  "@@rules_python~//python/private:py_cc_link_params_info.bzl%PyCcLinkParamsInfo": struct(cc_info = struct(..)),
  ...
}
```
  • Loading branch information
aherrmann authored and renovate[bot] committed Nov 1, 2024
1 parent 793a164 commit 6015576
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions util/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test")
load("@rules_multirun//:defs.bzl", "command", "multirun")
load("@rules_python//python:defs.bzl", "py_binary")

buildifier(
name = "buildifier.fix",
Expand Down

0 comments on commit 6015576

Please sign in to comment.