bazel-contrib / rules_go

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

Cleanup importpath/importmap handling in go_context #4052

Closed dzbarsky closed 2 months ago

dzbarsky commented 2 months ago

What type of PR is this? Starlark cleanup

What does this PR do? Why is it needed? This looks like a 50-100ms speedup from avoiding the array allocation in infer_importpaths and reduced getattr calls. Is getattr slower than direct property access? (If not, we can avoid passing in the values from go_library)

Which issues(s) does this PR fix?

Fixes #

Other notes for review