dagger 0.3.6 failing with go error: 'go: -mod may only be set to readonly when in workspace mode, but it is set to "vendor"'
Hi all, I just updated dagger to the latest version, and in 0.3.6 the build fails:
https://build.opensuse.org/package/show/home:ojkastl_buildservice:Branch_dev...
[ 25s] + go build -mod=vendor -buildmode=pie -o bin/dagger ./cmd/dagger [ 25s] go: -mod may only be set to readonly when in workspace mode, but it is set to "vendor" [ 25s] Remove the -mod flag to use the default readonly value, [ 25s] or set GOWORK=off to disable workspace mode. [ 25s] error: Bad exit status from /var/tmp/rpm-tmp.e5D1Th (%build)
Removing the "-mod=vendor" leads to errors because go tries to pull in all dependencies. Adding the "GOWORK=off" on the beginning of the "go build" line leads to errors regarding inconsistent vendoring:
[ 21s] go: inconsistent vendoring in /home/abuild/rpmbuild/BUILD/dagger-0.3.6: [ 21s] github.com/google/uuid@v1.3.0: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod [ 21s] [ 21s] To ignore the vendor directory, use -mod=readonly or -mod=mod. [ 21s] To sync the vendor directory, run: [ 21s] go mod vendor [ 21s] error: Bad exit status from /var/tmp/rpm-tmp.j5l1jd (%build)
Any ideas on how to solve this? Apart from waiting for upstream to fix the vendoring? Thanks in advance! Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
participants (1)
-
Johannes Kastl