Hey all!
I have a project depending on beats/libbeat
and after changing my dependency management to go modules I can no longer build the project. It fails with the following message:
unknown import path "github.com/elastic/beats/libbeat/publisher/bc/publisher": cannot find module providing package github.com/elastic/beats/libbeat/publisher/bc/publisher
../../../../pkg/mod/github.com/elastic/beats@v7.0.0+incompatible/libbeat/publisher/processing/default.go:23:2: unknown import path "github.com/elastic/ecs/code/go/ecs": cannot find module providing package github.com/elastic/ecs/code/go/ecs
In my go.mod I require
github.com/elastic/beats v7.0.0+incompatible
github.com/elastic/ecs v1.0.0 // indirect
and the problem seems to be that the file /libbeat/publisher/processing/default.go
imports github.com/elastic/ecs/code/go/ecs
which previously downloaded the actual folder containing all the go files from the repo (?). But now that I require GitHub - elastic/ecs: Elastic Common Schema v1.0.0 in my go.mod it pulls the ecs release which does not contain any go files at all.
Am I interpreting this correctly? Can others confirm that they can not build their projects with go mod when depending on libbeat? Do you have any solution for me on how to fix the build?