moq icon indicating copy to clipboard operation
moq copied to clipboard

Error on M1 Mac when generating mocks with confluent-kafka-go dependency

Open lazorfuzz opened this issue 2 years ago • 1 comments

Hi, I'm using an M1 mac to generate mocks for a kafka producer which depends on the confluent-kafka-go package. When attempting to generate, moq exits with the below error.

go generate -tags dynamic ./...
couldn't load source package: /workspace/mercury/internal/kafka/producers/invalidation_producer.go:94:66: cannot use kafka.PartitionAny (constant unknown with invalid type) as int32 value in struct literal

On non-m1 macs, I can successfully generate the mocks without the -tags dynamic build tag.

lazorfuzz avatar Jun 14 '22 16:06 lazorfuzz

I guess here the issue is that the kafka.PartitionAny type isn't tagged with the dynamic build tag - so it's not included? Is that worth ruling out?

matryer avatar Oct 01 '22 08:10 matryer