bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://ij.bazel.build/
Apache License 2.0
757 stars 298 forks source link

Remove hardcoded proto rule name to enable other Go code generators #6428

Open ghorak-happening opened 2 months ago

ghorak-happening commented 2 months ago

Description of the feature request:

Hi,

Bazel plugin for GoLand supports Go source files generated by proto rules by leveraging the go_generated_srcs output of the embedded go_proto_library rule. The same functionality could be used to support any other code generator rule created based on the proto rules blueprints.

There is one place in the codebase where the name of the go_proto_library is hardcoded within the condition, which prevents the usage of the functionality for other code generators. I'm suggesting the change to relax that condition and unlock the possibility to use the functionality with other code generators.

The change is one-liner, so i created the pull request in parallel with this issue.

I've successfully tested the code with the GraphQL code generators.

Which category does this issue belong to?

GoLand

What underlying problem are you trying to solve with this feature?

I'd like to use Bazel plugin for GoLand in the projects that use Go code generator Bazel rules created by using proto rules as a blueprint.

What operating system, Intellij IDE and programming languages are you using? Please provide specific versions.

a) MacOS Sonoma 14.4.1, GoLand 2023.3.4; b) Windows 11, GoLand 2023.3.5 (remote development with JetBrains Gateway 2023.2.1 working on WSL Ubuntu 22.04.3)

Have you found anything relevant by searching the web?

I've checked this commit for the reference.

Any other information, logs, or outputs that you want to share?

No response