Open melato opened 7 months ago
Incus v6.0.0 has a problem with its go.mod file. In an empty directory with a new go module, the following commands fail:
go get github.com/lxc/incus@v6.0.0
go get github.com/lxc/incus/v6@v6.0.0
In both cases, the obscure error is:
go: github.com/lxc/incus@v6.0.0: invalid version: module contains a go.mod file, so module path must match major version ("github.com/lxc/incus/v6")
The first line of the incus go.mod file should be:
module github.com/lxc/incus/v6
but it is:
module github.com/lxc/incus
This was corrected in commit bf519f9ab21adfc0e8778d9e03f1543767655582 But the v6.0.0 tag is in commit 714bcc5e42b189f54025b8567df1f3408a1cae2c (branch stable-6.0).
We can use incus v6.0.0 by using the commit hash instead of the tag name:
go get github.com/lxc/incus@714bcc5e42b189f54025b8567df1f3408a1cae2c
And later on, use a tag (e.g. v6.0.1) that includes the go.mod fix.
go get github.com/lxc/incus@714bcc5e42b189f54025b8567df1f3408a1cae2c go mod tidy
Reopening in order to use an incus tag, when available.
Now that there is an Incus LTS release (v6.0.0), update go.mod to point to the incus v6.0.0 code.