Remove direct references to system_python.bzl in favor of using protobuf_deps.bzl instead. Use python/dist/system_python.bzl where it was moved in v5.27.0 if you need a direct reference.
See https://protobuf.dev/news/2024-10-02/#python-remove-alias
PiperOrigin-RevId: 686129383
We already use `ABSL_LOG` everywhere instead of `LOG`, so we don't need a
dependency on "third_party/absl/log/log.h". We already use
"third_party/absl/log/absl_log.h" instead.
PiperOrigin-RevId: 685881253
Currently, when a project that includes protobuf is compiled using -Werror, the build will fail due to these variables not being initialized. This fixes this warning allowing the build to complete successfully
Closes#17052
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/17052 from guitar24t:main a0d295c222
PiperOrigin-RevId: 685735896
Bumps [shivammathur/setup-php](https://github.com/shivammathur/setup-php) from 2.30.2 to 2.31.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/shivammathur/setup-php/releases">shivammathur/setup-php's releases</a>.</em></p>
<blockquote>
<h2>2.31.1</h2>
<h2>Changelog</h2>
<ul>
<li>
<p>Fix installing PECL extensions on Windows with a build version <a href="https://redirect.github.com/shivammathur/setup-php/issues/855">#855</a></p>
</li>
<li>
<p>Fix cache support for ioncube extension <a href="https://redirect.github.com/shivammathur/setup-php/issues/856">#856</a></p>
</li>
<li>
<p>Updated Node.js dependencies.</p>
</li>
</ul>
<p>For the complete list of changes, please refer to the <a href="https://github.com/shivammathur/setup-php/compare/2.31.0...2.31.1">Full Changelog</a></p>
<!-- raw HTML omitted -->
<h2>2.31.0</h2>
<h2>Changelog</h2>
<ul>
<li>
<p>Added support for a fallback mirror for <code>ondrej/php</code> PPA when launchpad is down (<a href="https://redirect.github.com/shivammathur/setup-php/issues/834">#834</a>).</p>
</li>
<li>
<p>Fixed installing packages on self-hosted environments with existing conf files (<a href="https://redirect.github.com/shivammathur/setup-php/issues/852">#852</a>).</p>
</li>
<li>
<p>Fixed support for <code>oci8</code> and <code>pdo_oci</code> extensions on <code>ubuntu-24.04</code>.</p>
</li>
<li>
<p>Fixed support for <code>couchbase</code> extension on <code>ubuntu-24.04</code>.</p>
</li>
<li>
<p>Fixed support for <code>ubuntu-24.04</code> after <code>apt-fast</code> was dropped from the GA images.</p>
</li>
<li>
<p>Fixed support for <code>firebird</code> extension on <code>macos-14</code></p>
</li>
<li>
<p>Fixed support for <code>blackfire</code> extension on <code>macos-14</code>.</p>
</li>
<li>
<p>Fixed support for <code>relay</code> extension.</p>
</li>
<li>
<p>Fixed support for <code>phalcon</code> extension for PHP 7.4 on Ubuntu.</p>
</li>
<li>
<p>Updated Node.js dependencies.</p>
</li>
</ul>
<p>For the complete list of changes, please refer to the <a href="https://github.com/shivammathur/setup-php/compare/2.30.5...2.31.0">Full Changelog</a></p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="c541c155ee"><code>c541c15</code></a> Bump version 2.31.1</li>
<li><a href="afff805ea3"><code>afff805</code></a> Fix cache support for ioncube</li>
<li><a href="594bd591ec"><code>594bd59</code></a> Fix version regex in Add-Extension</li>
<li><a href="2e947f1f69"><code>2e947f1</code></a> Bump version to 2.31.0</li>
<li><a href="2a5212466c"><code>2a52124</code></a> Add fallback mirror for php PPA when launchpad is down</li>
<li><a href="9c28f9ba58"><code>9c28f9b</code></a> Fix support for phalcon on PHP 7.4</li>
<li><a href="b9f1db485f"><code>b9f1db4</code></a> Improve support for firebird</li>
<li><a href="588b5da142"><code>588b5da</code></a> Fix support for couchbase on Ubuntu 24.04</li>
<li><a href="a0edbac27b"><code>a0edbac</code></a> Fix support for blackfire</li>
<li><a href="606ac25b84"><code>606ac25</code></a> Fix oci extension support on Ubuntu 24.04</li>
<li>Additional commits viewable in <a href="8872c784b0...c541c155ee">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=shivammathur/setup-php&package-manager=github_actions&previous-version=2.30.2&new-version=2.31.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
You can trigger a rebase of this PR by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
> **Note**
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
Closes#17855
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/17855 from protocolbuffers:dependabot/github_actions/shivammathur/setup-php-2.31.1 5cdf92ee64
PiperOrigin-RevId: 684962209
It's somewhat tedious to explicitly set this option on all of our C++ targets,
so I think ideally we should rely primarily on bazelrc files for setting
compiler flags. I tried to completely remove `COPTS`, but unfortunately that
did not work out--we have so many `-Wsign-compare` warnings that I think we
need to keep suppressing them for now or else we will get a lot of complaints.
However, I was able to get to the point where `-Wno-sign-compare` is the only
flag we need in `COPTS` for non-Windows builds. I explicitly set `-DHAVE_ZLIB`
on just the two targets that need it, and removed `-Wno-nonnull` since we are
already compliant with that warning. I moved `-Woverloaded-virtual` to our
bazelrc files so that CI will enforce that we remain compliant with that.
PiperOrigin-RevId: 684863987
This doesn't alleviate Bazel's problem. rules_rust are still fetched because they register toolchains themselves.
However the change pushes into the direction, where I believe that only the owning module should be concerned with its toolchain registration and the toolchain selection should be controlled via a flag mechanism or similar. Removing the registration now, can alleviate problems in the future, when we figure out how to prevent unnecessary fetches.
PiperOrigin-RevId: 684721071
Rename bazel_osx_p4deps to for_bazel_tests. The name was used in the past.
Fix all bzl_libraries to have the correct set of dependencies.
Cleanup for_bazel_tests to include BUILD file and public bzl_libraries in the package.
PiperOrigin-RevId: 684713554
The default name for the rules_jvm_external.maven rule is "maven". When not set, it defaults to "maven". For root modules also using rules_jvm_external, the name clash causes a warning:
```
DEBUG: $TMP/external/rules_jvm_external~/private/extensions/maven.bzl:154:14:
The maven repository 'maven' is used in two different bazel modules,
originally in '<my_workspace>' and now in 'protobuf'
```
Summarizing @shs96c in [1]:
> The common maven repo name allows rulesets to contribute to the user's JARs.
> However, this implies that maven is for the end user, not for transitive
> dependencies. If a ruleset needs private dependencies, it should use a custom
> namespace rather than the maven namespace.
Since protobuf is not contributing to user's JARs, we'll use a custom namespace. There's precedent for using a custom namespace for library modules:
- rules_jvm_external uses `rules_jvm_external_deps` instead of `maven`.
- rules_kotlin uses `kotlin_rules_maven` instead of `maven`.
[1]: https://github.com/bazel-contrib/rules_jvm_external/issues/916#issuecomment-1645527584Fixes#16839.
Closes#18641
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/18641 from jschaf:joe/protobuf-maven bd2c62f311
PiperOrigin-RevId: 684625084
When swap is being called on a scalar field in an implicit-presence message,
calling accessors on the swapped-out field should give zero.
When swap is being called on a repeated field in an implicit-presence message,
calling accessors on the swapped-out field should give the empty list.
When swap is being called on a oneof field in an implicit-presence message,
calling `has_foo` on the swapped-out field should return false.
PiperOrigin-RevId: 684582416
These have been empty and forwarding to the real versions for
years now. Everyone should have migrated to the GPB[Name].pbobjc.h
versions instead.
PiperOrigin-RevId: 684580342
As an optimization, we maintain a default instance of a string in memory, and
messages with uninitialized fields will be constructed with a pointer to this
default string object. The destructor should clear the field only when it is
"set" to a nondefault object.
If `ClearNonDefaultToEmpty()` is ever called on a default string...
- It will result in undefined behaviour. Most likely, it results in overwriting
an object in memory (which is already full of zeros) with another bunch of
zeros.
- It's quite bad for a number of reasons:
1. It can confuse TSAN.
2. It blocks us from moving the default instance of the string into the
`.data` section. Having the default instance of the string live in
read-only memory would be beneficial for memory safety. It would play well
with hugepages. It would also eliminate some runtime cost of instantiating
the default instance of the string.
This change adds a debug-fail so that users don't call this function "unsafely".
PiperOrigin-RevId: 684569674
`ProtoStr` is a public type and it has a public
method `to_str`, however `to_str` returns a private
type `Utf8Error`, which triggers `private-interfaces` [1].
Exporting string::Utf8Error makes it possible for other
crates to wrap it in another error type and propagate
it with "?".
[1] https://doc.rust-lang.org/beta/rustc/lints/listing/warn-by-default.html#private-interfaces
PiperOrigin-RevId: 684477510
The fact that our `:protobuf_nowkt` target actually does depend on the
well-known types is causing a dependency cycle for Kythe. This fixes that so
that `:protobuf_nowkt` no longer depends on the well-known types.
PiperOrigin-RevId: 684160567