-
Notifications
You must be signed in to change notification settings - Fork 4k
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
test_suite visibility not checked by test
or aquery
commands
#14053
Comments
@juliexxia for vis |
I'm not surprised that cquery would fail for visibility reasons while query works -- cquery does analysis (where visibility is enforced) while query does not. Not sure why aquery wouldn't be affected. I'm more surprised that I don't think this is a bug so much as an inconsistency in the |
test
or aquery
commands
I don't think it's just magic in the |
It feels to me like changing this behavior to enforce visibility is likely to be a rather disruptive breaking change. Might I suggest we change the behavior of Maybe it'd make sense to remedy the situation in a major version with a proper deprecation cycle. |
I think this is exactly what happens.
What about adding I agree enforcing new visibility is a huge disruptive pain (ahem: #12933). But I'd also want to avoid reducing current instances of visibility enforcement. Especially if I'l add a |
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 603682746
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. PiperOrigin-RevId: 604133066
to enable aspect based analysis from other packages. `bazel test` and `bazel build` do not require tests to be visible to test suites they are included in. However, running any analyses on test suites require this visibility. Documented at: bazelbuild/bazel#14053 Also, make tests visible directly to the packages that will host targets to validate test dependencies. This is needed as not all tests are included in test suites. (cherry picked from commit d849524)
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale. |
Description of the problem / feature request:
bazel cquery
of atest_suite
target fails when the constituent tests have not explicitly declared their visibility to that target.This is unexpected because
bazel test
of that sametest_suite
target will run the tests without any complaints about visibility.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I created a simple bazel project with the following contents:
Here,
bazel test //d3:d3
works just fine, butbazel cquery //d3:d3
bails out:What operating system are you running Bazel on?
Ubuntu 20.04
What's the output of
bazel info release
?release 4.2.1
release 5.0.0-pre.20210921.1
Have you found anything relevant by searching the web?
no
Any other information, logs, or outputs that you want to share?
I confirmed the unexpected behavior with both 4.2.1 and 5.0.0-pre.20210921.1.
Neither
query
noraquery
were similarly strict.It is possible to work around this by declaring visibilities on the tests
participating in the
test_suite
. But since this was not needed forbazel test
, I did not expect to need to do this forbazel cquery
.The text was updated successfully, but these errors were encountered: