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

Fix some incompatibilities in Bazel 0.22.0 #1889

Merged
merged 3 commits into from
Jan 19, 2019

Conversation

jayconrod
Copy link
Contributor

  • go_proto_library now relies on the undocumented ProtoInfo instead of
    the .proto field.
  • go_proto_library now uses to_list() when iterating ProtoInfo
    depsets.
  • A test in tests/core/cgo now uses cc_binary to generate shared
    libraries.

Updates #1888

@jayconrod
Copy link
Contributor Author

jayconrod commented Jan 8, 2019

TODO:

Jay Conrod added 2 commits January 17, 2019 13:14
* go_proto_library now relies on the undocumented ProtoInfo instead of
  the .proto field.
* go_proto_library now uses to_list() when iterating ProtoInfo
  depsets.
* A test in tests/core/cgo now uses cc_binary to generate shared
  libraries.

Updates bazelbuild#1888
@jayconrod
Copy link
Contributor Author

We can't start using CcInfo and ProtoInfo until our minimum version is Bazel 0.22.0 (which is not released yet). Those symbols are resolved eagerly by the Starlark interpreter, so the only way not to use them on older versions is to load .bzl files through a repository rule that dynamically selects which .bzl file to load. rules_go currently loads everything from def.bzl, so this would require splitting workspace definitions and rule definitions into two files, which would be a breaking change for everyone. I think it's better to just keep release branches that work with old / new versions of Bazel.

This PR will be cherry-picked onto older branches, which need to continue supporting older versions of Bazel. Another PR will migrate to CcInfo and ProtoInfo, probably in rules_go 0.18.0 (not the coming release but the one after).

@jayconrod jayconrod merged commit e1da297 into bazelbuild:master Jan 19, 2019
@jayconrod jayconrod deleted the fix-incompatible branch January 19, 2019 21:01
jayconrod added a commit that referenced this pull request Jan 19, 2019
This fixes some compatibility errors for Bazel 0.22.0.

Updates #1888
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