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

Error while compiling protocol buffers following edits to the schema #735

Closed
bdeadman opened this issue Jul 10, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@bdeadman
Copy link
Collaborator

Encountered the following error while trying to compile the protocol buffers following edits to schema enums. Windows 11 system running python in a Conda environment with libprotoc 3.12.4.

(ord-dev) bdeadman@BJDFrameworkWin:~/ord-schema$ ./compile_proto_wrappers.sh

  • protoc --proto_path=.. --python_out=. --pyi_out=. --js_out=import_style=commonjs,binary:js ../ord-schema/proto/dataset.proto ../ord-schema/proto/reaction.proto ../ord-schema/proto/test.proto
    ord-schema/proto/reaction.proto: This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.
@skearnes
Copy link
Collaborator

@bdeadman I think you might be running an old version of protoc; that flag was deprecated a while ago. You should be on libprotoc 22.3: https://github.com/open-reaction-database/ord-schema/blob/main/.github/workflows/run_tests.yml#L87

@skearnes
Copy link
Collaborator

@bdeadman
Copy link
Collaborator Author

Thanks @skearnes. I can confirm that libprotoc 22.3 works after some tweaks. The pre-built binaries seem to have lost protoc-gen-js in v21. If you compiled from source then it may be different, but not something I want to tackle at the moment.

The npm package allowed me to get protoc-gen-js going in WSL. I'll close this issue now, but keeping this note here for future reference.

@skearnes
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants