bazel-contrib / bazel-gazelle

Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.19k stars 378 forks source link

revert #1873 #1897

Closed tyler-french closed 1 month ago

tyler-french commented 1 month ago

We need access to rule.Name() as well as rule.Kind() in mapped resolver.

fmeum commented 1 month ago

@jbedard We need to roll this change back as it breaks the public resolver API, which has a legitimate need to access other rule fields. Do you see a way to reland the desired behavior without touching public API?

jbedard commented 1 month ago

I'll look at it again if we must revert it.

Is this actually a publicly documented API though?

tyler-french commented 1 month ago

I'll look at it again if we must revert it.

Is this actually a publicly documented API though?

https://pkg.go.dev/github.com/bazelbuild/bazel-gazelle@v0.38.0/resolve#NewRuleIndex