You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case of python rules, buildifier warns you with the following message: Function "py_binary" is not global anymore and needs to be loaded from "@rules_python//python:defs.bzl".
You can also automatically fix it and will add the following line at the top of your BUILD file. load("@rules_python//python:defs.bzl", "py_binary")
The problem is that before the fix the build is working but after the fix is not working anymore.
Probably is because the rules need to be imported in the WORKSPACE file https://github.com/bazelbuild/rules_python/releases
It would be nice if the fix would also add the required parts in the WORKSPACE file but I can understand that then is modifying a file that is not the active one. The other option would be to add a more explanatory message that guides the user on how to solve it.
Maybe the main question for the buildifier developers is if it is accepted that an automatic fix makes your build stop working.
The text was updated successfully, but these errors were encountered:
Because buildifier does no longer warns about this anymore I do not think that it is worth to keep the issue opened. I will close it to contribute a bit on issue cleanup.
For more information see: bazelbuild/bazel#9006 #923 #952
In case of python rules, buildifier warns you with the following message:
Function "py_binary" is not global anymore and needs to be loaded from "@rules_python//python:defs.bzl".
You can also automatically fix it and will add the following line at the top of your BUILD file.
load("@rules_python//python:defs.bzl", "py_binary")
The problem is that before the fix the build is working but after the fix is not working anymore.
Probably is because the rules need to be imported in the WORKSPACE file
https://github.com/bazelbuild/rules_python/releases
It would be nice if the fix would also add the required parts in the WORKSPACE file but I can understand that then is modifying a file that is not the active one. The other option would be to add a more explanatory message that guides the user on how to solve it.
Maybe the main question for the buildifier developers is if it is accepted that an automatic fix makes your build stop working.
The text was updated successfully, but these errors were encountered: