Commit Graph

55 Commits

Author SHA1 Message Date
Roman Kamyk
dc974d22c5 Fix small style issues in the dart example, following Effective Dart:
- use final instead of obvious types for local variables
- add missing `void` return type
- make the comments doccomments (///)
2019-09-04 12:30:57 -07:00
Yannic Bonenberger
d2d6ff51a8 [bazel] Load python rules from @rules_python 2019-08-06 16:50:32 -07:00
Yannic Bonenberger
bf0c69e130 [bazel] Add fixes for --incompatible_load_{cc,java,proto}_rules_from_bzl (Part 2)
This change adds the required loads to examples and zlib.
For full compatibility with --incompatible_load_{cc,java,proto}_rules_from_bzl,
we will need to roll gtest to a newer version.
2019-07-29 14:14:04 -07:00
Phani Rithvij
39c6b58a9b
fix dart example readme typo 2019-07-07 09:10:41 +05:30
Wang Kirin
74f4f594cf fix typos in examples/README.md 2019-05-31 14:26:20 -07:00
Kent Ross
b6375e03aa create importable function for defining zlib 2019-02-26 11:27:20 -08:00
Xiang Dai
e479410564 delete all duplicate empty blanks (#5758)
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-20 19:28:50 -08:00
Adam Cozzette
e03c0d22a7 Updated Bazel workspace in examples/ to handle zlib dependency
To make this work, I created a symlink to the existing zlib.BUILD file.
Maybe there is a better way to do this, but this is at least a quick
workaround to fix the build.
2018-12-11 16:52:50 -08:00
Jonathan White
b017ac4b87
Update add_person.dart
Fixed typo in a function name.
2018-11-20 18:45:25 -08:00
Adam Cozzette
1c2eba3eac
Merge pull request #5298 from rogerhub/patch-1
Import versions from @bazel_skylib//lib:versions.bzl
2018-11-12 13:36:15 -08:00
Roger Chen
7492b56812 Import versions from @bazel_skylib//lib:versions.bzl
@bazel_skylib//:lib is supposedly deprecated. The 'versions' struct in lib.bzl was committed to bazel-skylib at the same time as //lib:versions.bzl, so there should be no backward incompatibility.
2018-11-02 23:13:17 -07:00
Sarah Zakarias
f075cacaf4 comments 2018-10-23 10:36:46 +02:00
Sarah Zakarias
bc00484bf7 comments and formatting 2018-10-23 09:52:44 +02:00
Sarah Zakarias
969397b719 Add Dart example. 2018-10-15 09:30:34 +02:00
Feng Xiao
afe98de32a Replace repo links. 2018-08-22 11:55:30 -07:00
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