Commit Graph

3251 Commits

Author SHA1 Message Date
Jon Skeet
567579b505 JSON formatting for Any. 2015-12-02 07:26:55 +00:00
Feng Xiao
bdabaeb03d Merge pull request #1016 from tswast/tutorial-regions
Add region tags for protocol buffers tutorials.
2015-12-01 18:00:31 -08:00
Tim Swast
bc4723481a Add region tags for protocol buffers tutorials.
Since these tags might be confusing, added a note that these are not
part of the normal protocol buffers syntax.  I also linked to the main
tutorials page that uses these examples
https://developers.google.com/protocol-buffers/docs/tutorials so that
anyone who arrived here without going through that info first can get
more explanation if they want.
2015-12-01 17:07:18 -08:00
Damien Martin-Guillerez
cc42db83d3 Fix headers for gmock.BUILD
Bazel 0.1.2 fix strict header checks and sandboxing for C++
rules. This change add the necessary headers for gmock so
the headers get shipped in the sandbox.
2015-12-01 22:52:42 +01:00
Feng Xiao
1a59a715dc Merge pull request #998 from tswast/goexample
Add a Go language example.
2015-11-30 13:43:56 -08:00
Feng Xiao
f4e4be6386 Merge pull request #1011 from c0nk/wip-implicit-cast-fix
Fix some narrowing implicit casts [NFC]
2015-11-30 10:40:51 -08:00
Kal Conley
a52539a32d Fix some narrowing implicit casts [NFC] 2015-11-28 20:22:25 -08:00
Feng Xiao
d3cb5f4078 Merge pull request #1007 from dlh3/patch-1
Fix minor typo in LazyField javadoc
2015-11-25 11:04:05 -08:00
Tim Swast
7e31c4d930 Add a Go language example.
This follows the other examples so that it can be used as a tutorial,
such as the ones at:
  https://developers.google.com/protocol-buffers/docs/tutorials

Even though Go generally does not use Makefiles, I added targets for the
Go examples to be consistent with the other languages.

Edit:

Fix Travis run. Change to use $HOME instead of ~. Add protoc to path.
GOPATH entry cannot start with shell metacharacter '~': "~/gocode"

Edit(2):

Fix Go code style to address comments.
2015-11-25 10:46:35 -08:00
Dave Hughes
62c4efa1d6 Fix typo in LazyField javadoc
"equals".equals("euqals") == false
2015-11-24 22:39:23 -08:00
Feng Xiao
d8b6452e37 Merge pull request #1005 from oon3m0oo/emscripten
Adds support for building protobuf with emscripten
2015-11-24 15:22:06 -08:00
Craig Donner
8e869f7627 Adds support for buliding protobuf with emscripten; we just needed the proper platform define used in the right place. 2015-11-24 15:07:18 -08:00
Thomas Van Lenten
b640f216a5 Merge pull request #1003 from sainaetr/patch-1
Update GPBProtocolBuffers.h
2015-11-23 17:37:36 -05:00
Osman Cihangir
f1e14fba23 Update GPBProtocolBuffers.h 2015-11-24 00:16:29 +02:00
Thomas Van Lenten
bc6a85dbac Merge pull request #1001 from thomasvl/fix_last_objc_conformance_tests
Set the stream limit to the length of the data.
2015-11-23 14:08:11 -05:00
Thomas Van Lenten
ba800e2e57 Set the stream limit to the length of the data.
- Mark all conformance tests as now passing.
2015-11-23 12:23:27 -05:00
Thomas Van Lenten
4e3388168d Merge pull request #980 from thomasvl/obj_conformance
Add support for the conformance test for objc when run on OS X
2015-11-23 12:04:47 -05:00
Anders Carling
3a5f213cca Invoke super implementation instead of raising error 2015-11-23 14:53:33 +01:00
Jon Skeet
41824d93e5 Merge pull request #990 from jskeet/naming
Tidying up reflection further
2015-11-22 19:59:11 +00:00
Jon Skeet
a2667aafd8 Generated code changes for previous commit (basically InternalBuildGeneratedFileFrom => FromGeneratedCode) 2015-11-22 16:30:36 +00:00
Jon Skeet
72ec33676f Tidy up reflection in advance of attempting to implement DynamicMessage.
There are corner cases where MessageDescriptor.{ClrType,Parser} will return null, and these are now documented. However, normally they *should* be implemented, even for descriptors of for dynamic messages. Ditto FieldDescriptor.Accessor.
We'll still need a fair amount of work to implement dynamic messages, but this change means that the public API will be remain intact.

Additionally, this change starts making use of C# 6 features in the files that it touches. This is far from exhaustive, and later PRs will have more.

