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

Add support for editions #25

Open
villem opened this issue Feb 16, 2025 · 4 comments
Open

Add support for editions #25

villem opened this issue Feb 16, 2025 · 4 comments

Comments

@villem
Copy link

villem commented Feb 16, 2025

Hi,

We are using very recent addition to protobuf: opaque API. This requires edition = 2023. Currently an error:

:1:1: found "edition" but expected [.proto element {comment|option|import|syntax|enum|service|package|message}]

is given. More info about editions: https://protobuf.dev/editions/overview/

@lasorda
Copy link
Owner

lasorda commented Feb 17, 2025

#26 use master check again

@villem
Copy link
Author

villem commented Feb 17, 2025

Hi I'm using now: 6e366e0. I'm getting a little further
We have this in our proto file:

option features.(pb.go).api_level = API_OPAQUE;

It causes this error

<input>:6:17: found "(" but expected [option value assignment =]

@lasorda
Copy link
Owner

lasorda commented Feb 17, 2025

Hi I'm using now: 6e366e0. I'm getting a little further We have this in our proto file:

option features.(pb.go).api_level = API_OPAQUE;

It causes this error

<input>:6:17: found "(" but expected [option value assignment =]

I use https://github.com/emicklei/proto to parse proto file, you can check you proto with emicklei/proto

@villem
Copy link
Author

villem commented Feb 17, 2025

Yes, I get the same error with HEAD of https://github.com/emicklei/proto, using Readme.md test program and printing error of unsuccessful Parse:

` definition, err := parser.Parse()

	if err != nil {
		fmt.Println(err)
		return
	}

`

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

2 participants