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

protobuf: proto3 has no field qualifiers like required and optional #4

Open
PierceNg opened this issue Jan 17, 2021 · 0 comments
Open

Comments

@PierceNg
Copy link

In proto3, field qualifiers have been removed. But the parser still requires them and fails to parse a valid proto3 definition.

Example:

syntax = "proto3";

message SearchRequest {
  string query = 1; 
  int32 page_number = 2;
  int32 result_per_page = 3; 
}

proto_pas output:

Protobuf files to pascal source code compiller version 1.0 [2021/01/17] for x86_64
Copyright (c) 2018-2019 by Lagunov Aleksey
Compiling m1.proto
(1) TSyntax : Start
(1) TSyntax : proto3 - done
(1)  : Change syntax to proto 3
(1) TProtoMessage : Start
(4) TProtoMessage : SearchRequest - done
Error: (9, 4) Expected : OPTIONAL, REQUIRED, REPEATED, RESERVED, ENUM, identificator (MESSAGE)
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

1 participant