fullstorydev / hauser

Service for moving your Fullstory export files to a data warehouse
MIT License
49 stars 23 forks source link

Hauser cloned from git doesn't build outside of a specific folder path #40

Closed glarchev closed 5 years ago

glarchev commented 5 years ago

If we clone the hauser repo using "git clone", and then try to build it using "go build", it will fail UNLESS it's inside the folder named .../github.com/fullstorydev/hauser. The error message it produces is:

./main.go:202:30: cannot use bundles (type []"github.com/nishanths/fullstory".ExportMeta) as type []"github.com/fullstorydev/hauser/vendor/github.com/nishanths/fullstory".ExportMeta in argument to wh.LoadToWarehouse ./main.go:211:29: cannot use bundles (type []"github.com/nishanths/fullstory".ExportMeta) as type []"github.com/fullstorydev/hauser/vendor/github.com/nishanths/fullstory".ExportMeta in argument to wh.SaveSyncPoints

The issue can also be fixed by running the "go mod init" command before building ("go mod init" is available starting with Go 1.11)

jhump commented 5 years ago

@glarchev, this is 100% expected for Go repos that do not have a go.mod file. That is generally how they all work.

Note that you can also do go get -u github.com/fullstorydev/hauser to have the Go tool clone or update from latest master.

In fact, this is the only way to build from source if using Go 1.10 or older.