A series of improvements:
- Improved Protobuf module compatibility (disabled by default);
- Hide advanced settings;
- Added build tree configuration;
- Added build of examples.
Add more context to GPBCodedInputStream failures.
Have GPBMessage parsing apis extract out the GPBCodedInputStream information and expose it.
Update HeaderDocs with pointers to all error domains/codes.
Expand the unittests to cover the full set of errors reported.
Fixes https://github.com/google/protobuf/issues/1618
Users often encounter a Python import error when trying to build Python
protos if protobuf is installed locally on the machine. In this case,
Python ends up looking in the wrong directory when importing files (see
bazelbuild/bazel#1209 and tensorflow/tensorflow#2021). It seems that the
problem is caused by Python getting confused when there are Python
source files that are meant to be part of the same package but are
in separate directories.
Prior to #1233, the Bazel build setup would copy the Python
runtime sources and all generated sources for the builtin protos into
the root directory (assuming that the protobuf tree is vendored in a
google/protobuf directory).
With #1233, the two sets of sources are kept in their respective
directories but both `src/` and `python/` are added to the `PYTHONPATH`
using the new `imports` attribute of the Bazel Python rules. However,
both the runtime sources and the generated sources are under the same
package: `google.protobuf`, causing Python to become confused when
trying to import modules that are in the other directory.
This patch adds a workaround to the Bazel build to add a modified
version of the original `internal_copied_filegroup` macro to copy the
`.proto` files under `src/` to `python/` before building the
`py_proto_library` targets for the builtin protos. This ensures that the
generated sources for the builtin protos will be in the same directory
as the corresponding runtime sources.
This patch was tested with the following:
* All Python tests in protobuf
* All Python tests in tensorflow
* All tests in [Skydoc](https://github.com/bazelbuild/skydoc)
* Importing protobuf as `//google/protobuf`
* Importing and binding targets under `//external`
* Importing protobuf as `//third_party/protobuf`
Working on https://github.com/google/protobuf/issues/1599, specifically:
- Turn on more warnings that the Xcode UI calls out with individual controls.
- Manually add:
-Wundef
-Wswitch-enum
- Manually add and then diable in the unittests because of XCTest's headers:
-Wreserved-id-macro
-Wdocumentation-unknown-command
- Manually add -Wdirect-ivar-access, but disable it for the unittests and in
the library code (via #pragmas to suppress it). This is done so proto users
can enable the warning.
- Move the ObjC tests into the list and exclude them on linux, this will change
where in the order they start, since they are longer, it will have other
things run in parallel instead of them ending up last and taking the longest.
- Switch to the Xcode 7.3 image.
- Drop the use of xctool and stream line things through the full_mac_build.sh
script. This means we end up with only one build script instead of two.
- Tweaks to the mac build script:
- Make iOS Xcode version support explicit
- Support Debug/Release only building
- Change the OS X min parallel count to 2 to better deal with VMs.
- Split the travis ios tests into the two Xcode Configurations as the logs are
choking travis.