Skip to content
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

Replace WKT go_library rules with aliases to //proto/wkt #1498

Merged
merged 1 commit into from
May 14, 2018

Conversation

jayconrod
Copy link
Contributor

There are a significant number of existing rules that depend on WKT
go_library rules directly (for example,
@com_github_golang_protobuf//ptypes/any:go_default_library). Gazelle
resolves now Go imports to @io_bazel_rules_go//proto/wkt, so it's very
easy to end up with conflicting dependencies.

With this change, WKT go_library rules are replaced with aliases
pointing to the equivalent @io_bazel_rules_go//proto/wkt rules.

protoc-gen-go itself depends on descriptor and plugin, so two
bootstrap go_library rules are introduced, visible only to
protoc-gen-go.

Related bazel-contrib/bazel-gazelle#159

There are a significant number of existing rules that depend on WKT
go_library rules directly (for example,
@com_github_golang_protobuf//ptypes/any:go_default_library). Gazelle
resolves now Go imports to @io_bazel_rules_go//proto/wkt, so it's very
easy to end up with conflicting dependencies.

With this change, WKT go_library rules are replaced with aliases
pointing to the equivalent @io_bazel_rules_go//proto/wkt rules.

protoc-gen-go itself depends on descriptor and plugin, so two
bootstrap go_library rules are introduced, visible only to
protoc-gen-go.

Related bazel-contrib/bazel-gazelle#159
@jayconrod jayconrod requested a review from ianthehat May 11, 2018 16:52
@jayconrod jayconrod merged commit ca213b3 into bazel-contrib:master May 14, 2018
@jayconrod jayconrod deleted the alias-wkt-libs branch May 14, 2018 16:50
jayconrod pushed a commit to jayconrod/rules_go that referenced this pull request Jul 3, 2018
jayconrod added a commit that referenced this pull request Jul 3, 2018
…)" (#1582)

* Revert "Replace WKT go_library rules with aliases to //proto/wkt (#1498)"

This reverts commit ca213b3.

* Update legacy example to point to //proto/wkt to avoid conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants