Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The tool is hard to install via Go modules #30

Closed
mvdan opened this issue Aug 19, 2019 · 1 comment
Closed

The tool is hard to install via Go modules #30

mvdan opened this issue Aug 19, 2019 · 1 comment

Comments

@mvdan
Copy link
Contributor

@mvdan mvdan commented Aug 19, 2019

#!/bin/bash

docker run -i golang:1.13beta1-buster <<-SCRIPT

	# Using Go modules, and with the default proxy.
	export GO111MODULE=on
	go env GOPROXY

	echo "First try the default, @latest:"
	go get github.com/fuzzitdev/fuzzit
	fuzzit --version
	echo
	echo "Fails, because it gets the latest v1, which doesn't even work"
	echo

	echo "Then try to force it to get a v2 tag:"
	go get github.com/fuzzitdev/fuzzit@v2.4.29
	fuzzit --version
	echo
	echo "Fails, because the v2 tags don't use a v2 module path"
	echo

	echo "Finally, force @master:"
	go get github.com/fuzzitdev/fuzzit@master
	fuzzit --version
	echo
	echo "Works, but it's downloading master, not the latest or a pinned tag, which isn't useful"
	echo

SCRIPT

The simplest fix is to:

  • amend go.mod to say module github.com/fuzzitdev/fuzzit/v2
  • update docs to say GO111MODULE=on go get github.com/fuzzitdev/fuzzit/v2, and require Go 1.12 or later
  • release a new v2 tagged version, so that @latest picks up that tag and not the broken v2.4.29
mvdan added a commit to mvdan/fuzzit that referenced this issue Sep 10, 2019
Before this change, @latest and specific versions like @v2.4.29 would
fail with module-aware go get, as the module was a v0/v1 instead of the
expected v2.

Amend the go.mod and all the imports. This is just the first step; to
make @latest fully work, we'll need to also release a new tagged
version, and verify that it works.

While at it, update and simplify the 'go get' instructions in the
README.

For fuzzitdev#30.
@mvdan
Copy link
Contributor Author

@mvdan mvdan commented Sep 10, 2019

$ go get github.com/fuzzitdev/fuzzit/v2
go: finding github.com/fuzzitdev/fuzzit/v2 v2.4.46
go: downloading github.com/fuzzitdev/fuzzit/v2 v2.4.46
go: extracting github.com/fuzzitdev/fuzzit/v2 v2.4.46
@mvdan mvdan closed this Sep 10, 2019
@yevgenypats yevgenypats reopened this Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.