Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 Name: Protocol Buffers | 1 Name: Protocol Buffers |
| 2 Short Name: protobuf | 2 Short Name: protobuf |
| 3 URL: http://protobuf.googlecode.com/svn/trunk | 3 URL: https://github.com/google/protobuf |
| 4 License: BSD | 4 License: BSD |
| 5 License File: COPYING.txt | 5 License File: LICENSE |
| 6 Version: unknown | 6 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.
| |
| 7 Revision: r476 | |
| 8 Security Critical: yes | 7 Security Critical: yes |
| 9 | 8 |
| 10 Local files (not taken from upstream): | 9 Steps used to create the current version: |
| 11 README.chromium | 10 1. Pull the release from https://github.com/google/protobuf/releases |
| 12 config.h | 11 2. Use the cleanup_release.sh script to remove unnecessary files. |
| 13 descriptor2_pb.py | 12 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
| |
| 13 protobuf_lite.gypi, protobuf_nacl.gyp). | |
| 14 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.
| |
| 15 5. Apply patches in patches/ (see the description below): | |
| 14 | 16 |
| 15 A protobuf.gyp file has been added for building with Chromium. | 17 $ for patch in patches/*; do patch -s -p1 < $patch; done |
| 16 | 18 |
| 17 This code has been patched to support unknown field retention in protobuf-lite. | 19 For future releases, it will be worth looking into which patches still need |
| 18 See r62331 for the patch. | 20 to be applied. |
| 21 5. Generate descriptor_pb2.py using something like the following steps. Make | |
| 22 sure you've regenerated your buildfiles and will build protoc from the | |
| 23 newly-modified sources above. | |
| 19 | 24 |
| 20 This code has been patched to ensure that files in the target protobuf_lite | 25 $ cd $SRC_DIR |
| 21 do not include headers from protobuf_full. See r173228 for the patch. | 26 $ ninja -C out/Debug protoc |
| 27 $ cd third_party/protobuf/src | |
| 28 $ ../../../out/Debug/protoc --python_out=../python google/protobuf/descriptor .proto | |
| 29 $ cd .. | |
|
Peter Kasting
2016/04/06 22:35:39
Nit: Omit this last line
xyzzyz
2016/04/07 18:55:02
Done.
| |
| 22 | 30 |
| 23 This code has been patched to make the target protobuf_lite a component so that | 31 Copy the resulting descriptor_pb2.py to protobuf/. |
| 24 targets that depend on it can be componentized. See http://crbug.com/172800 for | 32 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
| |
| 25 details, and r179806 for the patch. | 33 7. Update README.chromium. |
| 26 | 34 |
| 27 Revision 504 was cherry-picked from upstream. | 35 Description of the patches: |
| 28 Revision 512 was cherry-picked from upstream. | |
| 29 Revision 516 was cherry-picked from upstream. | |
| 30 Revision 517 was cherry-picked from upstream. | |
| 31 Revision 522 was cherry-picked from upstream. | |
| 32 Revision 523 was cherry-picked from upstream. | |
| 33 Revision 524 was cherry-picked from upstream. | |
| 34 Revision 573 was cherry-picked from upstream. | |
| 35 The `&file->options() != NULL &&` was removed from descriptor.cc | |
| 36 References to `vector` were changed to `std::vector` in extension_set.h | |
| 37 and unknown_field_set.h | |
| 38 | 36 |
| 39 GetEmptyString() and GoogleOnceInit() have been uninlined, for a large savings | 37 - 0001-ignore-option-retain-unknown-fields.patch |
| 40 in binary size. | |
| 41 | 38 |
| 42 A BUILD.gn file has been added for building with GN. | 39 Previous versions of protobuf in Chromium carried a local patch that retained |
| 40 unknown fields in protobuf_lite mode. It was enabled by setting option | |
| 41 retain_unknown_fields = true in .proto file. Now that it is enabled by | |
| 42 default, this option is no longer recognized by protobuf, and so I had to | |
| 43 patch it so that I don't have to fix all .proto files in Chromium in a single | |
| 44 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.
| |
| 43 | 45 |
| 44 Cherry-pick pherl changes to make protobuf build on VS2015. | 46 - 0002-remove-support-for-unnecessary-languages.patch |
| 45 | 47 |
| 46 Cherry-pick c3cb53b (fix "sometimes-uninitialized" warning). | 48 This patch removes support for C#, Ruby, Objective-C, JS and other languages n ot |
| 49 used in Chromium from protoc, to decrease the package size. | |
| 47 | 50 |
| 48 Cherry-pick https://github.com/google/protobuf/commit/56a90a2081379a5 | 51 - 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
| |
| 49 | 52 |
| 50 Cherry-pick https://github.com/google/protobuf/commit/69d660b39ceabea | 53 This patch removes all static initializers from Chromium. The change in Status |
| 54 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.
| |
| 55 Chromium, which doesn't use this functionality yet. | |
| 51 | 56 |
| 52 Cherry-pick https://github.com/google/protobuf/commit/a74e912a8be1274 | 57 - 0004-fix-integer-types-and-shared-library-exports.patch |
| 58 | |
| 59 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.
| |
| 60 proto's int64 and others. It also allows exporting protobuf symbols in Linux | |
| 61 .so libraries. | |
| 62 | |
| 63 - 0005-fix-no-threadlocal-on-mac.patch | |
| 64 | |
| 65 Apple's Clang doesn't support thread-local variables on Mac. | |
| 66 | |
| 67 - 0006-fix-clang-type-errors.patch | |
| 68 | |
| 69 New versions of Clang have type checking semantics that check the conformance | |
| 70 with the C++ standard more thorougly, which makes them a bit more | |
| 71 restrictive. This is actually cherry-pick from protobuf upstream. | |
| 72 | |
| 73 - 0007-uninline_googleonce.patch | |
| 74 - 0008-uninline_get_empty_string.patch | |
| 75 - 0009-uninline-arenastring.patch | |
| 76 - 0010-uninline-generated-code.patch | |
| 77 | |
| 78 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.
| |
| 79 (somewhere between 500 KB and 1 MB) of binary size. | |
| OLD | NEW |