-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
Create bzl_library entries using gazelle-skylark #2621
Conversation
@aherrmann, I would like to add you as a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments. I'm pretty swamped this week though, so I won't have much time to dedicate this week.
WORKSPACE
Outdated
@@ -89,6 +89,9 @@ bazel_skylib_workspace() | |||
|
|||
http_archive( | |||
name = "bazel_gazelle", | |||
patches = [ | |||
"//third_party:com_google_github_bazel_gazelle-internal-in-their-new-location.patch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to fix upstream issues first instead of maintaining a patch here. I'll add a note to bazel-contrib/bazel-gazelle#803, which is the only reason we have that internal dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a chicken and egg situation. One of these repos will have to go first. I tried creating an alias
in the BUILD
file associated with it, but it turns out load
statements are interpreted outside of the context of BUILD
files... so I think we're stuck unfortunately. I'm happy to merge these in rapid fire though
- commit rules_go with the patch
- update Gazelle to refer to the new version of rules_go
- update rules_go to refer to the new version of Gazelle
@jayconrod, I'm looking through the error output:
Is that the output that you would expect to see if the race were back, or has this ticked something new? Also an interesting data point, I looked up @aherrmann's run only to discover that we have the same set of failures (the complete run). I'm happy to dig into this if it were anything other than a test with the word "race" in it. That usually means "this is something that the maintainer spent a lot of time thinking about... ask me before messing with it". |
@achew22 Thank you for implementing this! I've confirmed that this works for my use-case.
Yes, absolutely. Thank you! |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@aherrmann, I pushed the change listing you as a co-author. Could I have you appease the CLA robot? |
@googlebot I consent. |
@jayconrod what would next steps be here? Do you want to wait more before we make this change or should I clean it up and get it passing on TAP? |
@achew22 Updating to the latest Gazelle broke some tests. I'll do that as soon as I have the time. I tried to do it while updating the dependencies before I apologize for the delay. This is an extremely busy time. I've been trying to get a few features into the Go command before we can flip |
No worries at all. That work is important ecosystems wide and I appreciate you prioritizing it above this. I'll ping you again about this after a small delay. Thanks for all that you do! |
Friendly ping |
I should be able to get to this in a couple days. I was sprinting to get CL 255052 and its prerequisite features merged. Now that it's done, I should have time to work on more things. |
@jayconrod I won't do this on the gerrit because it has such a wide distribution and I don't wanna bother ppl, but I wanted to say, great job! You pour so much of yourself into this and have made it a delightful place to code. Thank you, Jay! |
CLA bot doesn't seem to recognize the co-author email address in the commit as one of @aherrmann's, just FYI. I can't figure out why, though. |
This should be unblocked by #2658. CLA verified manually. |
@jayconrod sorry but pushing broke the CLA again 😦 could I have you poke it one more time? |
@jayconrod I took a look at updating this to the There are a number of places where I think there is a dangling import. For example, in Maybe I'm doing something really silly, but I don't understand how this code works. My rule of thumb is, when something does work but you can't explain how it does it's a good time to ask questions. So, can you help me understand how these imports are working? Is there some kind of Sorry to put the burdeon back onto you, but I'm mighty confused. I'll take another look in the AM, but I wanted to write out my thoughts. Thanks again! |
Labels like Since this PR adds build files in directories that didn't have them, some of those loads will need adjustment. That one will need to be changed to |
3ab5d55
to
e72b0f5
Compare
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Interesting discovery, looks like I was expecting To be the thing that imported Now invokes Which brings in the version of |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
1 similar comment
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good I think.
CI seems to have gone off into the weeds, so I've canceled it and restarted.
CI's remote cache seems to be down. Opened bazelbuild/continuous-integration#1055 for tracking. This is a large enough change that I'd like to wait for CI to be green on all platforms before submitting. |
I couldn't agree more. Thanks for not submitting it. |
Looks like CI is happier with this now. Could you take another look? @jayconrod |
Yep, all clear. Thanks for persevering on this! |
There are a few minor manual modifications that needed to be performed.
For example, some
.bzl
files depend on.bzl
files that are generatedoutside of this repo and do not presently exist.
@bazel_tools
is agreat example of this.
Additionally this effort has revealed that bazel gazelle has an explicit
dependency on the private parts of rules_go in
internal/gazelle_binary.bzl on line 21 where it imports from
go/private:rules/transitions.bzl
which is no longer the path to importfrom once I created the BUILD file in
go/private/rules
.As a temporary fix for this, I'm included a patch that changes that to
point to the new path. I will provide a follow up patch once rules_go
has been released to fix it properly in the gazelle repo and then remove
the patch from rules_go.
Fixed: #2619
Bug: bazelbuild/bazel-skylib#250
Bug: bazel-contrib/bazel-gazelle#803
What type of PR is this?
Feature
What does this PR do? Why is it needed?
Adds a tree of
bzl_library
targets (generated by Gazelle with only small hand modifications for a few places where their deps don't actually exist).Which issues(s) does this PR fix?
Fixes #2619
Other notes for review
This was great feedback for a couple of features that need to be added to the gazelle generator for
bzl_library