Commit Graph

40 Commits

Author SHA1 Message Date
Yilun Chong
517190a7d9 fix golang kokoro linux build 2018-07-12 16:52:16 -07:00
Feng Xiao
1a7ce04be7 Fix bazel build of examples. 2018-07-03 11:00:15 -07:00
Yilun Chong
805174eda2 Add script for run and upload the benchmark result to bq 2018-04-10 13:26:17 -07:00
Fahrzin Hemmati
35119e39a0 Add a check_protobuf_required_bazel_version() for use in WORKSPACEs 2017-12-04 15:12:08 -08:00
Feng Xiao
8136ccb296 Fix go example test.
It needs "-I" flag to find imported file google/protobuf/timestamp.proto
2017-09-13 17:04:13 -07:00
Feng Xiao
74bf45f379 Add bazel support for examples.
The example utilizes native bazel rules (proto_library, cc_proto_library,
java_proto_library, java_lite_proto_library) to show how easy it is to
build protobuf with bazel's native support. It also makes use of well
known types which was not possible until the latest bazel 0.5.4 release
and https://github.com/google/protobuf/pull/3594 .
2017-09-08 16:01:49 -07:00
cclauss
067543cd6d from __future__ import print_function
The future import is required to support the print(x, end=" ") parameter in Python 2.
2017-08-18 01:14:48 +02:00
cclauss
7daedbd8ca print() function & define raw_input() for Python 3 2017-08-18 01:09:14 +02:00
king6cong
547d76ed8e Add classpath for java example Makefile 2017-07-31 14:53:05 +08:00
Walter Gray
0336770801 add protobuf_generate function, allows use of target_sources where available 2017-06-02 19:57:08 -07:00
Feng Xiao
9086d96439 Integrate from internal code base. 2016-07-13 13:48:40 -07:00
Walter Gray
09f6a5c1d2 Use ExternalProject_Add to build the examples in a stand-alone fashion. 2016-06-06 12:06:55 -07:00
Konstantin Podsvirov
71556295ff CMake project updates
A series of improvements:

- Improved Protobuf module compatibility (disabled by default);
- Hide advanced settings;
- Added build tree configuration;
- Added build of examples.
2016-06-04 00:10:07 +03:00
Joshua Haberman
3ee2e20539 Merge pull request #1144 from dongjoon-hyun/remove_redundant_the
Remove redundant `the`.
2016-02-11 17:17:48 -08:00
Dongjoon Hyun
7a9040fe7f Remove redundant the in comments. 2016-02-03 15:27:27 -08:00
Parth Kolekar
21e1f1d2e9 Updated python examples to use with. 2016-01-26 04:13:31 +05:30
Feng Xiao
9e1777f4b0 Merge pull request #1052 from tswast/master
Add region tags to the Go protobuf examples.
2015-12-17 11:42:59 -08:00
Tim Swast
7df1d773b7 Improves readability of Go example test. 2015-12-16 14:46:28 -08:00
Tim Swast
1cc541b3be Add region tags to the Go protobuf examples.
This will allow us to like to specific snippets of code in the
documentation.  I plan to create a tutorial similar to the C# tutorial
https://developers.google.com/protocol-buffers/docs/csharptutorial

Since that tutorial has sections for populating a proto, parsing, and
serializing, I made a region for each of these for Go.  To make the
populating sample more self-contained, I refactor the listing example
slightly.
2015-12-15 15:56:23 -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
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
Jan Tattermusch
b0e5ba697e rename persons to people 2015-07-20 15:24:08 -07:00
Jan Tattermusch
359d32d4f7 use Google.Protobuf namespace for C# 2015-07-20 15:12:56 -07:00
Jan Tattermusch
4d86c2b495 fixed java example 2015-07-20 14:51:09 -07:00
Jan Tattermusch
b95670f5fb fix python example 2015-07-20 14:34:27 -07:00
Jan Tattermusch
78709f20fb fix C++ example 2015-07-20 14:33:36 -07:00
Jan Tattermusch
69c14071ad update addressbook.proto to proto3 2015-07-20 14:32:57 -07:00
Jon Skeet
734393d0f9 Make generate_protos.sh Windows-friendly.
To my surprise, executing generate_protos.sh used the version of Bash installed with Git for Windows by default.
After a few modifications to detect the most appropriate protoc to use, this worked pretty simply.
This change also:
- adds generation of the address book tutorial proto,
- fixes the addressbook.proto to specify proto2 explicitly (to avoid a warning from protoc; I don't think we want warnings...)
- fixes the addressbook.proto C# namespace (which I thought I'd done before, but apparently hadn't)
- includes the regenerated UnittestCustomOptions.cs apart from the DescriptorProtoFIle => Descriptor change
2015-05-14 09:11:57 +01:00
Tamir Duberstein
9d9d0b70de Don't hard-code the python path 2015-05-06 17:02:57 -04:00
Feng Xiao
84731a111f Down-integrate from internal branch. 2014-10-03 11:14:13 -07:00
Feng Xiao
e428862450 Replace links to code.google.com/protobuf with developers.google.com/protocol-buffers 2014-10-01 16:26:23 -07:00
jieluo@google.com
1eba9d9c74 merge tags/2.6.0 into trunk 2014-08-25 20:17:53 +00:00
jieluo@google.com
7db9c098df change java compiler to only produce one java file 2014-08-07 19:03:12 +00:00
jieluo@google.com
4de8f55113 down integrate to svn 2014-07-18 00:47:59 +00:00
liujisi@google.com
3239fec94c Close resources properly for java tests and examples. 2011-06-07 03:51:33 +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
kenton@google.com
d2fd0638c3 Down-integrate some code from an internal branch. (More to come.) 2009-07-24 01:00:35 +00:00
kenton@google.com
e21c5734ec Make sure examples link properly. 2009-05-06 20:41:30 +00:00
kenton@google.com
16b31d2a94 Make Python example output identical to C++ and Java by removing redundant
spaces.
2008-10-07 02:38:12 +00:00
temporal
40ee551715 Initial checkin. 2008-07-10 02:12:20 +00:00