New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import ProtoParser into Wire. #257

Merged
merged 188 commits into from Jul 13, 2015

Conversation

8 participants
@swankjesse
Copy link
Member

swankjesse commented Jul 13, 2015

No description provided.

swankjesse and others added some commits Dec 10, 2012

Merge pull request #1 from jwilson/jwilson/barebones
Bare bones proto schema parser.
Merge pull request #5 from android/alexander/command-line-tool
Generate Java class for message with native types
Process multiple .proto files in a round.
This changes the generator so that it honors imports and parses
dependencies that are imported.
Eric Denman
Merge pull request #6 from android/jwilson/directories
Process multiple .proto files in a round.
Support nested types.
Previously we were promoting all types to top-level types.
This breaks down when multiple classes have their own inner
'Type' enums.
Eric Denman
Merge pull request #9 from android/jwilson/directories
Emit comments extracted from the source .proto.
Alex Chow
Merge pull request #12 from android/jwilson/all_squares_protos
Fix ProtoSchemaParser to handle all of Square's .proto data.
Merge pull request #2 from jw/jw/docs-n-things
Simple docs and simpler licenses.
Merge pull request #3 from square/jwilson/docs
Fix up documentation and reduce visibility of an API.

JakeWharton and others added some commits Mar 18, 2015

Merge pull request #87 from square/jw/collections
Builders support adding collections.
Coerce option value to string before comparing.
Both string and boolean values are supported by the reference implementation, so we support both.
Merge pull request #88 from square/jw/default-instance
Option default should return Object as they are now typed.
Option value scalars are now always strings but include type informat…
…ion.

This also changes rendering the schema from implicitly being behind `toString()` to an explicit `toSchema()`.
Merge pull request #92 from square/jw/what-other-options-do-i-have
Option value scalars are now always strings but include type information.
Merge pull request #93 from square/jw/string-parsing
Re-enable crazy string parsing test with proper expected output.
Merge pull request #94 from square/jw/map-rendering
Add proper rendering of option maps.
Merge pull request #96 from square/jw/nully
Remove JSR305 in favor of our own simple Nullable.
Merge pull request #98 from DanielHeckrath/master
Check that syntax label is followed by equal sign
Merge pull request #101 from square/jw/crazy-trailing-star-comments
Parse trailing star comments. Strip trailing whitespace on trailing comments.
Import ProtoParser into Wire.
* protoparser/wire-import: (102 commits)
  Parse trailing star comments. Strip trailing whitespace on trailing comments.
  Accept "0X" as a hex prefix
  Check that syntax label is followed by equal sign
  Remove JSR305 in favor of our own simple Nullable.
  Add proper rendering of option maps.
  Re-enable crazy string parsing test with proper expected output.
  Option value scalars are now always strings but include type information.
  Coerce option value to string before comparing.
  Option default should return Object as they are now typed.
  Builders support adding collections.
  Add option creation overload for non-parenthesized name.
  Nest label enum in field to which it has a stronger association.
  Formalize type concept and add 'map' and 'any' types.
  More builder validation and tests.
  Add builders to elements.
  Rename ProtoSchemaParser to ProtoParser.
  Support trailing comments on message fields and enum values.
  Add support for syntax declaration.
  Use a builder for the file to simplify creation.
  Promote nested element types to top-level.
  ...
@danrice-square

This comment has been minimized.

Copy link
Collaborator

danrice-square commented Jul 13, 2015

Why?

@swankjesse

This comment has been minimized.

Copy link
Member

swankjesse commented Jul 13, 2015

Here's the Wire tech stack:

  1. protoparser: basic syntax parsing, no linking.
  2. wire-schema: a linked model over protoparser.
  3. wire-compiler emit code based on that linked model.

The standalone utility of #1 is limited, and it's awkward to have an API boundary between the parsed models and the linked models. I'm attempting to bring layers 1 and 2 closer together, with the ultimate goal that layer #1 is just an implementation detail of wire-schema instead of a standalone dependency.

Current clients of protoparser should use wire-schema instead!

@danrice-square

This comment has been minimized.

Copy link
Collaborator

danrice-square commented Jul 13, 2015

Sounds great, can we add something to the README.md over in protoparser?

@swankjesse

This comment has been minimized.

Copy link
Member

swankjesse commented Jul 13, 2015

Yes, definitely. Do you mind if I save that for a follow-up? This change is just about importing the code & retaining git history.

@danrice-square

This comment has been minimized.

Copy link
Collaborator

danrice-square commented Jul 13, 2015

LGTM

swankjesse added a commit that referenced this pull request Jul 13, 2015

@swankjesse swankjesse merged commit cdd5492 into master Jul 13, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@swankjesse swankjesse deleted the jwilson_0712_import_protoparser branch Jul 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment