Bazel 8 no longer supports legacy toolchains, so all of our release toolchains have been updated to use platforms.
#test-continuous
PiperOrigin-RevId: 870017275
38927bf2b9 cleaned up the constinit suppressions based on our understanding of the Windows/MSVC limitations at the time. It turns out this was incomplete and, by restoring constinit on static library MSVC builds, we broke something.
On MSVC, but not clang-cl, the workaround must extend to static library builds too. Although pointers to same-dll symbols are fine and MSVC, with optimizations, will avoid a static initializer, it doesn't seem to consistently recognize it in the type systems, so we can't enforce constinit. See https://godbolt.org/z/cYeYaaWq5
On MSVC, but not clang-cl, the above workaround must extend to static library builds too. MSVC can avoid a global constructor when initializing structures containing pointers to same-dll symbols, it relies on the optimizer for this, so we can't enforce constinit. This limitation does not apply to constexpr. See https://godbolt.org/z/hsT9e3zs4
Add a Windows Bazel C++20 build configuration, which would have caught this.
PiperOrigin-RevId: 858801389
The pyi generator now includes Kythe annotations for:
* Extension field constants (e.g., `EXTENSION_FIELD`).
* Field number constants (e.g., `STRING_FIELD_FIELD_NUMBER`).
* `Create` methods in generated Stubby client classes.
These annotations allow the Python indexer to link these generated symbols back to their definitions in the `.proto` files.
PiperOrigin-RevId: 852971617
These are by far our slowest tests due to their QEMU use. They rarely catch unique issues, so we can handle this in post-submits instead of paying ~4 minutes on every presubmit
PiperOrigin-RevId: 818873557
As discussed in https://github.com/protocolbuffers/protobuf/issues/20085, we were originally intending to drop support for this combination. With Bazel's recent changes to virtual includes on windows though, we now have ~90 extra characters of runway. This should be more than enough to continue supporting MSVC into the forseeable future. Clang-cl support will be kept in place as an alternative on windows
PiperOrigin-RevId: 783798673
#test-continuous
Most of our Windows test runs are currently failing with an error message about
the Clang version being too old. This seems to be an occasional
[issue](https://github.com/actions/runner-images/issues/10001) with the GitHub
Windows runners, and the suggested workaround is to use `choco` to upgrade LLVM.
We should revert this change as soon as the GitHub runners are fixed.
This change also includes a tweak to descriptor.cc to work around a mysterious
"internal compiler error" with MSVC.
PiperOrigin-RevId: 773825728
The main goal of this is to incorporate the minitable generator into our
released protoc binaries so that Rust users don't have to build it from source.
PiperOrigin-RevId: 728785507
Enables bzlmod for most CI tests, except python (and thus upb) since infra for system python headers for python dist are not bzlmod compatible and require further work.
#test-continuous
PiperOrigin-RevId: 721946253
An opt-out flag `--define=protobuf_allow_msvc=true` will be available until our 2026 breaking release 34.0. See https://github.com/protocolbuffers/protobuf/issues/20085 for more details.
#test-continuous
PiperOrigin-RevId: 720822739
- Switch our MSAN tests to use Memory instead of MemoryWithOrigins
- Enable minimal (-O1) optimizations for all sanitized builds
The new optimization shook loose some ODR issues we've hit before due to the cyclic dependency of cc_proto_library. This will fix itself once we finish taking over the rule, and shouldn't affect users. It can be worked around by forcing static linkage in sanitized builds.
#test-continuous
PiperOrigin-RevId: 720686491
These tests are currently flaky but should be fixed soon by a new image
rollout.
I plan on rolling back this change in a couple of days once the issue is fixed.
PiperOrigin-RevId: 720598019
This will help us avoid further bugs like #19735, where we're typically not very aware of how our files get installed as long as everything builds. With these tests in place, we will need to manually update the golden files whenever we add a new file to users' installations.
PiperOrigin-RevId: 709134471
The main branch was upgraded to use C++17 after the 29.0 branch cut, in commit
fe535930d3
There are still stale references to C++14 in the code, build chain, and
READMEs. This commit cleans up the stale configs and settings.
PiperOrigin-RevId: 706000867
Migrate all tests to run on bazel 7 and fix errors that came up in the process. 30.x will no longer guarantee support for bazel 6.
#test-continuous
PiperOrigin-RevId: 703590770
Instead of fetching dependencies by default, we will first look for a local installation and only fetch as a fallback. Two new options are added for forcing either of these behaviors. protobuf_FORCE_FETCH_DEPENDENCIES will always fetch dependencies, and protobuf_PREVENT_FETCH_DEPENDENCIES will never do so.
#test-continuous
PiperOrigin-RevId: 693898394
This flips the default behavior to "fetch", downloading local copies of required dependencies. This can be disabled by setting `-Dprotobuf_FETCH_DEPENDENCIES=OFF`, in which case we will look for a local installation using find_package. Setting `-Dprotobuf_ABSL_PROVIDER=package` will continue to have the same behavior as before.
See https://protobuf.dev/news/2024-10-02/#replace-cmake-submods for more details.
#test-continuous
PiperOrigin-RevId: 686649864
This ports upb's WORKSPACE scraping logic to protobuf, and allows us to dynamically fetch our dependencies at the exact same pinned version as in Bazel via protobuf_FETCH_DEPENDENCIES=ON. This is mostly for development purposes, and is preferable to git submodules. In a later cl we will flip the default behavior to "package"
#test-continuous
PiperOrigin-RevId: 686265348
This ensures the names of these jobs will properly be prefixed with "[SKIPPED] (Continuous)" and will show as passed instead of skipped.
PiperOrigin-RevId: 666918220