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

Second round of cherry-picks for Bazel rules #18341

Closed
wants to merge 11 commits into from
Closed

Commits on Sep 18, 2024

  1. Reapply "Cherry-pick changes related to new Bazel rules"

    This reverts commit 607bfdd.
    haberman committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    2452ab0 View commit details
    Browse the repository at this point in the history
  2. Move cc_proto_library from Bazel repository

    Bazel 6 falls back to native rules, because of ProtoInfo differences.
    Bazel 7 is slightly degraded: Kythe flags don't work, DebugContext is left out from CcInfo and temporary files generated by the C++ compiler (but it's only useful for debugging).
    
    Tests will be submitted in separate PRs.
    
    PiperOrigin-RevId: 674030212
    protobuf-github-bot authored and haberman committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    3747bcd View commit details
    Browse the repository at this point in the history
  3. Move java_{lite_}proto_library from Bazel repository

    Tests will be submitted in separate PRs.
    
    PiperOrigin-RevId: 674321127
    protobuf-github-bot authored and haberman committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    eefeeba View commit details
    Browse the repository at this point in the history
  4. Make C++ proto library work over targets that aren't proto_library

    PiperOrigin-RevId: 674353486
    protobuf-github-bot authored and haberman committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    69e88db View commit details
    Browse the repository at this point in the history
  5. Move ProtoInfo and ProtoLangToolchainInfo from Bazel

    The change is no-op for Bazel < 8, it always falls back to native providers.
    
    When we cherry-pick --incompatible_autoload_externally to older Bazels, ProtoInfo
    can be replaced with Starlark implementation, providing that users set the flag so that there is no second implementation exposed from Bazel.
    
    PiperOrigin-RevId: 674561141
    protobuf-github-bot authored and haberman committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    c433fdd View commit details
    Browse the repository at this point in the history
  6. Support --incompatible_enable_proto_toolchain_resolution

    Move toolchain types into protobuf repo
    Add default registrations for them (building from sources)
    
    PiperOrigin-RevId: 674801639
    protobuf-github-bot authored and haberman committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    33fd9e1 View commit details
    Browse the repository at this point in the history
  7. Remove JavaProtoAspectInfo duplication

    Everything should work without this change, because all references are done to a single definition. But the accidental duplication needs to be removed eventually.
    
    PiperOrigin-RevId: 675211197
    protobuf-github-bot authored and haberman committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    2423d18 View commit details
    Browse the repository at this point in the history
  8. Support building //java with bzlmod

    Create WORKSPACE.bzlmod. Before building with Bzlmod resulted in use of full WORKSPACE.
    Some repos are still there, but the file should eventually be empty.
    
    Add dep to rules_kotlin 1.9.0. This was the first version available on BCR. It pushed upgrade of
    rules_jvm_external to 6.0 and rules_java to 6.5.2 (keep 6.0.0 on Bazel 6.3.0).
    
    Add missing maven and other deps to MODULE.bazel
    
    CI changes:
    Disable Bazel 6.4.0 with bzlmod. rules_jvm_external 6.0 use use_repo_rule, which is not supported by Bazel 6.
    Add C++ build "Bazel7 with Bzlmod" enabled.
    Add Java builds with "Bazel 7 with/without Bzlmod".
    
    Fixes: #17176
    PiperOrigin-RevId: 652773197
    protobuf-github-bot authored and haberman committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    fd4c619 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Fix toolchain resolution flag for bazel 6

    PiperOrigin-RevId: 676101880
    mkruskal-google authored and haberman committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    cf8ca01 View commit details
    Browse the repository at this point in the history
  2. Fix build breakage in new bzlmod test

    PiperOrigin-RevId: 652884366
    mkruskal-google authored and haberman committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    2cbca21 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b982c0d View commit details
    Browse the repository at this point in the history