bazel-contrib / rules_go

Go rules for Bazel
Apache License 2.0
1.38k stars 656 forks source link

Various starlark cleanups #4010

Closed DavidZbarsky-at closed 1 month ago

DavidZbarsky-at commented 2 months ago

What type of PR is this? > Other

What does this PR do? Why is it needed? Cleans up various Stalark inefficiencies. This saves around .5s analysis time in our repo, which does not have too much Go code yet. It is likely more noticeable in repos that have more go code

Which issues(s) does this PR fix?

Fixes #

Other notes for review

google-cla[bot] commented 2 months ago

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

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

DavidZbarsky-at commented 2 months ago

Added another commit from testing in @jbedard's private repo; Before:

image

After:

image
dzbarsky commented 2 months ago

I'm going to break this up into multiple PRs, starting with https://github.com/bazelbuild/rules_go/pull/4014