Skip to content
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

Proto3 syntax not allowed in 2.6.1 #368

Closed
dplasto opened this issue May 12, 2015 · 3 comments
Closed

Proto3 syntax not allowed in 2.6.1 #368

dplasto opened this issue May 12, 2015 · 3 comments

Comments

@dplasto
Copy link

dplasto commented May 12, 2015

When using protoc with syntax = "proto3" I'm getting the following error:

Unrecognized syntax identifier "proto3". This parser only recognizes "proto2".

Here is the output of protoc --version:

libprotoc 2.6.1

I've tried installing protobuf using brew, from the downloadable tarball, and also by downloading the 2.6.1 source from github. I've tried removing all other protobuf libraries on my system.

I notice the following lines of code in https://github.com/google/protobuf/blob/v2.6.1/src/google/protobuf/compiler/parser.cc

if (syntax != "proto2" && !stop_after_syntax_identifier_) {
AddError(syntax_token.line, syntax_token.column,
"Unrecognized syntax identifier "" + syntax + "". This parser "
"only recognizes "proto2".");
return false;
}

@cfallin
Copy link
Contributor

cfallin commented May 12, 2015

That's an old version -- syntax "proto3" is only supported starting with 3.0.0-alpha-1.

See the release notes for more details: https://github.com/google/protobuf/releases

@yeurch
Copy link

yeurch commented Apr 20, 2016

The C# tutorial links to the download page for 2.6.1, but the example is in proto3. Perhaps the C# tutorial should direct users to a page where they can download the 3.0.0 prerelease version?

@Nalum
Copy link

Nalum commented Jun 12, 2016

The Go tutorial also links to 2.6 download page but uses proto3 in the examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants