Error on M1 Mac when generating mocks with confluent-kafka-go dependency
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 135
- Avg merge
- 11d 6h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the report with `go generate -tags dynamic ./...`, focusing on internal/kafka/producers/invalidation_producer.go at line 94 and the confluent-kafka-go dependency. Compare generation with and without the dynamic build tag on an M1 Mac; done means mock generation succeeds for the reported producer without breaking the non-M1 path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100