Commit Graph

148 Commits

Author SHA1 Message Date
Thomas Van Lenten
1bf4b38f29 Fix up handing of fields with leading names that should be all caps.
Add a compile test to confirm things are working as expected.
2016-03-08 09:29:49 -05:00
Josh Haberman
35227b4f31 Removed the generated Ruby file from Makefile.am. 2016-03-03 23:52:31 -08:00
Jon Skeet
7762f163a4 Rename Preconditions to ProtoPreconditions
(Generated code changes in next commit.)
2016-02-04 14:50:43 +00:00
Jon Skeet
a3ea9d1203 Rename GeneratedCodeInfo to GeneratedClrTypeInfo
Recently, descriptor.proto gained a GeneratedCodeInfo message, which means the generated code conflicts with our type.
Unfortunately this affects codegen as well, although this is a part of the public API which is very unlikely to affect hand-written code.

Generated code changes in next commit.
2016-02-04 07:05:49 +00:00
Jisi Liu
5221dcbe47 Integrate from google internal.
Java files are moved to un-do the hack in the prevous commit, which
moved the java files to the original position for integration.
2016-01-29 13:51:05 -08:00
Feng Xiao
ea956761cc Fix tests broken by the Java directory change.
Change-Id: I39c4eadbd28164cfd83aa2d1d8b6dfe8286db803
2016-01-14 14:29:51 -08:00
Feng Xiao
64d865210f Update README.md and remove INSTALL.txt
Added instructions on what tools to install to compile protobuf from
source. Removed the INSTALL.txt file because it's just a simple copy of
the autoconf documentation and confuses users.

Change-Id: I6fd8aa13495f1238fe5c62451b95ad480b1c4bed
2016-01-06 18:25:25 -08:00
Feng Xiao
b7610f129d Add missing files to EXTRA_DIST.
Also delete some unused files.
2015-12-28 14:18:49 -08:00
Feng Xiao
d217808417 Merge branch master into v3.0.0-beta-2 2015-12-21 00:34:19 -08:00
Thomas Van Lenten
d6590d6534 Drop all use of OSSpinLock
Apple engineers have pointed out that OSSpinLocks are vulnerable to live locking
on iOS in cases of priority inversion:
. http://mjtsai.com/blog/2015/12/16/osspinlock-is-unsafe/
. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000372.html

- Use a dispatch_semaphore_t within the extension registry.
- Use a dispatch_semaphore_t for protecting autocreation within messages.
- Drop the custom/internal GPBString class since we don't have really good
  numbers to judge the locking replacements and it isn't required. We can
  always bring it back with real data in the future.
2015-12-17 16:05:50 -05:00
Feng Xiao
1c10aca679 Add new files to Makefile.am 2015-12-14 14:04:09 -08:00
Feng Xiao
e841bac4fc Down-integrate from internal code base. 2015-12-11 17:10:28 -08:00
Thomas Van Lenten
a20d0b6cd4 Fix dist_clean and maintainer-clean to get more generated files. 2015-12-10 15:34:34 -05:00
Jon Skeet
c581acb562 Merge pull request #944 from jskeet/umbrella-classname
Change the way the "umbrella class" (descriptors) is named/namespaced
2015-11-19 08:48:50 +00:00
Thomas Van Lenten
42f2eee932 Cleanups of deps and ignores for conformance
- Hopefully complete the deps for other languages for the generated conformance proto sources.
- List the generated sources for cleanup by make's clean rules.
- Make the toplevel nuke the pyc files that can get created in the ObjC dir.
2015-11-16 11:29:59 -05:00
Jon Skeet
284bb452e4 Generated code changes and manual changes for previous commit. 2015-11-09 09:22:45 +00:00
Jon Skeet
0fb39c4afe Created a new exception for JSON failures.
This is only thrown directly by JsonTokenizer, but surfaces from JsonParser as well. I've added doc comments to hopefully make everything clear.

The exception is actually thrown by the reader within JsonTokenizer, in anticipation of keeping track of the location within the document, but that change is not within this PR.
2015-11-05 10:40:22 +00:00
Jon Skeet
fb2488225f Implement JSON parsing in C#.
This includes all the well-known types except Any.
Some aspects are likely to require further work when the details of the JSON parsing expectations are hammered out in more detail. Some of these have "ignored" tests already.

Note that the choice *not* to use Json.NET was made for two reasons:
- Going from 0 dependencies to 1 dependency is a big hit, and there's not much benefit here
- Json.NET parses more leniently than we'd want; accommodating that would be nearly as much work as writing the tokenizer
This only really affects the JsonTokenizer, which could be replaced by Json.NET. The JsonParser code would be about the same length with Json.NET... but I wouldn't be as confident in it.
2015-11-03 19:05:11 +00:00
Jisi Liu
8d8177c757 Merge remote-tracking branch 'origin/master' into fix-author 2015-10-05 13:54:05 -07:00
Jisi Liu
46e8ff63cb Down-integrate from google internal. 2015-10-05 11:59:43 -07:00
Thomas Van Lenten
ad2d5c926b Support enum forward decls in Objective C++
NS_ENUM changes defintion in Objective C++ based on the C++ spec being
compiled with, special case the one situation where it wouldn't support doing a
forward decl for the enum.
2015-10-01 09:03:30 -04:00
Jon Skeet
e50461d809 Pack/Unpack implementation for Any.
We still need the JSON representation, which relies on something like a DescriptorPool to fetch message types from based on the type URL. That will come a bit later.
(The DescriptorPool comment in this commit is just a note which will prove useful if we use DescriptorPool itself.)
2015-09-04 12:43:26 +01:00
Feng Xiao
fcdcf88d8a Fix merge conflict. 2015-08-26 20:35:35 -07:00
Feng Xiao
f900837afa Merge pull request #756 from TeBoring/beta-1
Add distribution for objc
2015-08-26 20:34:13 -07:00
Feng Xiao
a3312983d6 Update Makefile.am to include missing files. 2015-08-26 20:29:01 -07:00
Feng Xiao
99e1868586 Add missing files in dist. 2015-08-26 20:19:05 -07:00
Bo Yang
1c81d0f8be Add distribution for objc 2015-08-26 18:15:39 -07:00
Jisi Liu
4008100e37 Add bazel build/workspace into distribution.
Change-Id: I96fbe5c84a04f5d95c5484002404fc975f2abd21
2015-08-26 17:48:08 -07:00
Feng Xiao
b192ba87f7 Merge remote-tracking branch 'origin/master' into beta-1 2015-08-25 20:24:43 -07:00
Bo Yang
ff7bdad231 Fix bugs on windows 2015-08-25 17:58:48 -07:00
Dan O'Reilly
4a0129f680 Remove ez_setup.py from Makefile.am
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-08-20 15:33:01 -04:00
Jon Skeet
0f370b468b Remove a redundant layer of directory hierarchy. 2015-08-03 11:29:59 +01:00
Jan Tattermusch
e61b528b5a Update Makefile.am 2015-08-02 14:27:01 -07:00
Jon Skeet
68380f0f66 Rename ThrowHelper to Preconditions and make it public - we'll want to use it from the generated code soon.
Additionally, change it to return the value passed, and make it generic with a class constraint.
A separate method doesn't have the class constraint, for more unusual scenarios.
2015-07-30 13:36:45 +01:00
Jan Tattermusch
3783d9a8ad remove the freeze API 2015-07-29 20:26:20 -07:00
Jon Skeet
43d64b4f54 Fix typo in Makefile.am 2015-07-22 14:32:27 +01:00
Jon Skeet
17fd398e1a Fix file lists for C# 2015-07-22 11:40:52 +01:00
Jon Skeet
86cf61d448 Updated csharp_EXTRA_DIST for Travis 2015-07-17 10:14:29 +01:00
Jan Tattermusch
271cba2871 updated csharp_EXTRA_DIST 2015-07-16 11:25:16 -07:00
Jisi Liu
e6484d306d Fix distcheck.
Change-Id: I74e2d5958b5e7b15d10e5a6468bca917323b9739
2015-06-18 11:24:07 -07:00
Feng Xiao
e9a122eb19 Merge pull request #501 from xfxyjwf/down
Down-integrate from internal code base.
2015-06-17 13:12:11 -07:00
Jisi Liu
78d470c7a5 Make the code independent of config.h
Now the Build tool needs to define -DHAVE_ZLIB and -DHAVE-PTHREAD rather
than providing a config.h

- Make pbconfig.h a manually written file to handle hash conditions
  according to platform related macros.
- Remove #include "config.h" from source code.
- Changed the configure.ac and Makefile.am to pass down the macros.
- Change cmake to pass down the the macros.

Change-Id: I537249d5df8fdeba189706aec436d1ab1104a4dc
2015-06-16 18:27:36 -07:00
Feng Xiao
e96ff30120 Down-integrate from internal code base.
[ci skip]

