We have code for converting C/C++/Objc keywords that appear in protos
to convert them so that they can be compiled.
One of the things we need to be careful of is accidentally overriding methods
that Apple declares in NSObject. It turns out that we have run into issues
where we conflict with "hidden" methods in NSObject or methods added by
categories. method_dump.sh collects all of the methods we care about for
macOS and iOS and dumps them into objectivec_nsobject_methods.h which
is then included in objectivec_helpers.cc as part of the build.
Added a pile of tests to verify that conversions are happening as expected.
This unbreaks the Windows shared-library build of Chrome when using
Clang versions based on r344987 or later, see https://crbug.com/901776
implicit_weak_message.cc is part of protobuf_lite.dll, and it includes
wire_format_lite.h, which includes the dllexport inline function
WireFormatLite::WriteGroupToArray which will therefore be emitted.
WriteGroupToArray in turn calls the inline function
InternalWriteGroupToArray, however that definition is provided in the
_inl file. To make sure the definition is available, the _inl file must
be included.
Before Clang r344987 the build worked anyway due to luck, because
InternalWriteGroupToArray was emitted into other object files (e.g. in
wire_format_lite.obj). After that Clang revision, those definitions
started getting inlined, and so are longer available and cause a link
failure for the reference from implicit_weak_message.obj.
* Add support for primitive types in setters
* Update to address PR feedback
* Add tests and fixes for repeated fields
* Remove repeated field code, add getters
* Cleanup, test getters and oneofs
* Move boxing logic into separate class
* Add tests for wrapper type constructor args
* Update to add new setXXXValue methods
* Fix tests for invalid values
* Fix c extension for wrapper accessors
* Fix the bug that well known types didn't call Message_construct
* Address PR comments
* Refactoring init message with array logic
* Add include path to protoc
* Add missing TSRM_LS defintion
* Fix TSRM_LS
* Fix dist check
This change only adds basic proto2 support without advanced features
like extensions, custom options, maps, etc.
The protoc binary now generates ruby code for proto2 syntax.
However, for now, it is restricted to proto2 files without advanced features
like extensions, in which case it still errors out.
This change also modifies the DSL to add proto messages to the DescriptorPool.
There is a new DSL Builder#add_file to create a new FileDescriptor. With this,
the generated ruby DSL looks something like:
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file "test.proto" do
add_message "foo" do
optional :val, :int32, 1
end
end
end
This will find .bat files as well as .exe.
Only affects the case when plugins are invoked from PATH.
This does not change behaviour when compiled under Cygwin..
1. Fix C++ tests.
* Add missing files to Makefile.am and fix distcheck in tests.sh
* Remove BUILT_SOURCES from conformance/Makefile.am.
* Add some missing override keyword.
* Add a type cast to int64 because our StrCat() in stubs can't handle size_t.
2. Fix Java tests.
* Add missing test dependency on guava in pom.xml.
* Include newly referenced test data in test resources.
* Manually fix map_lite_test.proto which is overwritten because it's mapped
from map_test.proto in google3.
* Add back "optimize_for = LITE_RUNTIME" which is still needed to keep the
opensource test passing as it's still running lite tests.
* Add a type cast in newBuilder() because without it the code doesn't compile
with openjdk javac 1.8 (the compiler can't figure if it's the right type
due to complex generic typing).
3. Fix Python tests.
* Remove/replace references to <hash_map>.
* Suppress more warnings in setup.py.
* Replace incorrect header inclusion for google/protobuf/proto_api.h.
* Add strings::EndsWith to google/protobuf/stubs/strutil.h because it's
referenced in the updated python C extension code.
* Replace proto2 with google::protobuf. The proto2 name is leaked to
opensource because we removed the subsitition rule for proto2 namespace
but only fixed C++ source code and forgot to update python C extension code.
On Windows, both '/' and '\' are valid path separators. So when creating
the parent directories, split the filename on both
Signed-off-by: Akshat Gokhale <agokhale@pivotal.io>
The old version had a NOP for loop, which doesn't make sense. I'm pretty
sure this was the original intention. Newer GCC's
-Wunused-but-set-variable flags the old version.
The std::iterator class is being deprecated on MSVC++,
and currently if the compilation flag /std:c++latest
is used a warning is issued in this regard if any
iterators use the class as a base class.
If an external source file being compiled includes
the repeated_field.h header, the iterator clases
RepeatedPtrIterator and RepeatedPtrOverPtrsIterator
trigger the warning.
This change solves the warning and should avoid it in
the future when the default is to remove the class.
Using typedef instead of the modern "using x = y;"
to make it also work on VS2015.