Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
[submodule "thirdparty/protobuf"]
path = thirdparty/protobuf
url = https://github.com/protocolbuffers/protobuf.git
[submodule "thirdparty/swift-protobuf"]
path = thirdparty/swift-protobuf
url = https://github.com/apple/swift-protobuf.git
1 change: 0 additions & 1 deletion thirdparty/protobuf
Submodule protobuf deleted from 63def3
4 changes: 4 additions & 0 deletions thirdparty/protobuf/.bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are fetched as external repositories.
third_party/abseil-cpp
third_party/googletest
_build/
34 changes: 34 additions & 0 deletions thirdparty/protobuf/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17

build:dbg --compilation_mode=dbg

build:opt --compilation_mode=opt

build:san-common --config=dbg --strip=never --copt=-O0 --copt=-fno-omit-frame-pointer

build:asan --config=san-common --copt=-fsanitize=address --linkopt=-fsanitize=address
# ASAN hits ODR violations with shared linkage due to rules_proto.
build:asan --dynamic_mode=off

build:msan --config=san-common --copt=-fsanitize=memory --linkopt=-fsanitize=memory
build:msan --copt=-fsanitize-memory-track-origins
build:msan --copt=-fsanitize-memory-use-after-dtor
build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1

build:tsan --config=san-common --copt=-fsanitize=thread --linkopt=-fsanitize=thread

build:ubsan --config=san-common --copt=-fsanitize=undefined --linkopt=-fsanitize=undefined
build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1
# Workaround for the fact that Bazel links with $CC, not $CXX
# https://github.com/bazelbuild/bazel/issues/11122#issuecomment-613746748
build:ubsan --copt=-fno-sanitize=function --copt=-fno-sanitize=vptr

# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel
# https://github.com/protocolbuffers/protobuf/issues/14313
common --noenable_bzlmod

# Important: this flag ensures that we remain compliant with the C++ layering
# check.
build --features=layering_check

common --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1
8 changes: 8 additions & 0 deletions thirdparty/protobuf/.bcr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Bazel Central Registry

When protobuf is released, we want it to be published to the Bazel Central
Registry automatically: <https://registry.bazel.build>

This folder contains configuration files to automate the publish step. See
<https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
for authoritative documentation about these files.
23 changes: 23 additions & 0 deletions thirdparty/protobuf/.bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"homepage": "https://github.com/protocolbuffers/protobuf",
"maintainers": [
{
"email": "[email protected]",
"github": "zhangskz",
"name": "Sandy Zhang"
},
{
"email": "[email protected]",
"github": "mkruskal-google",
"name": "Mike Kruskal"
},
{
"email": "[email protected]",
"github": "googleberg",
"name": "Jerry Berg"
}
],
"repository": ["github:protocolbuffers/protobuf"],
"versions": [],
"yanked_versions": {}
}
35 changes: 35 additions & 0 deletions thirdparty/protobuf/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]

tasks:
verify_targets:
name: "Verify build targets"
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--host_cxxopt=-std=c++14'
- '--cxxopt=-std=c++14'
build_targets:
- '@protobuf//:protobuf'
- '@protobuf//:protobuf_lite'
- '@protobuf//:protoc'
- '@protobuf//:test_messages_proto2_cc_proto'
- '@protobuf//:test_messages_proto3_cc_proto'

bcr_test_module:
module_path: "examples"
matrix:

platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_test_module:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--host_cxxopt=-std=c++14'
- '--cxxopt=-std=c++14'
build_targets:
- "//..."
5 changes: 5 additions & 0 deletions thirdparty/protobuf/.bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "**leave this alone**",
"strip_prefix": "{REPO}-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{VERSION}.zip"
}
3 changes: 3 additions & 0 deletions thirdparty/protobuf/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BasedOnStyle: Google
DerivePointerAlignment: false
PointerAlignment: Left
54 changes: 54 additions & 0 deletions thirdparty/protobuf/.github/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This information is extracted from the MacOS runner specs located at:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
#
# When updating, also ensure the "xcode_destination" entries in
# `.github/workflows/test_objectivec.yml` are supported for the given versions
# of Xcode.
xcode_version(
name = "version15_2_15C500b",
aliases = [
"15C500b",
"15.2",
],
default_ios_sdk_version = "17.2",
default_macos_sdk_version = "14.2",
default_tvos_sdk_version = "17.2",
default_watchos_sdk_version = "10.2",
version = "15.2.0.15C500b",
)

