问题
For background, see: How to compile google-fhir proto files
There seem to be missing .java files when compiling using protoc. I do not see those files here: https://github.com/google/protobuf/tree/master/java/core/src/main/java/com/google/protobuf either. Of course, protoc generated additional files such a Patient.java that were not in the linked folder above. I just need it to compile.
symbol: class CodeableConcept
location: package com.google.fhir.stu3.proto
./PlanDefinition.java:30950: error: cannot find symbol
public com.google.fhir.stu3.proto.CodeableConceptOrBuilder getJurisdictionOrBuilder(
^
symbol: class CodeableConceptOrBuilder
location: package com.google.fhir.stu3.proto
./PlanDefinition.java:30956: error: cannot find symbol
private java.util.List<com.google.fhir.stu3.proto.CodeableConcept> topic_;
^
symbol: class CodeableConcept
location: package com.google.fhir.stu3.proto
./PlanDefinition.java:30964: error: cannot find symbol
public java.util.List<com.google.fhir.stu3.proto.CodeableConcept> getTopicList() {
^
symbol: class CodeableConcept
location: package com.google.fhir.stu3.proto
./PlanDefinition.java:30974: error: cannot find symbol
public java.util.List<? extends com.google.fhir.stu3.proto.CodeableConceptOrBuilder>
.... ^
100 errors.
UPDATE
Running examples/protogen/generate-proto.sh returns:
FAILED: Build did NOT complete successfully
generate-descriptors.sh: line 29: ../../bazel-bin/java/ProtoGenerator: No such file or directory
It looks like bazel did not get run correctly, because ProtoGenerator is not in hazel-bin. I ran bazel build
, in the root directory where there is a BUILD file. It complained about a workspace, to which I was told to create an empty WORKSPACE file. When done, there were no errors and bazel-bin was created. Are there additional parameters than bazel build
. Also, I thought I saw more than one BUILD file in addition to the one in proto/stu3, but maybe I am mistaken.
来源:https://stackoverflow.com/questions/50010883/protocol-buffers-source-is-missing-files