Treat missing declarations as an error for test builds, to prevent
future updates which add functions without properly declaring them.
This will prevent broken builds in more restrictive build environments.
An ifdef condition seems to have been inverted by mistake, causing the
dynamic initialization to occur for lite if and only if the
_NO_STATIC_INITIALIZER macro is set. This problem manifested itself as
segfaults due to uninitialized empty strings:
https://github.com/google/protobuf/issues/2839
Since no one complained about initialization not happening, it would
appear that we can just disable this initialization for lite
unconditionally, so that is what this change does. Instead of the
default instance initialization happening pre-main, it now always
happens lazily when needed.
Ran into an issue today where a machine had the `protoc` compiler but not the include files. Took a while to sort out, and this added note to the README included in every zip should help.
* Add php_generic_services option
* Generate PHP generic services
* Respect namespaces for generated PHP services
* Test PHP generated services
* Rename PHP generator service method doc comment function
* Correct phpdoc service method case
* Test namespaced PHP generic services
* Always use the FQCN for PHP generic service input/output
* Add generated_service_test to php test.sh
* Add php service test protos to CI
* Add php service files to php_EXTRA_DIST
* Use Interface suffix for php generic services
Both native_slot_merge and native_slot_merge_by_array have no return
type declared. GCC implicitly uses int as return type in such cases,
however, these functions are actually void.
Add some supporting documentation regarding Closure for those unfamiliar., Also substantiate details for "files in this directory" - including them all will result in a project that does not compile as some are used for test cases and aren't part of the core library.
In the generated code of previous versions, each php field is given an
initial value. In c extension, it was assumed that the field order in
the generated code is consistent with upb fields order, so that the
correct initial value can be bound to the correct upb field. However,
this may not be true. The order of fields in generated code is decided
by proto compiler, while the order of upb fields is decided by the hash
function used in c extension.
This PR fixes the issue by reset the initial value at runtime.