Skip to content

Commit 6d1cc2d

Browse files
lauraharkercopybara-github
authored andcommitted
Bump versions of protobuf, guava, error prone, and re2j deps
The protobuf bump in particular is to fix a C++ linking issue when building the Sonatype bundles: : (Exit 1): gcc failed: error executing CppLink command (from target @@protobuf+//:protoc) /usr/bin/gcc @bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/protobuf+/protoc-0.params collect2: fatal error: cannot find 'ld' compilation terminated. Looks like the older version is causing something to use the 'gold' linker, which is being removed : https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00001.html. #4220 PiperOrigin-RevId: 743643458
1 parent 9b8ab21 commit 6d1cc2d

File tree

3 files changed

+94
-63
lines changed

3 files changed

+94
-63
lines changed

MODULE.bazel

+24-12
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,61 @@
11
bazel_dep(name = "rules_java", version = "8.6.1")
22
bazel_dep(name = "rules_pkg", version = "1.1.0")
3-
bazel_dep(name = "protobuf", version = "29.1")
3+
bazel_dep(name = "protobuf", version = "30.2")
44
bazel_dep(name = "bazel_jar_jar", version = "0.1.5")
55
bazel_dep(name = "google_bazel_common", version = "0.0.1")
6-
76
bazel_dep(name = "rules_jvm_external", version = "6.6")
87

98
## START_MAVEN_ARTIFACTS_LIST
109
# List of external dependencies from Maven. Also update corresponding POM file below.
1110
MAVEN_ARTIFACTS = [
1211
"args4j:args4j:2.33",
1312
"com.google.code.gson:gson:2.9.1",
14-
"com.google.errorprone:error_prone_annotations:2.15.0",
13+
"com.google.errorprone:error_prone_annotations:2.5.1",
1514
"com.google.guava:failureaccess:1.0.1",
16-
"com.google.guava:guava:33.4.0-jre",
17-
"com.google.guava:guava-testlib:33.4.0-jre",
15+
"com.google.guava:guava:33.4.6-jre",
16+
"com.google.guava:guava-testlib:33.4.6-jre",
1817
"com.google.jimfs:jimfs:1.2",
19-
"com.google.protobuf:protobuf-java:3.25.6",
20-
"com.google.re2j:re2j:1.3",
18+
"com.google.protobuf:protobuf-java:4.30.2",
19+
"com.google.re2j:re2j:1.8",
2120
"com.google.truth.extensions:truth-proto-extension:1.4.4",
2221
"io.github.java-diff-utils:java-diff-utils:4.12",
2322
"org.apache.ant:ant:1.10.11",
2423
"org.jspecify:jspecify:0.3.0",
2524
]
2625

26+
# Pom and gradle files for Maven dependencies. Only used to automatically extract license
27+
# information, not as part of the actual build.
28+
#
29+
# Note: if a pom/gradle file is not checked into GitHub, please add the artifact name and license
30+
# url to ADDITIONAL_LICENSES below.
31+
#
2732
# After updating dependencies, please run the license check script from this directory:
2833
# ./license_check/third_party_license_test.sh --update
2934
#
3035
# Note the added "@" after version tag to make easier to extract the root url
31-
ORDERED_POM_OR_GRADLE_FILE_LIST = [
36+
ORDERED_POM_OR_GRADLE_FILE_LIST_FOR_LICENSE_CHECK = [
3237
"https://github.com/kohsuke/args4j/blob/args4j-site-2.33@/args4j/pom.xml",
3338
"https://github.com/google/gson/blob/gson-parent-2.9.1@/gson/pom.xml",
34-
"https://github.com/google/error-prone/blob/v2.15.0@/annotations/pom.xml",
39+
"https://github.com/google/error-prone/blob/v2.5.1@/annotations/pom.xml",
3540
"https://github.com/google/guava/blob/failureaccess-v1.0.1@/futures/failureaccess/pom.xml",
36-
"https://github.com/google/guava/blob/v32.1.2@/guava/pom.xml",
37-
"https://github.com/google/guava/blob/v32.1.2@/guava-testlib/pom.xml",
41+
"https://github.com/google/guava/blob/v33.4.6@/guava/pom.xml",
42+
"https://github.com/google/guava/blob/v33.4.6@/guava-testlib/pom.xml",
3843
"https://github.com/google/jimfs/blob/v1.2@/jimfs/pom.xml",
39-
"https://github.com/protocolbuffers/protobuf/blob/v3.25.6@/java/core/pom.xml",
4044
"https://github.com/google/re2j/blob/re2j-1.3@/build.gradle",
4145
"https://github.com/google/truth/blob/v1.4.4@/extensions/proto/pom.xml",
4246
"https://github.com/java-diff-utils/java-diff-utils/blob/java-diff-utils-parent-4.12@/java-diff-utils/pom.xml",
4347
"https://github.com/apache/ant/blob/rel/1.10.11@/src/etc/poms/ant/pom.xml",
4448
"https://github.com/jspecify/jspecify/blob/v0.3.0@/gradle/publish.gradle",
4549
]
4650

51+
# Additional GitHub links to license files for maven artifacts. Add an entry here only if there is
52+
# no pom or gradle file checked into GitHub. (The advantage of being able to use the pom/gradle file
53+
# is that we don't have to hardcode the artifact id here and can just read it from the file).
54+
# TODO: lharker - could we instead grab license information from the maven repository?
55+
ADDITIONAL_LICENSES = {
56+
"com.google.protobuf:protobuf-java": "https://github.com/protocolbuffers/protobuf/blob/v4.30.1/LICENSE",
57+
}
58+
4759
## END_MAVEN_ARTIFACTS_LIST
4860

4961
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

THIRD_PARTY_NOTICES

+40-40
Original file line numberDiff line numberDiff line change
@@ -440,46 +440,6 @@ License for package(s): ['com.google.jimfs:jimfs']
440440
See the License for the specific language governing permissions and
441441
limitations under the License.
442442

443-
===============================================================================
444-
===============================================================================
445-
===============================================================================
446-
447-
License for package(s): ['com.google.protobuf:protobuf-java']
448-
449-
Copyright 2008 Google Inc. All rights reserved.
450-
451-
Redistribution and use in source and binary forms, with or without
452-
modification, are permitted provided that the following conditions are
453-
met:
454-
455-
* Redistributions of source code must retain the above copyright
456-
notice, this list of conditions and the following disclaimer.
457-
* Redistributions in binary form must reproduce the above
458-
copyright notice, this list of conditions and the following disclaimer
459-
in the documentation and/or other materials provided with the
460-
distribution.
461-
* Neither the name of Google Inc. nor the names of its
462-
contributors may be used to endorse or promote products derived from
463-
this software without specific prior written permission.
464-
465-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
466-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
467-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
468-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
469-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
470-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
471-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
472-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
473-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
474-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
475-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
476-
477-
Code generated by the Protocol Buffer compiler is owned by the owner
478-
of the input file used when generating it. This code is not
479-
standalone and requires a support library to be linked with it. This
480-
support library is itself covered by the above license.
481-
482-
483443
===============================================================================
484444
===============================================================================
485445
===============================================================================
@@ -1013,3 +973,43 @@ David Megginson, [email protected]
1013973
===============================================================================
1014974
===============================================================================
1015975

976+
License for package(s): ['com.google.protobuf:protobuf-java']
977+
978+
Copyright 2008 Google Inc. All rights reserved.
979+
980+
Redistribution and use in source and binary forms, with or without
981+
modification, are permitted provided that the following conditions are
982+
met:
983+
984+
* Redistributions of source code must retain the above copyright
985+
notice, this list of conditions and the following disclaimer.
986+
* Redistributions in binary form must reproduce the above
987+
copyright notice, this list of conditions and the following disclaimer
988+
in the documentation and/or other materials provided with the
989+
distribution.
990+
* Neither the name of Google Inc. nor the names of its
991+
contributors may be used to endorse or promote products derived from
992+
this software without specific prior written permission.
993+
994+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
995+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
996+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
997+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
998+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
999+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1000+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1001+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1002+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1003+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1004+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1005+
1006+
Code generated by the Protocol Buffer compiler is owned by the owner
1007+
of the input file used when generating it. This code is not
1008+
standalone and requires a support library to be linked with it. This
1009+
support library is itself covered by the above license.
1010+
1011+
1012+
===============================================================================
1013+
===============================================================================
1014+
===============================================================================
1015+

license_check/third_party_license_test.py

+30-11
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ def get_license_from_pom(url):
100100
return license_content
101101

102102

103+
def get_license_from_absolute_url(url):
104+
license_content = get_file_from_github(url)
105+
if license_content is None:
106+
print('Cannot get license information for GitHub url: ', url)
107+
sys.exit(1)
108+
return license_content
109+
110+
103111
def main():
104112
parser = argparse.ArgumentParser(
105113
prog='ThirdPartyLicenseTest',
@@ -126,10 +134,15 @@ def main():
126134
ldict = {}
127135
exec(bzl_file_contents, globals(), ldict) # pylint: disable=exec-used
128136
maven_artifacts = ldict['MAVEN_ARTIFACTS']
129-
pom_gradle_filelist = ldict['ORDERED_POM_OR_GRADLE_FILE_LIST']
137+
pom_gradle_filelist = ldict[
138+
'ORDERED_POM_OR_GRADLE_FILE_LIST_FOR_LICENSE_CHECK'
139+
]
140+
additional_licenses = ldict['ADDITIONAL_LICENSES']
130141

131142
# Compare list lengths
132-
if len(maven_artifacts) != len(pom_gradle_filelist):
143+
if len(maven_artifacts) != len(pom_gradle_filelist) + len(
144+
additional_licenses
145+
):
133146
print(
134147
'artifact list length and pom/gradle file list length is not equal. ',
135148
'Please check the file :',
@@ -161,20 +174,26 @@ def main():
161174
'%s:%s' % (split_artifact_name[0], split_artifact_name[1])
162175
)
163176

164-
if artifact_list_from_github != artifact_list_from_maven:
177+
gh_artifact_set = set(
178+
artifact_list_from_github + list(additional_licenses.keys())
179+
)
180+
mvn_artifact_set = set(artifact_list_from_maven)
181+
if gh_artifact_set != mvn_artifact_set:
165182
print('Artifact names from github and maven are different.')
166-
print('Github artifact list: ', artifact_list_from_github)
167-
print('Maven artifact list: ', artifact_list_from_maven)
183+
print('----------')
184+
print('Github artifact list only: ', gh_artifact_set - mvn_artifact_set)
185+
print('Maven artifact list only: ', mvn_artifact_set - gh_artifact_set)
168186
sys.exit(1)
169187

170188
license_content_to_package = {}
171189
# Create a dictionary of license names to maven jar files
172-
for package in artifact_list_from_github:
173-
license_content = get_license_from_pom(package_name_to_pom[package])
174-
if license_content in license_content_to_package:
175-
license_content_to_package[license_content].append(package)
176-
else:
177-
license_content_to_package[license_content] = [package]
190+
for package, pom_url in package_name_to_pom.items():
191+
license_content = get_license_from_pom(pom_url)
192+
license_content_to_package.setdefault(license_content, []).append(package)
193+
194+
for package, url in additional_licenses.items():
195+
license_content = get_license_from_absolute_url(url)
196+
license_content_to_package.setdefault(license_content, []).append(package)
178197

179198
# Create THIRD_PARTY_NOTICES
180199
third_party_notices_content = ''

0 commit comments

Comments
 (0)