open-reaction-database / ord-schema

Schema for the Open Reaction Database
https://open-reaction-database.org
Apache License 2.0
95 stars 27 forks source link

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

Closed bdeadman closed 3 months ago

bdeadman commented 3 months ago

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

skearnes commented 3 months ago

@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 commented 3 months ago

https://github.com/protocolbuffers/protobuf/releases/tag/v22.3

bdeadman commented 3 months ago

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 commented 3 months ago

Note that you have to install the JS side separately: https://github.com/open-reaction-database/ord-schema/blob/main/.github/workflows/run_tests.yml#L89