Generated code changes coming in the next commit.
2015-11-22 16:25:44 +00:00
Jon Skeet
d6202a9b89 Merge pull request #994 from jskeet/type-registry
Added the type registry in advance of implementing Any support.
2015-11-22 16:24:27 +00:00
Jon Skeet
f7e43c6f80 Added the type registry in advance of implementing Any support.
Biting off just this bit first as I don't need the changes from a previous PR for this part.
2015-11-21 03:34:58 +00:00
Anders Carling
0559f3ee9e Add field name to initialization map exceptions 2015-11-20 21:57:28 +01:00
Anders Carling
8bcd0d7fc7 Use same exception class in ruby and jruby 2015-11-20 21:56:04 +01:00
Anders Carling
0df1e398eb Raise NoMethodError for unknown fields
More informative and more ruby-like
2015-11-20 21:55:18 +01:00
Jan Tattermusch
956a770adc Merge pull request #988 from gabikliot/CSharp-SampleUsage-Big-Fix
Fixed a bug in CSharp SampleUsage.
2015-11-19 20:02:18 -08:00
Jan Tattermusch
562372e53a Merge pull request #989 from jskeet/rename-umbrella
Rename "umbrella" to "reflection" consistently.
2015-11-19 16:31:19 -08:00
Jisi Liu
fa8e2911bb Merge pull request #977 from lberki/master
add headers
2015-11-19 14:39:54 -08:00
Gabriel Kliot
bdec990703 Removed redundant comment. 2015-11-19 08:05:05 -08:00
Jon Skeet
a6361a124a Rename "umbrella" to "reflection" consistently.
This changes csharp_names.h, which will require a corresponding change in GRPC.
2015-11-19 13:05:17 +00:00
Jon Skeet
ff37edcd8a Merge pull request #974 from jskeet/parser
Parser property in MessageDescriptor
2015-11-19 12:36:51 +00:00
Jon Skeet
360feda5f7 Finished an implementation comment 2015-11-19 09:40:49 +00:00
Jon Skeet
eadd4caa09 Generated code from previous commit. 2015-11-19 09:38:49 +00:00
Jon Skeet
2a15051a1e Introduce a Parser property into MessageDescriptor, and populate it from generated types.
Generated code coming in next commit - in a subsequent PR I want to do a bit of renaming and redocumenting around this, in anticipation of DynamicMessage.
2015-11-19 08:50:28 +00: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
Gabriel Kliot
09d03dfc7e Fixed a bug in CSharp SampleUsage. 2015-11-18 23:09:05 -08:00
Thomas Van Lenten
1745f7eae9 Add support for the conformance test for objc when run on OS X 2015-11-18 11:58:19 -05:00
Thomas Van Lenten
8162451b72 Merge pull request #984 from thomasvl/prefix_validation_tweaks
Reorder the checks so anything in the expected file is an implicit whitelisting
2015-11-18 10:43:19 -05:00
Thomas Van Lenten
2a91c64f49 Reorder the checks so anything in the expected file is an implicit whitelisting.
In the old flow, any 2 char prefix in the expected file was still generating a
warning about being a poor prefix. Now we check the expected file first, so
anything expected is let through.
2015-11-17 16:48:59 -05:00
Jisi Liu
6a3d6d9fd5 Merge pull request #982 from pherl/bazel_test
Make the cc wkt proto target public.
2015-11-17 12:44:29 -08:00
Jisi Liu
6a40bf89d3 Make the cc wkt proto target public. 2015-11-17 12:37:56 -08:00
Joshua Haberman
496826efa0 Merge pull request #978 from thomasvl/conformance_tweaks
Cleanups of deps and ignores for conformance
2015-11-17 09:50:30 +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
Lukacs T. Berki
915d9cd245 add headers 2015-11-16 09:36:32 +01:00
Thomas Van Lenten
8b31d7410a Merge pull request #960 from thomasvl/xctool_support
Switch ObjC Travis testing to using xctool
2015-11-09 17:43:24 -05:00
Thomas Van Lenten
76b61384a2 Switch ObjC Travis testing to using xctool
xctool is preinstalled on the Travis OS X images and it seems to do better with
iOS simulator flake, so use it instead of xcodebuild.

xctool also is less chatty compared to xcodebuild, so it makes the logs a little
easier to read.
2015-11-09 15:06:32 -05:00
Thomas Van Lenten
a663afb23b Merge pull request #959 from thomasvl/travis_mac2
Add ObjC build to travis setup
2015-11-09 14:04:49 -05:00
Thomas Van Lenten
9642b821f2 Add ObjC build to travis setup
- Add objc for iOS and OS X builds to travis configs.
- Update handing of python install to deal with newer OS X versions.
2015-11-09 10:54:32 -05:00
Jon Skeet
284bb452e4 Generated code changes and manual changes for previous commit. 2015-11-09 09:22:45 +00:00