GoogleCloudPlatform / healthcare-data-harmonization-dataflow

Apache License 2.0
35 stars 24 forks source link

./gradlew shadowJar issue - Impossible type assertion: p.msg.(*mappb.ValueSource) #25

Closed EugOSullivan closed 5 months ago

EugOSullivan commented 1 year ago

Hi Could anyone help point me in the right direction with this? I'm trying to get the JAR built locally from the repo (under WSL - ubuntu in windows.)

All is working fine up to the issue below below.

` source/healthcare-data-harmonization-dataflow# ./gradlew shadowJar

Task :buildDeps Cloning latest mapping engine code... Cloning into '/mnt/c/Users/{}/Documents/source/healthcare-data-harmonization-dataflow/build/tmp/build_deps'... Updating files: 99% (707/714) Updating files: 100% (714/714), done. Building mapping engine... Downloading ANTLR 4.7.1 to ./.antlr/antlr.jar % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2187k 100 2187k 0 0 1289k 0 0:00:01 0:00:01 --:--:-- 1289k Entering /mnt/c/Users/{}/Documents/source/healthcare-data-harmonization-dataflow/build/tmp/build_deps/mapping_engine #

github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_engine/errors

errors/proto.go:105:15: impossible type assertion: p.msg.(mappb.ValueSource) "github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_engine/proto".ValueSource does not implement protoreflect.ProtoMessage (missing ProtoReflect method)

errors/proto.go:120:70: projDef.ProtoReflect undefined (type *"github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_engine/proto".ProjectorDefinition has no field or method ProtoReflect)

Task :buildDeps FAILED

`

msbukal commented 1 year ago

I think your lib proc is out of date? Version 3.14.0 is recommended.

Your error looks related to v2 protos.

EugOSullivan commented 1 year ago

Hi - Thanks for the response. I've tried upgrading to 3.14.0 and also to 3.20.3 as below:

  # PROTOC_ZIP=protoc-3.20.3-linux-x86_64.zip
  # curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.20.3/$PROTOC_ZIP
  # sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc

  protoc --version
  libprotoc 3.20.3

  gradle wrapper
  ./gradlew shadowJar

Unfortunately, still getting the same error. Anything else I could try?

Downloading ANTLR 4.7.1 to ./.antlr/antlr.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2187k  100 2187k    0     0  1464k      0  0:00:01  0:00:01 --:--:-- 1467k

Entering /mnt/c/Users/{AD}/Documents/source/healthcare-data-harmonization-dataflow/build/tmp/build_deps/mapping_engine

#github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_engine/errors

errors/proto.go:105:15: impossible type assertion: p.msg.(*mappb.ValueSource)
        *"github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_engine/proto".ValueSource does not implement protoreflect.ProtoMessage (missing ProtoReflect method)

errors/proto.go:120:70: projDef.ProtoReflect undefined (type *"github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_engine/proto".ProjectorDefinition has no field or method ProtoReflect)