Protobuf Team Bot
a836ee1277
Auto-generate files after cl/688585300
2 months ago
Hong Shin
c5236bc28e
Migrate upb extension getters for scalars
...
Needed for hpb extension fetching so that we don't call an internal func with a void*
PiperOrigin-RevId: 688585300
2 months ago
Protobuf Team Bot
f549fc3ccc
Simplify proto2::(anonymous namespace)::FlatAllocatorImpl::GetFieldNameCase and reuse absl's ascii lower/uppercasing.
...
By just checking for upper-cased characters, rather than digits and lower-cased characters, we have to perform fewer comparisons.
This should be safe because absl::AsciiStrToLower only operates on upper-case characters.
PiperOrigin-RevId: 688453016
2 months ago
Joshua Haberman
2ac862f36c
Fixed a missing check in wire format verification.
...
Also added some extra DCHECKs to more easily catch issues like this in the future.
PiperOrigin-RevId: 688347347
2 months ago
Protobuf Team Bot
f92335b36d
Comment change: clarifies that the field/value order is based on textual order in the file, not the order of the enums.
...
Clarifies that reordering `enum` fields (even without changing their IDs) will change the order of the `value` indices. (This means that a seemingly "no-op" change to reorganize enums may affect code that (incorrectly) relied on the order of `value()`.
PiperOrigin-RevId: 688297400
2 months ago
Mark Hansen
84a4472a0f
Make GeneratedMessageLite.isInitialized(T message, boolean shouldMemoize) private
...
It's not used by generated code, contrary to the comment.
The 2-arg version of the method was used in gencode for one day (2025-04-08 through 09): cl/90574926 to cl/90648831.
PiperOrigin-RevId: 688268752
2 months ago
Hong Shin
6935e10f38
Make ExtensionIdentifier's constructor private
...
PiperOrigin-RevId: 688214820
2 months ago
Jie Luo
5ba74b11e8
Breaking Change: Remove deprecated Python RPC Service Interfaces
...
service.py are marked as deprecated since 2010 7b7a80eae4
See https://protobuf.dev/news/2024-10-02/#rpc-service-interfaces for details.
PiperOrigin-RevId: 688190869
2 months ago
Protobuf Team Bot
8c1fa83fb8
Make usingShortRepeatedPrimitives for textproto printer public
...
PiperOrigin-RevId: 688169485
2 months ago
Evan Brown
f971ed3f36
Use Layout::WithStaticSizes in SerialArenaChunk to improve performance of Layout computations.
...
PiperOrigin-RevId: 688155852
2 months ago
Protobuf Team Bot
ba85b2003f
Auto-generate files after cl/688151072
2 months ago
Protobuf Team Bot
8f7aab29b2
Migrate enum extensions to data based validation instead of function pointer
...
based one.
This reduces binary size and runtime dispatch costs.
Also, since we are changing the declaration of the type trait, take the opportunity to remove the validator from the template parameters. It can be inferred directly from the type if we add traits for the enum.
PiperOrigin-RevId: 688151072
2 months ago
Protobuf Team Bot
34019f4517
Fix proto_info_bzl
...
Needed for generating proto docs.
PiperOrigin-RevId: 688143120
2 months ago
Protobuf Team Bot
a98b0bec43
Improve ImplicitWeakMessage to allocate the internal string in the arena, and
...
allow skipping the destructor.
PiperOrigin-RevId: 688142492
2 months ago
Hong Shin
377b5e4863
Update set_alias to use FindFieldByNumber
...
PiperOrigin-RevId: 688120291
2 months ago
Protobuf Team Bot
b8d356701a
Add support to print repeated fields with primitive values using short notation
...
This is inspired by the corrosponding options in the C++ and Python formatters.
PiperOrigin-RevId: 687471623
2 months ago
Tony Liao
fe535930d3
Bump minimum C++ version to C++17 after branch cut for v29.
...
Branch cut for v29 is done on 2024-09-30:
https://github.com/protocolbuffers/protobuf/releases/tag/v29.0-rc1
The next version v30 will be a breaking release. The release date is scheduled
after the EOL of C++14 support on 2024-12-15 for Google open source projects
generally:
https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
This commit allows us to start taking advantage of C++17 features now.
Some issues I ran into while upgrading:
Two GCC 9.5 bugs related to -Wunused-but-set-parameter:
- https://godbolt.org/z/qo51cKe7b
- https://godbolt.org/z/65qW3vGhP
Another GCC warning related to -Wself-assign in a template.
There is a custom ASAN check that is not yet open sourced. I'll see if I can
open source them in a subsequent commit.
#test-continuous
PiperOrigin-RevId: 687435042
2 months ago
Tony Liao
b93b8e5f64
Upgrade Python test --macos_minimum_os to 10.15 (Catalina)
...
See prior art:
- aa3b976f42
- 67fca5cb70
OSS foundational support matrix suggests that the minimum supported macOS
version has been moved up to macOS 11 (Big Sur).
See: https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
#test-continuous
PiperOrigin-RevId: 687413401
2 months ago
Protobuf Team Bot
c0a99b096f
Auto-generate files after cl/687389326
2 months ago
Protobuf Team Bot
18903c4a4c
Implement Java feature `use_old_outer_classname_default` for edition 2024.
...
PiperOrigin-RevId: 687389326
2 months ago
Protobuf Team Bot
5599f2ceec
well_known_types: Use str.rpartition instead of str.split for Any type name
...
`Any.TypeName` used `str.split` to extract the second part of the type URL
(potentially the only if there's no slash). `str.rpartition` has the same
effect and avoids constructing a list.
PiperOrigin-RevId: 687385575
2 months ago
Tony Liao
67fca5cb70
Upgrade minimum version of macOS support to macOS 10.15 (Catalina).
...
See prior art:
aa3b976f42
OSS foundational support matrix suggests that the minimum supported macOS
version has been moved up to macOS 11 (Big Sur).
See: https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
#test-continuous
PiperOrigin-RevId: 687364677
2 months ago
Protobuf Team Bot
4d2add3e63
Auto-generate files after cl/687354677
2 months ago
Adam Cozzette
cbb3edd86d
Rust C++: get all map fields onto a common implementation of ProxiedInMapValue
...
This CL migrates messages, enums, and primitive types all onto the same blanket
implementation of the `ProxiedInMapValue` trait. This gets us to the point
where messages and enums no longer need to generate any significant amount of
extra code just in case they might be used as a map value.
There are a few big pieces to this:
- I generalized the message-specific FFI endpoints in `rust/cpp_kernel/map.cc`
to be able to additionally handle enums and primitive types as values. This
mostly consisted of replacing `MessageLite*` parameters with a new `MapValue`
tagged union.
- On the Rust side, I added a new blanket implementation of
`ProxiedInMapValue` in rust/cpp.rs. It relies on its value type to implement
a new `CppMapTypeConversions` trait so that it can convert to and from the
`MapValue` tagged union used for FFI.
- In the Rust generated code, I deleted the generated `ProxiedInMapValue`
implementations for messages and enums and replaced them with
implementations of the `CppMapTypeConversions` trait.
PiperOrigin-RevId: 687355817
2 months ago
Mike Kruskal
2ff033011f
Upgrade to jsoncpp 1.9.6.
...
This version supports cmake builds, so that we can depend on the same pin for both cmake and bazel.
PiperOrigin-RevId: 687354677
2 months ago
Adam Cozzette
9256d0705c
Allow `rust_proto_library` aspect to handle targets with empty `srcs`
...
There is an old convention that a `proto_library` target with empty `srcs`
should re-export its dependencies. This is sometimes useful as a way of
creating something like an alias target, except that it can point to multiple
dependencies rather than just one.
The `rust_proto_library` aspect currently cannot handle this pattern and will
raise an error if it encounters a `proto_library` without `srcs`. This CL fixes
that problem by updating the `RustProtoInfo` provider generated by the aspect
to include a list of `DepVariantInfo` instead of just one. In the typical case
the provider will have just one `DepVariantInfo`, but this gives us the ability
to return more than one in the case where we're exporting all the dependencies
of a `src`-less `proto_library`.
One thing this CL specifically does not attempt to do is add support for a
`rust_proto_library` directly wrapping a `proto_library` without `srcs`. The
reason for that is that it appears difficult to do in a way that would respect
the layering check. It's also not obvious that we would want to encourage this
pattern anyway. It's still valuable to support `src`-less `proto_library`
targets when they're somewhere else in the transitive dependencies. This way
you can freely create a `rust_proto_library` without having to fix up all your
transitive deps first.
PiperOrigin-RevId: 687344284
2 months ago
Protobuf Team Bot
dcc1c08ef7
Internal changes
...
PiperOrigin-RevId: 687342496
2 months ago
Adam Cozzette
7d619e8974
Rust: fix extra copy in map setters
...
When you call a map field setter, we currently make an unnecessary extra copy,
so this CL fixes that problem.
I followed the example of how we already handle this for repeated field
setters. This required adding a new move setter thunk for map fields with the
C++ kernel. Originally I tried instead to add an FFI endpoint that could swap
two `RawMap` pointers, but it turned out to be difficult to implement this in a
way that worked correctly when the two maps are not on the same arena.
PiperOrigin-RevId: 687334655
2 months ago
Protobuf Team Bot
f58849b603
Automated rollback of commit bd03560d9f
.
...
PiperOrigin-RevId: 687328386
2 months ago
Protobuf Team Bot
007c93fa9c
Automated rollback of commit 9a3c096b0c
.
...
PiperOrigin-RevId: 687291129
2 months ago
Protobuf Team Bot
79e6042935
Auto-generate files after cl/687070204
2 months ago
Protobuf Team Bot
56219aa08b
Upgrade rules_java and remove experimental_google_legacy_api flag
...
The upgrade of rules_java also upgrades error prone and this resulted in some additional errors reported in Protobuf's tests. Set the flag to report those as warning, but they should be cleaned up eventually.
PiperOrigin-RevId: 687070204
2 months ago
Hong Shin
9a3c096b0c
Make ExtensionIdentifier's constructor private
...
PiperOrigin-RevId: 687065564
2 months ago
Sandy Zhang
e26cb4864d
Update protobuf's abseil dep to 20240722.0 in WORKSPACE protobuf_deps.bzl.
...
This was updated in MODULE.bzl already in cl/686670268
#test-continuous
PiperOrigin-RevId: 687045173
2 months ago
Protobuf Team Bot
7c0fe167b4
Automated rollback of commit bfaf36cbb1
.
...
PiperOrigin-RevId: 687045040
2 months ago
Sandy Zhang
fac0325484
Update remaining Python 3.8 upb macos tests to macos-13
...
macos-12 runner image is deprecated and is EOL 12/3/24 per https://github.com/actions/runner-images/issues/10721
Note that Python 3.8 is EOL and these tests should also be dropped / upgraded in
favor of 3.9 soon anyways.
#test-continuous
PiperOrigin-RevId: 687002433
2 months ago
Protobuf Team Bot
3fe0c75fc9
Internal change
...
PiperOrigin-RevId: 686989033
2 months ago
Mike Kruskal
955cb8154d
Internal changes
...
PiperOrigin-RevId: 686984077
2 months ago
Matteo
bd1806edc3
Fix generation of save-installed-headers.vcxproj regarding upb headers ( #18135 )
...
upb headers are not in `${protobuf_SOURCE_DIR}/src`, so the `string(REPLACE ...)` command fails and the `save-installed-headers.vcxproj` contains an invalid path regarding upb headers, causing a failure in compilation.
Closes #18135
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/18135 from Delcaran:main 28c40493e3
PiperOrigin-RevId: 686963169
2 months ago
Sandy Zhang
8eef2b3edc
Add validation that all steps have a name.
...
This also prevents the validate_yaml script from erroring when trying to log that a step is mishandling continuous-run / continuous-prefix
PiperOrigin-RevId: 686952188
2 months ago
Protobuf Team Bot
12eadfdfd9
Handle `PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII` being undefined
...
Check if `defined(PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII)` before trying to use it.
PiperOrigin-RevId: 686945589
2 months ago
Mike Kruskal
264c4b7b43
Fix abseil build after bump broke windows/cmake
...
#test-continuous
PiperOrigin-RevId: 686933460
2 months ago
Mark Hansen
fe6234122b
Automated rollback of commit 2b0a414573
.
...
PiperOrigin-RevId: 686927185
2 months ago
Mike Kruskal
54de2e5a6e
Delete unused submodules ( #18873 )
2 months ago
dependabot[bot]
8818c672f5
Bump actions/upload-artifact and actions/download-artifact from 3 to 4 ( #18329 )
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3 to 4.
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 3 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases ">actions/upload-artifact's releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<p>The release of upload-artifact@v4 and download-artifact@v4 are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements.</p>
<p>ℹ️ However, this is a major update that includes breaking changes. Artifacts created with versions v3 and below are not compatible with the v4 actions. Uploads and downloads <em>must</em> use the same major actions versions. There are also key differences from previous versions that may require updates to your workflows.</p>
<p>For more information, please see:</p>
<ol>
<li>The <a href="https://github.blog/changelog/2023-12-14-github-actions-artifacts-v4-is-now-generally-available/ ">changelog</a> post.</li>
<li>The <a href="https://github.com/actions/upload-artifact/blob/main/README.md ">README</a>.</li>
<li>The <a href="https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md ">migration documentation</a>.</li>
<li>As well as the underlying npm package, <a href="https://github.com/actions/toolkit/tree/main/packages/artifact "><code>@actions/artifact</code></a> documentation.</li>
</ol>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/vmjoseph "><code>@vmjoseph</code></a> made their first contribution in <a href="https://redirect.github.com/actions/upload-artifact/pull/464 ">actions/upload-artifact#464</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/upload-artifact/compare/v3...v4.0.0 ">https://github.com/actions/upload-artifact/compare/v3...v4.0.0 </a></p>
<h2>v3.2.1</h2>
<h2>What's Changed</h2>
<p>This fixes the <code>include-hidden-files</code> input introduced in <a href="https://github.com/actions/upload-artifact/releases/tag/v3.2.0 ">https://github.com/actions/upload-artifact/releases/tag/v3.2.0 </a></p>
<ul>
<li>Ensure hidden files input is used by <a href="https://github.com/joshmgross "><code>@joshmgross</code></a> in <a href="https://redirect.github.com/actions/upload-artifact/pull/609 ">actions/upload-artifact#609</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/upload-artifact/compare/v3.2.0...v3.2.1 ">https://github.com/actions/upload-artifact/compare/v3.2.0...v3.2.1 </a></p>
<h2>v3.2.1-node20</h2>
<h2>What's Changed</h2>
<p>This fixes the <code>include-hidden-files</code> input introduced in <a href="https://github.com/actions/upload-artifact/releases/tag/v3.2.0-node20 ">https://github.com/actions/upload-artifact/releases/tag/v3.2.0-node20 </a></p>
<ul>
<li>Ensure hidden files input is used by <a href="https://github.com/joshmgross "><code>@joshmgross</code></a> in <a href="https://redirect.github.com/actions/upload-artifact/pull/608 ">actions/upload-artifact#608</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/upload-artifact/compare/v3.2.0-node20...v3.2.1-node20 ">https://github.com/actions/upload-artifact/compare/v3.2.0-node20...v3.2.1-node20 </a></p>
<h2>v3.2.0</h2>
<h2>Notice: Breaking Changes ⚠️ </h2>
<p>We will no longer include hidden files and folders by default in the <code>upload-artifact</code> action of this version. This reduces the risk that credentials are accidentally uploaded into artifacts. Customers who need to continue to upload these files can use a new option, <code>include-hidden-files</code>, to continue to do so.</p>
<p>See <a href="https://github.blog/changelog/2024-08-19-notice-of-upcoming-deprecations-and-breaking-changes-in-github-actions-runners/ ">"Notice of upcoming deprecations and breaking changes in GitHub Actions runners"</a> changelog and <a href="https://redirect.github.com/actions/upload-artifact/issues/602 ">this issue</a> for more details.</p>
<h2>What's Changed</h2>
<ul>
<li>V3 backport: Exclude hidden files by default by <a href="https://github.com/SrRyan "><code>@SrRyan</code></a> in <a href="https://redirect.github.com/actions/upload-artifact/pull/604 ">actions/upload-artifact#604</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="50769540e7
"><code>5076954</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/598 ">#598</a> from actions/joshmgross/exclude-hidden-files</li>
<li><a href="d52396ac5d
"><code>d52396a</code></a> Add a warning about enabling <code>include-hidden-files</code></li>
<li><a href="710f362075
"><code>710f362</code></a> Remove "merged" from <code>include-hidden-files</code> input description</li>
<li><a href="3b315f26f6
"><code>3b315f2</code></a> <code>npm run release</code> again 🙂 </li>
<li><a href="3be2180eb7
"><code>3be2180</code></a> Remove another trailing comma</li>
<li><a href="453e8d0a40
"><code>453e8d0</code></a> Update glob license</li>
<li><a href="0a398c1480
"><code>0a398c1</code></a> <code>npm run release</code></li>
<li><a href="a0c40cf602
"><code>a0c40cf</code></a> Update to latest <code>@actions/glob</code> and fix tests</li>
<li><a href="acb59e4776
"><code>acb59e4</code></a> <code>lint</code></li>
<li><a href="cb6558bb10
"><code>cb6558b</code></a> Exclude hidden files by default</li>
<li>Additional commits viewable in <a href="https://github.com/actions/upload-artifact/compare/v3...v4 ">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=3&new-version=4 )](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually 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>
Closes #18329
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/18329 from protocolbuffers:dependabot/github_actions/actions/upload-artifact-4 57e94bf354
PiperOrigin-RevId: 686898193
2 months ago
Hong Shin
d80ac3a7e6
hpb: expunge MessageName in favor of upb::generator::CApiMessageType
...
PiperOrigin-RevId: 686896344
2 months ago
Protobuf Team Bot
b956147ce1
Use rules_cc everywhere in protobuf
...
Nice to have in the future when rules_cc are in the repository, but not necessary ATM.
PiperOrigin-RevId: 686760344
2 months ago
Protobuf Team Bot
50e3b1b66c
Auto-generate files after cl/686703004
2 months ago
Protobuf Team Bot
e358a4025e
Convert proto toolchain string to Label
...
Without it the still slightly weird setup of Bazel unit tests causes problems.
PiperOrigin-RevId: 686745551
2 months ago
Protobuf Team Bot
1f7f08d21d
Internal change
...
PiperOrigin-RevId: 686703004
2 months ago