Change-Id: I9391c09640e0b0b2b21c45a97a1fc91814d95c5d
2015-06-15 18:24:01 -07:00
Jisi Liu
80da6d3727 Remove the file from Makefile.am
Change-Id: I2015df2409aa95401af658b40023c8f9b9d75068
2015-06-13 11:22:31 -07:00
Thomas Van Lenten
0f2b4a0e82 Update podspec for files that can build now, rename assets to not need @ in the name. 2015-06-10 14:30:59 -04:00
Paul Yang
fb466c13a7 Merge pull request #480 from thomasvl/objc_beta_drop
Beta quality drop of Objective C Support.
2015-06-09 17:17:45 -07:00
Thomas Van Lenten
d846b0b059 Beta quality drop of Objective C Support.
- Add more to the ObjC dir readme.
- Merge the ExtensionField and ExtensionDescriptor to reduce overhead.
- Fix an initialization race.
- Clean up the Xcode schemes.
- Remove the class/enum filter.
- Remove some forced inline that were bloating things without proof of performance wins.
- Rename some internal types to avoid conflicts with the well know types protos.
- Drop the use of ApplyFunctions to the compiler/optimizer can do what it wants.
- Better document some possible future improvements.
- Add missing support for parsing repeated primitive fields in packed or unpacked forms.
- Improve -hash.
- Add *Count for repeated and map<> fields to avoid auto create when checking for them being set.
2015-06-08 17:17:22 -04:00
Feng Xiao
ee6b3d5529 Remove vsprojects. 2015-06-05 23:57:01 -07:00
Bo Yang
51de7a7141 Add new files to Makefile.am 2015-05-25 22:21:05 -07:00
Bo Yang
632e8e26ce Add csharp_EXTRA_DIST to all_EXTRA_DIST. 2015-05-25 20:20:54 -07:00
TeBoring
e9d0bb4aaa Add new files for java runtime to Makefile.am 2015-05-25 20:17:04 -07:00
Bo Yang
9907286855 Add csharp files to Makefile.am 2015-05-25 17:06:18 -07:00
Bo Yang
4edc1bbadf Add objectivec/generate_descriptors_proto.sh in Makefile.am 2015-05-25 16:18:12 -07:00
TeBoring
eef79f3ef0 Remove useless slash in Makefile.am 2015-05-25 13:08:09 -07:00
Bo Yang
50a765ba03 Fix bugs in objective-c. 2015-05-25 12:48:03 -07:00
Paul Yang
48f95941bc Merge pull request #410 from thomasvl/objc_alpha2_drop
Objective C Second Alpha Drop
2015-05-22 14:12:15 -07:00
Thomas Van Lenten
1dcc329427 Objective C Second Alpha Drop
- Style fixups in the code.
- map<> serialization fixes and more tests.
- Autocreation of map<> fields (to match repeated fields).
- @@protoc_insertion_point(global_scope|imports).
- Fixup proto2 syntax extension support.
- Move all startup code to +initialize so it happen on class usage and not app startup.
- Have generated headers use forward declarations and move imports into generated code, reduces what is need at compile time to speed up compiled and avoid pointless rippling of rebuilds.
2015-05-22 14:27:31 -04:00
Bo Yang
5db217305f down-integrate internal changes 2015-05-21 19:32:02 -07:00
Jorge Canizales
46b0a65702 Adds the podspec to objectivec_EXTRA_DIST in Makefile.am 2015-05-14 22:38:52 -07:00
Thomas Van Lenten
30650d81d9 Alpha 1 drop of Google's Objective C plugin and runtime support for protobufs. 2015-05-06 13:19:14 -04:00
Tamir Duberstein
dab96f19ee [PYTHON] Remove awkward duplicate tests
We already run all tests with and without `--cpp_implementation`
2015-04-10 19:43:50 -04:00
Tamir Duberstein
8ede2817a0 Remove useless file that doesn't load
This file was broken in ada6556.
2015-04-08 18:33:04 -04:00
Josh Haberman
35a1cc7a7c Added first version of conformance tests.
Change-Id: Ib75664194491643f8e4f1503a2ed942a2d1e1655
2015-04-08 13:14:10 -07:00
jesse
0481bf32c4 converted javanano README to markdown. Corrected Makefile 2015-03-17 12:14:55 -07:00
Jisi Liu
f8e7a46bc2 Merge pull request #221 from google/python_proto3
Proto3 Python changes for v3.0.0-alpha-2
2015-02-25 20:35:29 -08:00
Josh Haberman
0b70a43736 Fixes for Python/C++ implementation in open-source:
* Rosy hack doesn't apply (that test should be removed
    for the open-source release).

  * Added our own copy of parameterized.py (the open-source
    version of Google Apputils doesn't contain it).

  * The C++ Descriptor object didn't implement extension_ranges.

  * Had to implement a hack around returning EncodeError, to
    work around the module-loading behavior of the test runner.
2015-02-25 20:17:32 -08:00
Jisi Liu
df184fba00 Make maps fields work on installed C++ protobufs.
Change-Id: Id937e25bbb35968ee76c92bd4a8ce6247408c443
2015-02-25 15:56:58 -08:00
Jisi Liu
ff35de3ddd Include Ruby and JavaNano into dist packages.
Changes the automake to use tar-ustar for tarbal format, which supports
filenames exceeding 99-chars. Otherwise Nano source files cannot be
distributed.

Change-Id: I33e43148e317374cd46417bebb8559e40fac7299
2015-02-21 14:58:02 -08:00
Joshua Haberman
17e4419188 Merge pull request #168 from cfallin/ruby-oneof
Support oneofs in MRI Ruby C extension.
2015-02-02 13:29:15 -08:00
Feng Xiao
8ccaa42ffb Remove deleted files from Makefile.am. 2015-01-29 11:02:12 -08:00
Chris Fallin
b0670ddae7 Fix golden-file Ruby test to work with out-of-tree builds. 2015-01-14 16:46:10 -08:00
Feng Xiao
e7d562a242 Update ruby DIST_FILES. 2014-12-12 17:41:34 -08:00
Feng Xiao
52909485d1 Merge branch v3.0.0-alpha-1 into master.
Conflicts:
	configure.ac
2014-12-10 20:56:13 -08:00
Chris Fallin
973f425725 Provide a Ruby extension.
This adds a Ruby extension in ruby/ that is based on the 'upb' library
(now included as a submodule), and adds support for Ruby code generation
to the protoc compiler.
2014-12-09 16:55:59 -08:00
Feng Xiao
35ef68056c Add a missing Java dist file. 2014-12-03 15:45:28 -08:00
Feng Xiao
8f7dec8ee1 Add a ./configure flag "DIST_LANG" to select which langauge to include
in a distribution package.
2014-12-02 14:15:26 -08:00
Feng Xiao
6ef984af4b Down-integrate from internal code base. 2014-11-10 17:34:54 -08:00
Feng Xiao
aa51f2a38a Rename README.txt to README.md 2014-08-29 17:27:24 -07:00
Feng Xiao
e9c00d9dd0 Rename COPYING.txt to LICENSE for opensource compliance and update links
in README.txt.
2014-08-26 16:16:00 -07:00
jieluo@google.com
2d10b80f45 change Makefile.am 2014-08-13 23:17:39 +00:00
jieluo@google.com
bde4a3254a down integrate python opensource to svn 2014-08-12 21:10:30 +00:00
jieluo@google.com
4de8f55113 down integrate to svn 2014-07-18 00:47:59 +00:00
xiaofeng@google.com
caa66db018 Merge from tags/2.5.0rc1 to trunk 2012-12-04 18:44:24 +00:00
liujisi@google.com
33165fe0d5 Submit recent changes from internal branch. See CHANGES.txt for more details. 2010-11-02 13:14:58 +00:00
kenton@google.com
94fd2ad771 Make sure test_plugin.vcproj is included in dist. 2009-12-21 21:46:25 +00:00
kenton@google.com
fccb146e3f Massive roll-up of changes. See CHANGES.txt. 2009-12-18 02:11:36 +00:00
kenton@google.com
3c66c2e641 Allow dependents to use pkg-config to figure out what flags to pass to link against protobuf. 2009-08-03 21:31:25 +00:00
temporal
ad2cfe0375 Make sure lite MSVC projects get into dist. 2009-08-01 22:54:30 +00:00
kenton@google.com
39671e5309 Extend MAINTAINERCLEANFILES to include some things automatically added by libtoolize. 2009-07-31 21:46:11 +00:00
kenton@google.com
80b1d62bfc Submit recent changes from internal branch, including "lite mode" for
C++ and Java.  See CHANGES.txt for more details.
2009-07-29 01:13:20 +00:00
kenton@google.com
2cdba5baee Add Emacs editor mode. Contributed by Alexandre Vassalotti. 2009-05-01 21:03:20 +00:00
kenton@google.com
d37d46dfbc Integrate recent changes from Google-internal code tree. See CHANGES.txt
for details.
2009-04-25 02:53:47 +00:00
kenton@google.com
37ad00d2c4 Update bundled gtest to latest version (1.3.0) and include it as a
nested autoconf package rather than as raw source.  This way we can
trivially update it again in the future.

Actually, this change doesn't even include gtest in protobuf's SVN.
Instead, we auto-download it when autogen.sh is invoked.  Note that
it will be included in release distributions, though.

TODO:
* Add a configure option to use the system's installed gtest rather
  than the bundled copy.  Apparently the gtest maintainers are working
  on some general-purpose autoconf macros which will do this
  automagically.
* Update MSVC project files.
2009-04-21 21:00:39 +00:00
kenton@google.com
2d6daa72ab Push out changes from internal codebase.
All Languages
* Repeated fields of primitive types (types other that string, group, and
  nested messages) may now use the option [packed = true] to get a more
  efficient encoding.  In the new encoding, the entire list is written
  as a single byte blob using the "length-delimited" wire type.  Within
  this blob, the individual values are encoded the same way they would
  be normally except without a tag before each value (thus, they are
  tightly "packed").

C++
* UnknownFieldSet now supports STL-like iteration.
* Message interface has method ParseFromBoundedZeroCopyStream() which parses
  a limited number of bytes from an input stream rather than parsing until
  EOF.

Java
* Fixed bug where Message.mergeFrom(Message) failed to merge extensions.
* Message interface has new method toBuilder() which is equivalent to
  newBuilderForType().mergeFrom(this).
* All enums now implement the ProtocolMessageEnum interface.
* Setting a field to null now throws NullPointerException.
* Fixed tendency for TextFormat's parsing to overflow the stack when
  parsing large string values.  The underlying problem is with Java's
  regex implementation (which unfortunately uses recursive backtracking
  rather than building an NFA).  Worked around by making use of possesive
  quantifiers.

Python
* Updated RPC interfaces to allow for blocking operation.  A client may
  now pass None for a callback when making an RPC, in which case the
  call will block until the response is received, and the response
  object will be returned directly to the caller.  This interface change
  cannot be used in practice until RPC implementations are updated to
  implement it.
2009-01-22 01:27:00 +00:00
kenton@google.com
26bd9eee6e Integrate changes from internal code.
protoc
* Enum values may now have custom options, using syntax similar to field
  options.
* Fixed bug where .proto files which use custom options but don't actually
  define them (i.e. they import another .proto file defining the options)
  had to explicitly import descriptor.proto.
* Adjacent string literals in .proto files will now be concatenated, like in
  C.

C++
* Generated message classes now have a Swap() method which efficiently swaps
  the contents of two objects.
* All message classes now have a SpaceUsed() method which returns an estimate
  of the number of bytes of allocated memory currently owned by the object.
  This is particularly useful when you are reusing a single message object
  to improve performance but want to make sure it doesn't bloat up too large.
* New method Message::SerializeAsString() returns a string containing the
  serialized data.  May be more convenient than calling
  SerializeToString(string*).
* In debug mode, log error messages when string-type fields are found to
  contain bytes that are not valid UTF-8.
* Fixed bug where a message with multiple extension ranges couldn't parse
  extensions.
* Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on
  a message that contained no fields (but possibly contained extensions).
* Fixed ShortDebugString() to not be O(n^2).  Durr.
* Fixed crash in TextFormat parsing if the first token in the input caused a
  tokenization error.

Java
* New overload of mergeFrom() which parses a slice of a byte array instead
  of the whole thing.
* New method ByteString.asReadOnlyByteBuffer() does what it sounds like.
* Improved performance of isInitialized() when optimizing for code size.

Python
* Corrected ListFields() signature in Message base class to match what
  subclasses actually implement.
* Some minor refactoring.
2008-11-21 00:06:27 +00:00
kenton@google.com
7516a69050 Improve autogen.sh. 2008-09-30 20:55:25 +00:00
temporal
dd681ad786 More prep for 2.0.1:
* Fix version number test so that it accepts "2.0.1rc1".
* Add missing type_checkers.py to Makefile.am.
2008-08-18 22:55:31 +00:00
temporal
40ee551715 Initial checkin. 2008-07-10 02:12:20 +00:00