Chromium Code Reviews| Index: third_party/protobuf/README.chromium |
| diff --git a/third_party/protobuf/README.chromium b/third_party/protobuf/README.chromium |
| index 507037960d0eb6407c29d9cf03cfd189f57c717d..374018debbc7d5ae11e5ee1c1efcfb30c001c459 100644 |
| --- a/third_party/protobuf/README.chromium |
| +++ b/third_party/protobuf/README.chromium |
| @@ -1,52 +1,79 @@ |
| Name: Protocol Buffers |
| Short Name: protobuf |
| -URL: http://protobuf.googlecode.com/svn/trunk |
| +URL: https://github.com/google/protobuf |
| License: BSD |
| -License File: COPYING.txt |
| -Version: unknown |
| -Revision: r476 |
| +License File: LICENSE |
| +Version: 3.0.0-beta-2 |
|
Peter Kasting
2016/04/06 22:35:39
Nit: Add a Revision: field here as well.
xyzzyz
2016/04/07 18:55:02
Done.
|
| Security Critical: yes |
| -Local files (not taken from upstream): |
| -README.chromium |
| -config.h |
| -descriptor2_pb.py |
| +Steps used to create the current version: |
| +1. Pull the release from https://github.com/google/protobuf/releases |
| +2. Use the cleanup_release.sh script to remove unnecessary files. |
| +3. Add build files (BUILD.gn, proto_library.gni, protobuf.py, |
|
Peter Kasting
2016/04/06 22:35:39
There is no proto_library.gni or protobuf.py.
xyzzyz
2016/04/07 18:55:02
I mean protobuf.gyp (good catch), and with regards
|
| + protobuf_lite.gypi, protobuf_nacl.gyp). |
| +4. Add open-source library six.py to protobuf/third_party/six/six.py |
|
Peter Kasting
2016/04/06 22:35:39
Obtained how?
xyzzyz
2016/04/07 18:55:02
Done.
|
| +5. Apply patches in patches/ (see the description below): |
| -A protobuf.gyp file has been added for building with Chromium. |
| + $ for patch in patches/*; do patch -s -p1 < $patch; done |
| -This code has been patched to support unknown field retention in protobuf-lite. |
| -See r62331 for the patch. |
| + For future releases, it will be worth looking into which patches still need |
| + to be applied. |
| +5. Generate descriptor_pb2.py using something like the following steps. Make |
| + sure you've regenerated your buildfiles and will build protoc from the |
| + newly-modified sources above. |
| -This code has been patched to ensure that files in the target protobuf_lite |
| -do not include headers from protobuf_full. See r173228 for the patch. |
| + $ cd $SRC_DIR |
| + $ ninja -C out/Debug protoc |
| + $ cd third_party/protobuf/src |
| + $ ../../../out/Debug/protoc --python_out=../python google/protobuf/descriptor.proto |
| + $ cd .. |
|
Peter Kasting
2016/04/06 22:35:39
Nit: Omit this last line
xyzzyz
2016/04/07 18:55:02
Done.
|
| -This code has been patched to make the target protobuf_lite a component so that |
| -targets that depend on it can be componentized. See http://crbug.com/172800 for |
| -details, and r179806 for the patch. |
| + Copy the resulting descriptor_pb2.py to protobuf/. |
| +6. Add empty __init__.py to protobuf/. |
|
Peter Kasting
2016/04/06 22:35:39
You should remove this step and instead make the b
xyzzyz
2016/04/07 18:55:03
How do I deal with the six.py dependency then? Cur
Peter Kasting
2016/04/07 23:25:38
These instructions say to add an empty __init__.py
xyzzyz
2016/04/11 19:34:40
Yeah, the instructions are wrong, I'll update them
Peter Kasting
2016/04/11 19:54:45
I think I was thinking, "put six.py in third_party
xyzzyz
2016/04/11 20:13:28
I'm keeping the current solution then, and updatin
|
| +7. Update README.chromium. |
| -Revision 504 was cherry-picked from upstream. |
| -Revision 512 was cherry-picked from upstream. |
| -Revision 516 was cherry-picked from upstream. |
| -Revision 517 was cherry-picked from upstream. |
| -Revision 522 was cherry-picked from upstream. |
| -Revision 523 was cherry-picked from upstream. |
| -Revision 524 was cherry-picked from upstream. |
| -Revision 573 was cherry-picked from upstream. |
| -The `&file->options() != NULL &&` was removed from descriptor.cc |
| -References to `vector` were changed to `std::vector` in extension_set.h |
| -and unknown_field_set.h |
| +Description of the patches: |
| -GetEmptyString() and GoogleOnceInit() have been uninlined, for a large savings |
| -in binary size. |
| +- 0001-ignore-option-retain-unknown-fields.patch |
| -A BUILD.gn file has been added for building with GN. |
| + Previous versions of protobuf in Chromium carried a local patch that retained |
| + unknown fields in protobuf_lite mode. It was enabled by setting option |
| + retain_unknown_fields = true in .proto file. Now that it is enabled by |
| + default, this option is no longer recognized by protobuf, and so I had to |
| + patch it so that I don't have to fix all .proto files in Chromium in a single |
| + CL. |
|
Peter Kasting
2016/04/06 22:35:39
Unless you're going to be removing those options a
xyzzyz
2016/04/07 18:55:02
Done.
|
| -Cherry-pick pherl changes to make protobuf build on VS2015. |
| +- 0002-remove-support-for-unnecessary-languages.patch |
| -Cherry-pick c3cb53b (fix "sometimes-uninitialized" warning). |
| + This patch removes support for C#, Ruby, Objective-C, JS and other languages not |
| + used in Chromium from protoc, to decrease the package size. |
| -Cherry-pick https://github.com/google/protobuf/commit/56a90a2081379a5 |
| +- 0003-remove-static-initializers.patch |
|
Peter Kasting
2016/04/06 22:35:39
For this and most other patches below, are you in
xyzzyz
2016/04/07 18:55:02
Yes. However, not all of the stuff is likely to en
Peter Kasting
2016/04/07 23:25:38
So you made the Status changes as a way of fixing
xyzzyz
2016/04/11 19:34:40
I agree it would be nice to fix the upstream for g
Peter Kasting
2016/04/11 19:54:45
I'm OK in principle with "solve locally, upstream
xyzzyz
2016/04/11 20:13:28
I understand your concerns. I'm having hard time t
Peter Kasting
2016/04/11 20:16:55
Why doesn't "dynamically initialize on first use"
xyzzyz
2016/04/11 20:30:10
If I understand what you mean correctly, that woul
Peter Kasting
2016/04/11 20:54:51
OK, I looked again at the patch to re-familiarize
xyzzyz
2016/04/11 21:08:33
I'm in the process of doing that:
https://github.
Peter Kasting
2016/04/11 21:20:49
Thanks for those links.
Let's give them a day or
|
| -Cherry-pick https://github.com/google/protobuf/commit/69d660b39ceabea |
| + This patch removes all static initializers from Chromium. The change in Status |
| + class is not completely compatible, but it's compatible enough to work in |
|
Peter Kasting
2016/04/06 22:35:39
Not completely compatible with what?
xyzzyz
2016/04/07 18:55:03
With upstream, see my comment above.
|
| + Chromium, which doesn't use this functionality yet. |
| -Cherry-pick https://github.com/google/protobuf/commit/a74e912a8be1274 |
| +- 0004-fix-integer-types-and-shared-library-exports.patch |
| + |
| + This patch fixes some unfortunate choices for integer types corresponding to |
|
Peter Kasting
2016/04/06 22:35:39
Nit: "unfortunate choices" is vague, be specific a
xyzzyz
2016/04/07 18:55:02
Done.
|
| + proto's int64 and others. It also allows exporting protobuf symbols in Linux |
| + .so libraries. |
| + |
| +- 0005-fix-no-threadlocal-on-mac.patch |
| + |
| + Apple's Clang doesn't support thread-local variables on Mac. |
| + |
| +- 0006-fix-clang-type-errors.patch |
| + |
| + New versions of Clang have type checking semantics that check the conformance |
| + with the C++ standard more thorougly, which makes them a bit more |
| + restrictive. This is actually cherry-pick from protobuf upstream. |
| + |
| +- 0007-uninline_googleonce.patch |
| +- 0008-uninline_get_empty_string.patch |
| +- 0009-uninline-arenastring.patch |
| +- 0010-uninline-generated-code.patch |
| + |
| + These patches uninline some functions that results in a significant reduction |
|
Peter Kasting
2016/04/06 22:35:39
Nit: "functions that results" -> "functions, resul
xyzzyz
2016/04/07 18:55:03
Done.
|
| + (somewhere between 500 KB and 1 MB) of binary size. |