Commit Graph

44 Commits

Author SHA1 Message Date
zhangskz
5bbb8f7b2c
Update upb commit to include fix for segmentation fault when instantiating field via repeated field assignment (#10066) 2022-05-27 12:16:33 -04:00
zhangskz
16a86804c0
Update upb commit/sha256 to include updated python wheel (#10058) 2022-05-26 15:36:41 -04:00
Joshua Haberman
364852e829 Throw a more helpful error if generated code is out of date, and fixed two reference leaks. 2022-05-17 22:51:01 +00:00
Joshua Haberman
8353e19756 Updated to the newest upb, which brings many fixes for Windows builds. 2022-05-16 17:10:27 +00:00
Joshua Haberman
6018e9edef Minor CHANGES.txt fix and pulled one more upb commit. 2022-05-10 16:28:53 +00:00
Joshua Haberman
915d439df0 Updated the release notes and the upb version.
Also removed the obsolete PROTOBUF_VERSION variable now that
upb is updated.
2022-05-10 06:31:57 +00:00
Joshua Haberman
49d6b35576 Updated to upb for -rc1. 2022-05-06 00:15:33 +00:00
Deanna Garcia
d62c6240c3 Update UPB version 2022-04-27 18:56:45 +00:00
Joshua Haberman
4152d8d160 Updated upb.
As of this update, you can test Python/upb with:

```
$ bazel test @upb//python/...
```
2022-04-27 00:37:30 +00:00
Joshua Haberman
01691f6092
Eliminated git_repository() in favor of HTTP archives. (#9861)
* Eliminated git_repository() in favor of HTTP archives.

Also factored out logic for github archives into its own macro.

* Sorted entries and ran buildifier.

* Removed the import of git_repository.
2022-04-26 12:27:59 -07:00
Joshua Haberman
a6901f057e
Added a Bazel dependency for upb (#9812)
* WIP.

* Restore deleted __init__.py files.

* Updated version of upb.

* Moved upb from a submodule to a Bazel dep.

* Updated to new upb which can tolerate missing system_python.

* Updated to a new upb.
2022-04-25 15:00:57 -07:00
David L. Jones
83303ba906
Update rules_pkg to version 0.7.0. (#9833)
Notably, bazelbuild/rules_pkg 0.6.0 added the ability for `pkg_filegroup`s to depend on other `pkg_filegroup`s.
2022-04-21 17:38:03 -07:00
Adam Cozzette
9bf0aca7db
Update protobuf_deps.bzl to add a dependency on Abseil (#9752)
This is the most recent Abseil LTS branch, from November 2021. We do not
yet use Abseil for anything, but this change will make it possible to
start using it in Bazel when we're ready.
2022-04-08 09:12:05 -07:00
Mike Kruskal
ffe4b0cfe6 Merge branch '3.20.x' into 3.20.x-202204011233 2022-04-01 12:34:01 -07:00
Elliotte Rusty Harold
61dcf50b85
Update Guava to 31.1 (#9707)
* start work on open source build instructions

* subprojects

* JDK17

* update Guava to 30.1-jre

* pin dependencies
2022-03-30 16:52:15 -04:00
Adam Cozzette
faa42e900c
Revert "Use repo-relative labels wherever possible (#9187)" (#9696)
This reverts commit 11de748d66.
2022-03-29 15:50:39 -04:00
Elliotte Rusty Harold
575d56bf85
sync JUnit version (#9662) 2022-03-22 21:54:53 +00:00
Adam Cozzette
f7232f2aa3 Replace EasyMock dependency with Mockito and re-pin Bazel deps 2022-03-02 19:27:59 +00:00
Deanna Garcia
aafcb92f62 kotlin core maven export 2022-02-28 18:28:50 +00:00
Deanna Garcia
7924cd6726 Addressing comments 2022-01-13 00:10:23 +00:00
Deanna Garcia
dfd99e7ec0 Adding kotlin bazel tests 2022-01-12 21:54:30 +00:00
Elliotte Rusty Harold
b73f78d32c
update GSON to 2.8.9 (#9367) 2022-01-05 21:23:54 +00:00
Derek Perez
3a4d9316aa
Creates a protoc release zip (#9188)
* Creates a protoc release zip

Mimics what we're doing manually today but powered by Bazel.

* don't special case this.

* Addressing feedback.

* adding comment about _cc_toolchain
2021-11-04 15:57:29 -07:00
Xùdōng Yáng
11de748d66
Use repo-relative labels wherever possible (#9187)
* Use repo-relative labels wherever possible

The label `@com_google_protobuf//:foo` within the protobuf repo is often synonymous with just `//:foo`. We should prefer the latter as it allows us to use a shorter name for the module in the Bazel Central Registry (so just "protobuf" instead of "com_google_protobuf").

Note that the semantics can be subtle: in a macro, plain strings are anchored to the *calling* repo, so if we just use `//:foo` as the default value of a macro argument, it will be resolved to `@myrepo//:foo` if the macro is called from the repo `@myrepo`. In this case, it's necessary to directly call the `Label()` constructor to anchor the string label to the repo where the .bzl file lives.

See https://github.com/bazelbuild/bazel-central-registry/pull/28#issuecomment-954741081 for a bit more context.

* fix protobuf_deps.bzl
2021-11-04 07:56:32 -07:00
Adam Cozzette
c7dfd0d6b9
Align dependency handling with Bazel best practices (#9165)
This commit removes the use of bind() since that function goes against
Bazel best practices:
https://docs.bazel.build/versions/main/external.html#repository-rules-1
The bind() function basically maps a dependency into //external, but
there is no good reason to do this. By mapping dependencies into
//external and relying on this in our own BUILD files, we're forcing
projects that depend on us to do the same. The one bind() call that I
did leave in place was //:python_headers. This one seems to be doing
something complicated I don't fully understand, and I don't want to risk
breaking it.

This change also moves our list of required Maven artifacts into a
constant in protobuf_deps.bzl. This way, projects that depend on us can
refer to this list when they invoke maven_install() and automatically
pull in all the necesary dependencies.

This fixes #9132.
2021-10-28 10:34:54 -07:00
Dirk Boye
9eba6eddce
update rules_python dependency to version 0.1.0 (#8214)
other bazel libraries (e.g. rules_docker 0.15.0) require rules_python 0.1.0
or above. running protobuf_deps() before importing rules_docker
will lead to errors.

upgrading rules_python fixes this problem.
2021-10-13 13:54:54 -07:00
Adam Cozzette
f8a22b45c0
Remove references to six (#9096)
We no longer support Python 2 and therefore no longer need to depend on
six. I'm hoping this will make it possible to merge #8214.
2021-10-13 13:51:09 -07:00
c-parsons
d652d8059c
Update rules_jvm_external to 4.1 (#8800) 2021-07-08 09:05:05 -07:00
Derek Perez
bc45f92262
Bazel powered Java testing (#8506)
* Protobuf Java/Core Tests running w/ Bazel.

Also integrates rules_jvm_external and migrates existing maven deps
in place.

* Add test_suite target that maps to rule name.

* Lite tests passing in Bazel

* util tests passing with Bazel.

* Add conformance and build testing to //java:core

* Cleanup bzl style and lock down access to failure lists.

* Adding Java Lite conformance tests.

* rm newline

* parameterize conformance_test

This makes usage of failure lists more explicit.

* restrict visibility more for newly added libs and fix formatting.

* fix formatting and visibility.

* move testing.bzl to an internal package.

* fix file formatting.

* moving conformance_test to internal.bzl
2021-04-20 11:36:32 -07:00
Dor
ee04809540
Use a newer version of rules_proto, with the new rule proto_descriptor_set (#8469) 2021-04-09 11:12:25 -07:00
Keith Smiley
0110ff5659 Update rules_proto
This was pretty behind 97d8af4dc4...4029855629
2020-09-03 09:23:28 -07:00
Andreas Herrmann
24fa9550be Update rules_cc
The previous version does not mark the `toolchain_type` as public,
meaning that users of a CC toolchain using
`@rules_cc//cc:toolchain_type` will get build errors along the lines of
```
ERROR:
.../local_config_cc_toolchains/BUILD.bazel:18:1:
in toolchain rule
@local_config_cc_toolchains//:cc-toolchain-armeabi-v7a: alias
'@rules_cc//cc:toolchain_type' referring to target
'@bazel_tools//tools/cpp:toolchain_type' is not visible from target
'@local_config_cc_toolchains//:cc-toolchain-armeabi-v7a'. Check the
visibility declaration of the former target if you think the dependency
is legitimate
```
2020-05-29 13:05:23 -07:00
Yannic
948740bc9d [bazel] Fix blacklisted_protos in cc_toolchain and add test (#7075) 2020-01-15 10:27:35 -08:00
Yannic
e907a8781d Update protobuf_deps.bzl 2019-10-28 16:28:41 -07:00
Yannic Bonenberger
29d650aefb [bazel] Add strip_prefix to download of @six
This way, we can avoid an unnecessary copy.
2019-10-28 16:28:41 -07:00
Keith Smiley
516f8b1560 bazel: Change zlib URL to GitHub
We've notice significant issues downloading from zlib.net. Since there
are already other archives coming from GitHub, this shouldn't negatively
affect reliability.
2019-08-29 11:11:19 -07:00
Adam Liddell
8199a01ff4 Move six.BUILD to third_party and update paths 2019-08-15 14:53:59 -07:00
Adam Liddell
23e520e7fc Update six version to 1.12.0 and fix legacy_create_init issue
When the @six//:six library is used on a target without the
`legacy_create_init` flag disabled, the library will not be
usable due to __init__.py being empty and the six code will
be in six.py. This change forces six to occupy the __init__
name, preventing this file getting created regardless of
the `legacy_create_init` setting.

See comments on a74c43bbd9 for
context:
a74c43bbd9
2019-08-15 14:53:59 -07:00
Yannic Bonenberger
d2d6ff51a8 [bazel] Load python rules from @rules_python 2019-08-06 16:50:32 -07:00
Yannic Bonenberger
bf0c69e130 [bazel] Add fixes for --incompatible_load_{cc,java,proto}_rules_from_bzl (Part 2)
This change adds the required loads to examples and zlib.
For full compatibility with --incompatible_load_{cc,java,proto}_rules_from_bzl,
we will need to roll gtest to a newer version.
2019-07-29 14:14:04 -07:00
Yannic Bonenberger
6e8991981a [bazel] Add fixes for --incompatible_load_{cc,java,proto}_rules_from_bzl 2019-07-24 10:10:22 -07:00
Adam Liddell
a74c43bbd9 Fix usage of six in //:protobuf_python rule and add import (#6310)
* Fix reference to six in //:protobuf_python rule

* Add six to protobuf_deps.bzl

* Use six archive directly as repo @six
2019-07-15 16:35:19 -07:00
Nic McDonald
f313b9ccf7 comply with Bazel recommendations 2019-04-15 13:43:05 -07:00
Kent Ross
b6375e03aa create importable function for defining zlib 2019-02-26 11:27:20 -08:00