Skip to content

Update Bazel references to rules_pkg to the supported file locations.#15780

Closed
aiuto wants to merge 1 commit intoprotocolbuffers:mainfrom
aiuto:rules_pkg
Closed

Update Bazel references to rules_pkg to the supported file locations.#15780
aiuto wants to merge 1 commit intoprotocolbuffers:mainfrom
aiuto:rules_pkg

Conversation

@aiuto
Copy link
Copy Markdown

@aiuto aiuto commented Feb 8, 2024

WIP: I want to see this pass CI first.

Fixes: #15779

3 scripted transforms:

  -load("@rules_pkg//:mappings.bzl", ...)
  +load("@rules_pkg//pkg:mappings.bzl", ...)
  -load("@rules_pkg//:pkg.bzl", "pkg_tar")
  +load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
  -load("@rules_pkg//:pkg.bzl", "pkg_zip")
  +load("@rules_pkg//pkg:zip.bzl", "pkg_zip")

3 scripted transforms:
```
  -load("@rules_pkg//:mappings.bzl", ...)
  +load("@rules_pkg//pkg:mappings.bzl", ...)
```
```
  -load("@rules_pkg//:pkg.bzl", "pkg_tar")
  +load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
```
```
  -load("@rules_pkg//:pkg.bzl", "pkg_zip")
  +load("@rules_pkg//pkg:zip.bzl", "pkg_zip")
```
@aiuto aiuto marked this pull request as ready for review February 12, 2024 16:59
@aiuto aiuto requested review from a team as code owners February 12, 2024 16:59
@aiuto aiuto requested review from acozzette and anandolee and removed request for a team February 12, 2024 16:59
@zhangskz zhangskz added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Feb 12, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Feb 12, 2024
@zhangskz
Copy link
Copy Markdown
Member

I think this would also requires updating https://github.com/protocolbuffers/protobuf/blob/main/protobuf_deps.bzl#L116 to >= 0.7.1 as well since this seems to be where pkg:mappings.bzl was introduced.

@aiuto
Copy link
Copy Markdown
Author

aiuto commented Feb 12, 2024

I left that out proto_deps.bzl on purpose. Doing so would cause people to start depending on a newer version regardless of their intent. That could be a breaking change for some people.
In any case, pkg/mappings.bzl was introduce in 0.4.0 containing this change from 2021. bazelbuild/rules_pkg@38dcfe0

@zhangskz
Copy link
Copy Markdown
Member

I left that out proto_deps.bzl on purpose. Doing so would cause people to start depending on a newer version regardless of their intent. That could be a breaking change for some people. In any case, pkg/mappings.bzl was introduce in 0.4.0 containing this change from 2021. bazelbuild/rules_pkg@38dcfe0

Ah even better, thanks!

deannagarcia pushed a commit to deannagarcia/protobuf that referenced this pull request Jun 20, 2024
…protocolbuffers#15780)

WIP:  I want to see this pass CI first.

Fixes: protocolbuffers#15779

3 scripted transforms:
```
  -load("@rules_pkg//:mappings.bzl", ...)
  +load("@rules_pkg//pkg:mappings.bzl", ...)
```
```
  -load("@rules_pkg//:pkg.bzl", "pkg_tar")
  +load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
```
```
  -load("@rules_pkg//:pkg.bzl", "pkg_zip")
  +load("@rules_pkg//pkg:zip.bzl", "pkg_zip")
```

Closes protocolbuffers#15780

COPYBARA_INTEGRATE_REVIEW=protocolbuffers#15780 from aiuto:rules_pkg a630276
PiperOrigin-RevId: 606641398
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.

protobuf does not build with Bazel when using rules_pkg >= 0.10.0

3 participants