Skip to content

Cherry-pick proto_lang_toolchain Starlarkfication and proto_common module#15854

Merged
ckolli5 merged 26 commits intobazelbuild:release-5.3.0from
comius:cherry-pick-proto_lang_toolchain
Jul 14, 2022
Merged

Cherry-pick proto_lang_toolchain Starlarkfication and proto_common module#15854
ckolli5 merged 26 commits intobazelbuild:release-5.3.0from
comius:cherry-pick-proto_lang_toolchain

Conversation

@comius
Copy link
Copy Markdown
Contributor

@comius comius commented Jul 11, 2022

Externally visible changes:

  • proto_common_do_not_use module is exposed with implementation matching Bazel@HEAD
  • proto_lang_toolchain rule is extended with plugin_format_flag, progress_message, mnemonic, protocol_compiler attributes
  • proto_lang_toolchain rules doesn't accept $(PLUGIN_OUT) placeholder (there are no uses on github)
  • all fields in ProtoLangToolchainInfo are accessible in Starlark and the provider can be constructed
  • ctx.actions.run and ctx.actions.run_shell accept resource_set parameter

Other invisible changes:

  • proto_lang_toolchain rule is replaced with Starlark implementation
  • ProtoLangToolchainInfo is implemented in Starlark
  • Tests covering proto_common, proto_lang_toolchain rules are imported.
  • Tests covering resource_set parameter

What's not changed:

  • implementation of any other rules: proto_library, *_proto_library.

Cherry-picks for "Starlarkify proto_lang_toolchain rule":

  • bb2e0ae Put protoc label to a constant.
  • d69a55c Remove proto_lang_toolchain rule's $(PLUGIN_OUT) placeholder and simplify ProtoCompileActionBuilder.
  • 45ce3dd Add plugin_format_flag attribute to ProtoLangToolchainRule
  • 66e29cd Proxy proto compiler and proto opts over proto_lang_toolchain rule.
  • b4587f8 Extend proto_lang_toolchain rule with progress_message and mnemonic attributes.
  • 1e9a5de Starlarkify proto_lang_toolchain and ProtoLangToolchainInfo provider
  • cbdb60c Roll forward of ae349e9: Export ProtoLangToolchainInfo provider and flip proto_lang_toolchain rule
  • 8528661 Use data from transitive_proto_sources instead of transitive_sources in proto_lang_toolchain.
  • 1d6ebeb Remove allow_files from proto_lang_toolchain's attributes
  • eb251ca Remove native implementation of proto_lang_toolchain rule
  • 8950863 Fix name in proto_lang_toolchain rule
  • Cherry-pick missing things: ProtoCommon.checkPrivateStarlarkificationAllowlist and Starlark annotations in ProtoInfo and ProtoSource (mostly from 2a44dbd Implement proto_common.write_descriptor_set in Starlark.)

Cherry-picks for "Implement proto_common":

  • 56d624b Separate ExecException.java from main actions target.
  • d7f0724 ResourceSet in StarlarkAction API
    • Needed by proto_common.compile
  • 982bbce Implement and expose proto_common.compile call.
  • Fix ProtoCommon tests: some tests were disabled, because they cover bugs that were fixed during proto_library Starlarkificiation
  • d7a3836 Add experimental_progress_message parameter to proto_common.compile.
  • cf7ebef Implement proto_common.experimental_should_generate_code.
  • e45fb7a Implement proto_common.declare_generated_files.
  • bc1d31c Fix docstring in proto_common
  • 4b7734c Add proto_info parameter to proto_common.compile
  • 5aafdef Migrate proto_library_target to proto_info in proto_common.declare_generated_files.
  • 1941e2b Migrate proto_library_target to proto_info in proto_common.experimental_should_generate_code
  • caddaf1 Remove proto_library_target from proto_common

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants