Closed ticky closed 3 years ago
Okay.. I think we actually need to tag a v3.3.0 in order to test this? x_x
I believe this is ready for review!
Yep, and go doesn't let you know if you've messed up until you make it permanent! 🙃
I'm not sure I understand why we are adding cmd/terminal-to-html/go.mod
vs using the root go.mod
? Beyond that, the version selector syntax should be github.com/buildkite/terminal-to-html/v3/cmd/terminal-to-html
vs github.com/buildkite/terminal-to-html/cmd/terminal-to-html/v3
shouldn't it?
I'm not sure I understand why we are adding
cmd/terminal-to-html/go.mod
vs using the rootgo.mod
?
Because the existing install instructions do not work, as from what I can tell, go get
only installs modules, and unless it is a module, GO111MODULE=on go get github.com/buildkite/terminal-to-html/v3/cmd/terminal-to-html
does not find any such module.
Beyond that, the version selector syntax should be
github.com/buildkite/terminal-to-html/v3/cmd/terminal-to-html
vsgithub.com/buildkite/terminal-to-html/cmd/terminal-to-html/v3
shouldn't it?
I think it needs to be the version of the module, which in this case, because cmd/terminal-to-html
is being treated as a module, needs to be like this.
Right, and for clarification, the CLI and the module are two separate modules, because one depends on the other
Further research seems to suggest this isn't how we ought to be doing it, this repo suggests it should be installed without the specific cmd
specified: https://github.com/golang-standards/project-layout#cmd, and that it shouldn't be a module. That being said, I believe there were previously build issues stemming from the cmd not being able to access the module it lives within.
My guess is that we need to tag v4.0.0 with the correct module path of/v4
!
✗ ~ GO111MODULE=on go get -u -v github.com/buildkite/terminal-to-html/v3/...
go get github.com/buildkite/terminal-to-html/v3/...: module github.com/buildkite/terminal-to-html@upgrade found (v3.2.0+incompatible), but does not contain packages matching github.com/buildkite/terminal-to-html/v3/...
I've removed the extra module stuff, and it seems to build correctly using the "just build the cmd" method, I'm just still not entirely confident this will work as we expect when merged and tagged
My guess is that we need to tag v4.0.0 with the correct module path of/v4!
I'm confused, because I was pretty sure we'd fixed the module issues in this repo by applying #75 and then creating a v3.x tag including the change.
Doesn't go get github.com/buildkite/terminal-to-html/v3/
fetch the most recent v3.x tag it can find, and go.mod
on that tag should have module github.com/buildkite/terminal-to-html/v3
?
Doesn't
go get github.com/buildkite/terminal-to-html/v3/
fetch the most recent v3.x tag it can find, andgo.mod
on that tag should havemodule github.com/buildkite/terminal-to-html/v3
?
Yes, but there's now the checksum issue, which I can't work out the root cause of:
› go get github.com/buildkite/terminal-to-html/v3/
go: downloading github.com/buildkite/terminal-to-html/v3 v3.4.0
go get: github.com/buildkite/terminal-to-html/v3@v3.4.0: verifying module: checksum mismatch
downloaded: h1:tJkY+WxbOUoqrlNda/hzd+OZihFW5GYcfP5ZhFhDdRk=
sum.golang.org: h1:w+CXTxE0YBTbcfmn+WBXCPn7F4bawYvxT8BI/5r00DY=
SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.
For more information, see 'go help module-auth'.
Hmm. What directory were you running that go get
in @ticky? When I fetch the new 3.5.0 release in a new go project it seems to work ok:
$ go version
go version go1.15.6 linux/amd64
$ export | grep GO
# nothing
$ mkdir foo
$ cd foo/
$ go mod init github.com/yob/foo
go: creating new go.mod: module github.com/yob/foo
$ go get github.com/buildkite/terminal-to-html/v3/
go: downloading github.com/buildkite/terminal-to-html/v3 v3.5.0
go: github.com/buildkite/terminal-to-html/v3 upgrade => v3.5.0
$ cat go.mod
module github.com/yob/foo
go 1.15
require github.com/buildkite/terminal-to-html/v3 v3.5.0 // indirect
$ cat go.sum
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/buildkite/terminal-to-html v1.0.2 h1:C/c6TcIGDM9+rqN08pfWSwzi28KqSdRxlFXcz6qwelc=
github.com/buildkite/terminal-to-html v3.2.0+incompatible h1:WdXzl7ZmYzCAz4pElZosPaUlRTW+qwVx/SkQSCa1jXs=
github.com/buildkite/terminal-to-html/v3 v3.5.0 h1:aBKcU7zYOldn98KfLnCjdjWNQLAP5RZtjTO1zKFK7v0=
github.com/buildkite/terminal-to-html/v3 v3.5.0/go.mod h1:g0ME1XqbkBSgXR9YmlIHcJIjzaMyWW+HbsG0rPb5puo=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
Yeah, 3.5.0 is working
This, I think, will render the latest cli version actually
go get
able. I believe we will need to update the import path to v3 and rebuild this once #75 lands.