Kreya
Kreya copied to clipboard
Error trying to import protos from google/fhir
Describe the bug Trying to import a protobuf that uses https://github.com/google/fhir/tree/master/proto/google/fhir/proto throws an error making us unable to use Kreya in our company.
I was unable to dig into the problem as the error is not too descriptive but I think it might be related to some files being over 8k lines.
To Reproduce
- Go to Importers
- Add a new importer for gRPC proto files
- Add import map to .../@cockpit-grpc
- import folder .../@cockpit-grpc/individuals-microservice
- Click Save
Expected behavior Import should work as usual.
Screenshots
Environment (if possible, copy the information from the error dialog or the About menu):
- OS: MacIntel (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16) AppleWebKit/605.1.15 (KHTML, like Gecko))
- Kreya Version 1.5.0
In attachment there is the required protos to test.
If you need more information please let me know as we would love to migrate from BloomRPC to Kreya.
This is a bug in one of our dependencies, see https://github.com/protobuf-net/protobuf-net/issues/833. We have to wait until that bug is resolved.
As a workaround, you could modify proto/r4/core/datatypes.proto
by either removing all option (...)
lines or by replacing all \\
occurrences with empty strings. This way, Kreya would be able to import the proto files, since it doesn't need (or use) the custom options. But careful if you use the same modified proto files with other tools, since they may need those custom options.
Another workaround would be to use the new filedescriptor set importer
We just released Kreya 1.9, which contains a fix for this bug.