-
Notifications
You must be signed in to change notification settings - Fork 227
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
Non-public bazel visibility for parser/gen #947
Comments
@RamLavi You shouldn't have any direct dependencies on |
Hey thanks for the prompt reply!
It is indeed a mystery to me, my import is only in order to implement an object that complies to the
i think the |
The |
ACK. I will try to dig some more on bazel logs and see if there's a clue why it happens and how we can work around it. Is that OK if we keep this issue open until we have more information? |
currently fails with bazel visibility error, see issue google/cel-go#947 tests need more scenarios to fit all validation rules but the gist is done. in order to run test with visibility check excluded: ``` hack/dockerized bazel test --test_output=errors --cache_test_results=no --check_visibility=false //pkg/virt-operator/... ``` Signed-off-by: Ram Lavi <ralavi@redhat.com>
@RamLavi totally fine to keep the issue open until we know more. My best guess is that the visibility isn't happy with being moved to a new directory. From what I understand, this can be fixed at the tooling layer with annotations in BUILD files, but it's not a very friendly user experience either way |
currently fails with bazel visibility error, see issue google/cel-go#947 tests need more scenarios to fit all validation rules but the gist is done. in order to run test with visibility check excluded: ``` hack/dockerized bazel test --test_output=errors --cache_test_results=no --check_visibility=false //pkg/virt-operator/... ``` Signed-off-by: Ram Lavi <ralavi@redhat.com>
currently fails with bazel visibility error, see issue google/cel-go#947 in order to run test with visibility check excluded: ``` hack/dockerized bazel test --test_output=errors --cache_test_results=no --check_visibility=false //pkg/virt-operator/... ``` Signed-off-by: Ram Lavi <ralavi@redhat.com>
@RamLavi any progress to report? |
currently fails with bazel visibility error, see issue google/cel-go#947 in order to run test with visibility check excluded: ``` hack/dockerized bazel test --test_output=errors --cache_test_results=no --check_visibility=false //pkg/virt-operator/... ``` Signed-off-by: Ram Lavi <ralavi@redhat.com>
BAZEL is hard, and not well documented :) I didn't manage to understand how to properly set the label so that it will ignore your library's visibility. |
Hi, I wanted to just emphasise that this library is essentially broken for anyone using Bazel. This bug is not getting a lot of traction because I think the majority of users aren't using Bazel. The first example on this page https://pkg.go.dev/github.com/google/cel-go/cel#pkg-overview is not possible since As far as I understand maintainers don't want to make |
@SlayerBirden bazel dependency graphs aren't supposed to be all set to the same visibility in order to function properly; however, I don't think that the bazel team considered go vendoring. I will poke around to see what the options are, but often such interactions are non-trivial and poorly documented |
@TristonianJones thanks for the update! If you have any suggestion I'd also appreciate that. |
@TristonianJones thanks for looking into this! Can you share if you have any update? |
@RamLavi I'm hopeful the change is as simple as what's been put forward for review. |
currently fails with bazel visibility error, see issue google/cel-go#947 in order to run test with visibility check excluded: ``` hack/dockerized bazel test --test_output=errors --cache_test_results=no --check_visibility=false //pkg/virt-operator/... ``` Signed-off-by: Ram Lavi <ralavi@redhat.com>
Feature request checklist
Change
Please consider changing the parser/gen package's bazel visibility to
//visibility:public
.parser/gen is not an internal package, so go build have no issue building code that uses the package, but parser/gen's BUILD.bazel sets the default_visibility to subpackages.
It looks like the package was made like this in the initial implementation.
The issue is that it causes error when trying to build code that uses parser/gen with bazel/gazelle, because parser/gen is not externally visible:
Example
I'm using this lovely repo in order to unit test ValidatingAdmissionPolicy I'm using.
I'm importing this repo in order to implement the
ExpressionAccessor
interface.Alternatives considered
Not the I know of.
The text was updated successfully, but these errors were encountered: