-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flip default for --incompatible_disallow_empty_glob #37
Comments
The label took my attention and I decided to spend some hours to take a look how much is left. The interesting part is that indeed the first problem is to flip it in Bazel without even caring about the downstream projects. Bazel itself has quite a lot of empty globs. When doing that, one of the dependencies that pop up is upb, it does not compiler with the incompatible flag Regarding bazelbuild/bazel, in this PR I tried to flip the flag bazelbuild/bazel#15327. The most interesting is that some issues appear only when flipping the flag, but not when running the tests wiht --incompatible_disallow_empty_glob. Several could be fixed, just being explicit about allowing empty globs. I created a PR in bazelbuild/bazel#15330 but let's see what the Bazel team will say. In some it is not so clear if it should be allowed or the glob should be removed. |
Update: Bazel CI for the flip is green bazelbuild/bazel#15327 |
Amazing work! |
In rules SIG meeting, this was discussed. This may not be as green as it appears. Please see: https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/1287. May not be able to flip the flag until after Bazel 6.0. |
Yes, see discussion in bazelbuild/bazel#8195 (comment) |
Update: All PRs in Bazel have been merged except the flag flip itself. The remaining part is the downstream projects that are tracked here bazelbuild/bazel#15327 |
@limdor from some discussion in the SIG meeting - is this going to mean that rule implementations and macros will now fail if they use It seems to me this would work better if it were possible to apply only to the |
Some Bazel developer would have to say how feasible that is and what it would require. I'm not aware if there is a way to differentiate between native.glob and a glob appearing in the BUILD file. |
For these cases |
@Wyverald says that it's theoretically possible to make two different |
Ok, assuming that it is possible. Why would we want to have a difference between glob and native.glob? AFAIK this is not happening with any other symbol that the native version is different. Do we have all relevant people in the Bazel team on board with this decision? In the end the rules they would just have to adapt the code to have |
Yeah our discussion was just that it's going to be a long, painful slog to identify all the locations where the |
You are totally right with that and I would like to change the approach. I would propose to all downstream projects to create a PR flipping the flag in the CI and fixing it until the CI is green. With this way we prevent regressions and at least we move forward instead of 2 steps forwards and 1 backwards. |
@alexeagle I would like to come to a SIG rules author meeting to discuss how to proceed. This flag has been there for a long time and as a community we should take a decision if we want to flip it or we just give up and decide that will never be flipped. |
Help to finish bazelbuild/bazel#8195 by finding projects on Bazel CI which need an explicit setting turning this off, then land a PR in Bazel to change the default for new projects.
The text was updated successfully, but these errors were encountered: