Closed sevein closed 7 years ago
I think that your CI setup probably didn't catch this issue before because go get github.com/richardlehane/siegfried/cmd/sf
is downloading those dependencies not found in vendor/
. I don't think that the go tool lets you disable that behaviour.
Hi Jesús I just changed the .travis.yml to use "go install" rather than "go get" to debug this. It seems to be building the sf exe fine without the extra deps (https://travis-ci.org/richardlehane/siegfried/builds/199448432) (predictably breaks on 1.4 and 1.5 due to vendoring).
I suspect these extra dependencies are only needed if you are trying to build all the main.go files within the siegfried repo, including any main.go files within the vendor directory e.g. golang.org/x/text/cmd/gotext/main.go. You really should just be building main.go files for sf and roy tools.
If you change your RPM script from go install -tags archivematica -v github.com/richardlehane/siegfried/...
to go install -tags archivematica -v github.com/richardlehane/siegfried/cmd/...
should fix I think?
including any main.go files within the vendor directory
Right, I missed that! Thank you, it worked. I'm relieved in that we didn't have to vendor +384,426 LoC, 😅
While building the rpm package of siegfried for Archivematica @jhsimpson found a build error that I think it's caused by certain packages not being included in the
vendor/
folder. It can be easily reproduced if you start with a cleanGOPATH
and you don't usego get
so they're not automatically downloaded.Installing the following packages into
vendor/
fixed the build:I used
glide
so my commit also includes the changes inglide.yaml
andglide.lock
.