xcode_version(
name = "version14_2_14C18",
aliases = [
"14C18",
"14.2",
],
default_ios_sdk_version = "16.2",
default_macos_sdk_version = "13.1",
default_tvos_sdk_version = "16.1",
default_watchos_sdk_version = "9.1",
version = "14.2.0.14C18",
)

xcode_version(
name = "version14_1_0_14B47b",
aliases = [
"14B47b",
"14.1",
],
default_ios_sdk_version = "16.1",
default_macos_sdk_version = "13.0",
default_tvos_sdk_version = "16.1",
default_watchos_sdk_version = "9.1",
version = "14.1.0.14B47b",
)

xcode_config(
name = "host_xcodes",
default = ":version14_2_14C18",
versions = [
":version15_2_15C500b",
":version14_2_14C18",
":version14_1_0_14B47b",
],
)
37 changes: 37 additions & 0 deletions thirdparty/protobuf/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/src/ @protocolbuffers/protobuf-compiler

/src/google/protobuf/compiler/cpp @protocolbuffers/protobuf-cpp

/csharp/ @protocolbuffers/protobuf-csharp
/src/google/protobuf/compiler/csharp/ @protocolbuffers/protobuf-csharp

/docs/ @protocolbuffers/protobuf-docs
/examples/ @protocolbuffers/protobuf-docs

/java/ @protocolbuffers/protobuf-java
/src/google/protobuf/compiler/java/ @protocolbuffers/protobuf-java

/java/kotlin-lite/ @protocolbuffers/protobuf-kotlin
/java/kotlin/ @protocolbuffers/protobuf-kotlin

/objectivec/ @protocolbuffers/protobuf-objc
/src/google/protobuf/compiler/objectivec/ @protocolbuffers/protobuf-objc

/php/ @protocolbuffers/protobuf-php
/src/google/protobuf/compiler/php/ @protocolbuffers/protobuf-php

/python/ @protocolbuffers/protobuf-python
/src/google/protobuf/compiler/python/ @protocolbuffers/protobuf-python

/ruby/ @protocolbuffers/protobuf-ruby
/src/google/protobuf/compiler/ruby/ @protocolbuffers/protobuf-ruby

/build_defs/ @protocolbuffers/protobuf-btr
/cmake/ @protocolbuffers/protobuf-btr
/pkg/ @protocolbuffers/protobuf-btr
/toolchain/ @protocolbuffers/protobuf-btr
/conformance/ @protocolbuffers/protobuf-btr
/kokoro/ @protocolbuffers/protobuf-btr
/third_party/ @protocolbuffers/protobuf-btr
*.bazel @protocolbuffers/protobuf-btr
/.github/ @protocolbuffers/protobuf-btr
39 changes: 39 additions & 0 deletions thirdparty/protobuf/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'untriaged'
assignees: ''

---

<!--

NOTE: this form is for bug reports only.
For questions or troubleshooting, please post on the protobuf mailing list:
https://groups.google.com/forum/#!forum/protobuf
Stack Overflow is also a useful if unofficial resource https://stackoverflow.com/questions/tagged/protocol-buffers
-->

**What version of protobuf and what language are you using?**
Version: main/v3.6.0/v3.5.0 etc. (NOTE: please try updating to the latest version of protoc/runtime possible beforehand to attempt to resolve your problem)
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript

**What operating system (Linux, Windows, ...) and version?**

**What runtime / compiler are you using (e.g., python version or gcc version)**

**What did you do?**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**What did you expect to see**

**What did you see instead?**

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

**Anything else we should know about your project / environment**
28 changes: 28 additions & 0 deletions thirdparty/protobuf/.github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'untriaged'
assignees: ''

---

<!--

NOTE: this form is for feature requests (including cleanup requests) only. For questions or troubleshooting, please see the protobuf mailing list: https://groups.google.com/forum/#!forum/protobuf

-->


**What language does this apply to?**
If it's a proto syntax change, is it for proto2 or proto3?
If it's about generated code change, what programming language?

**Describe the problem you are trying to solve.**

**Describe the solution you'd like**

**Describe alternatives you've considered**

**Additional context**
Add any other context or screenshots about the feature request here.
8 changes: 8 additions & 0 deletions thirdparty/protobuf/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "github-actions" # Necessary to update action hashs
directory: "/"
schedule:
interval: "weekly"
# Allow up to 3 opened pull requests for github-actions versions
open-pull-requests-limit: 3
Loading