Skip to content
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

Fix broken bzl_library build graph #2988

Merged

Conversation

cvarier
Copy link
Contributor

@cvarier cvarier commented Oct 19, 2021

What type of PR is this?

  • Bug fix

What does this PR do? Why is it needed?
Currently, //go/private:context is missing a dep on //go/private/rules:transition, which is necessary in order to load @io_bazel_stardoc//stardoc:stardoc.bzl. This will be used in a subsequent PR for adding targets to generate Stardoc output.

@google-cla
Copy link

google-cla bot commented Oct 19, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Oct 19, 2021
@google-cla
Copy link

google-cla bot commented Oct 19, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@cvarier
Copy link
Contributor Author

cvarier commented Oct 20, 2021

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Oct 20, 2021
@robfig
Copy link
Contributor

robfig commented Oct 20, 2021

Thanks for the fix! Can you also add a command that would have identified this problem to our CI script, to prevent regression?

@alexeagle
Copy link
Contributor

@robfig something would have to evaluate the starlark load statements to detect a missing edge in the graph, and @cvarier and I are working on #2437 which would add such a regression test.

The only alternative I can think of is to introduce a usage of gazelle in this repo to generate the bzl_library targets, and then on CI assert that gazelle finds no changes to make. But that seems hard per https://github.com/bazelbuild/rules_go/blob/master/BUILD.bazel#L40-L42

@robfig robfig merged commit 8509c19 into bazel-contrib:master Oct 20, 2021
@robfig
Copy link
Contributor

robfig commented Oct 20, 2021

OK, thanks!

@cvarier cvarier deleted the fix-broken-bzl_library-graph branch October 27, 2021 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants