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

go get fails on Go < 1.6 #2124

Closed
ndarilek opened this issue May 5, 2016 · 11 comments
Closed

go get fails on Go < 1.6 #2124

ndarilek opened this issue May 5, 2016 · 11 comments
Labels

Comments

@ndarilek
Copy link

ndarilek commented May 5, 2016

Just cut-and-pasted the go get command from the README. It seems to download the packages successfully, but I don't have a hugo command in my GOPATH.

Thanks.

@bep
Copy link
Member

bep commented May 5, 2016

Please use http://discuss.gohugo.io/ for questions (this may feel like an bug, but is more related to your Go setup).

@bep bep closed this as completed May 5, 2016
@bep
Copy link
Member

bep commented May 6, 2016

I'll reopen this, as this is also happen on our build server:

https://travis-ci.org/spf13/hugo/jobs/128242105

But only on Go 1.5.4. Mystery, hopefully only temporary.

@bep bep reopened this May 6, 2016
@ndarilek
Copy link
Author

ndarilek commented May 6, 2016 via email

@bep
Copy link
Member

bep commented May 6, 2016

Sure, I will investigate further if this continues.

@bep
Copy link
Member

bep commented May 6, 2016

Seems we're not alone; he/she deleted the master branch; looks like Go 1.6 handles it fine, Go 1.5 not so much. Looks like we should look into vendoring sooner rather than later ...

kr/text#6

@bep bep changed the title go get installation instructions don't work go get fails on Go < 1.6 May 6, 2016
@mohae
Copy link
Contributor

mohae commented May 6, 2016

In looking into this, I encounter the problem with 1.6.2. On a test machine I updated Go to 1.6.2 and did a go get for hugo. The output was:

$go get -u -v github.com/spf13/hugo
github.com/spf13/hugo (download)
github.com/fsnotify/fsnotify (download)
Fetching https://golang.org/x/sys/unix?go-get=1
Parsing meta tags from https://golang.org/x/sys/unix?go-get=1 (status code 200)
get "golang.org/x/sys/unix": found meta tag main.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
Fetching https://golang.org/x/sys?go-get=1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
golang.org/x/sys (download)
github.com/kardianos/osext (download)
github.com/spf13/afero (download)
github.com/pkg/sftp (download)
github.com/kr/fs (download)
Fetching https://golang.org/x/crypto/ssh?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh?go-get=1 (status code 200)
get "golang.org/x/crypto/ssh": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh?go-get=1
get "golang.org/x/crypto/ssh": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
golang.org/x/crypto (download)
Fetching https://golang.org/x/crypto/curve25519?go-get=1
Parsing meta tags from https://golang.org/x/crypto/curve25519?go-get=1 (status code 200)
get "golang.org/x/crypto/curve25519": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/curve25519?go-get=1
get "golang.org/x/crypto/curve25519": verifying non-authoritative meta tag
Fetching https://golang.org/x/text/transform?go-get=1
Parsing meta tags from https://golang.org/x/text/transform?go-get=1 (status code 200)
get "golang.org/x/text/transform": found meta tag main.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/transform?go-get=1
get "golang.org/x/text/transform": verifying non-authoritative meta tag
Fetching https://golang.org/x/text?go-get=1
Parsing meta tags from https://golang.org/x/text?go-get=1 (status code 200)
golang.org/x/text (download)
Fetching https://golang.org/x/text/unicode/norm?go-get=1
Parsing meta tags from https://golang.org/x/text/unicode/norm?go-get=1 (status code 200)
get "golang.org/x/text/unicode/norm": found meta tag main.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/unicode/norm?go-get=1
get "golang.org/x/text/unicode/norm": verifying non-authoritative meta tag
github.com/spf13/cast (download)
github.com/spf13/jwalterweatherman (download)
github.com/spf13/cobra (download)
github.com/spf13/pflag (download)
github.com/cpuguy83/go-md2man (download)
github.com/russross/blackfriday (download)
github.com/shurcooL/sanitized_anchor_name (download)
github.com/spf13/fsync (download)
github.com/PuerkitoBio/purell (download)
github.com/opennota/urlesc (download)
github.com/kyokomi/emoji (download)
github.com/miekg/mmark (download)
github.com/BurntSushi/toml (download)
github.com/mitchellh/mapstructure (download)
github.com/spf13/viper (download)
github.com/hashicorp/hcl (download)
github.com/kr/pretty (download)
github.com/kr/text (download)
github.com/magiconair/properties (download)
# cd /home/vagrant/code/go/src/github.com/magiconair/properties; git pull --ff-only
fatal: Not possible to fast-forward, aborting.
package github.com/magiconair/properties: exit status 128
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag main.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
github.com/bep/inflect (download)
github.com/dchest/cssmin (download)
github.com/eknkc/amber (download)
github.com/yosssi/ace (download)
github.com/spf13/nitro (download)
github.com/gorilla/websocket (download)

In looking at $GOPATH/src/github.com/kr/text the only branch it has is master, so I'm not sure what is going on at this point.

@bep
Copy link
Member

bep commented May 6, 2016

In looking at $GOPATH/src/github.com/kr/text the only branch it has is master, so I'm not sure what is going on at this point.

What you are looking at is unrelated (you have repo out of synch -- aka someone did a push -f ... annoying but happens).

The issue described here doesn't happen in Go 1.6.*.

@mohae
Copy link
Contributor

mohae commented May 6, 2016

Oops, I pasted the wrong output. Also when I redid it on a new VM it worked as expected...sorry about the noise.

@mohae
Copy link
Contributor

mohae commented May 7, 2016

This issue does raise the question of what Hugo's policy for support of non-current versions of Go is, or should be. Sorry it that's been stated elsewhere and I missed it.

The installation instructions for Go always point people to the latest release of Go. In my experience, it is a common expectation that developers will be on the current release of Go, unless they have specific needs or reasons not to be. One example would be JuJu and sticking with 1.4 (the last I checked) because of the longer compile times introduced by switching to the pure Go compiler.

I realize that there are people that prefer using their distro's package manager to install Go but that often results in an old version of Go and the Go installation instructions does not suggest using package managers: https://golang.org/doc/install. In my experience Go installed by package managers are usually outdated and may be missing executables that are normally part of Go, e.g. .godoc and gofmt.

As an example, I installed Go, using the package manager on a couple of Ubuntu LTS boxes. Doing a sudo apt-get install golang-go on Ubuntu 14.04 results in go1 being installed . This is an extreme example due to the age of 14.04. Doing the same thing on 16.04 results in go1.6.1 linux/amd64 since 16.04 was just released. However, the drift will get worse as time progresses.

While Go does have a backwards compatibility guarantee, there are exceptions and it does not cover everything. This is a situation where the library in question modified their repo to take advantage of new functionality. and it does not appear that the owner of the package will revert the change so that it will work with < 1.6. I may be wrong, but @kr's comment on golang/gddo#405 leads me to this conclusion.

@bep
Copy link
Member

bep commented May 7, 2016

This issue does raise the question of what Hugo's policy for support of non-current versions of Go is, or should be.

No, this issue raises the question about vendoring of third-party libs. We're gonna do that, eventually.

bep added a commit to spf13/viper that referenced this issue May 8, 2016
@bep bep closed this as completed in 608cfe6 May 8, 2016
tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
@github-actions
Copy link

github-actions bot commented Apr 7, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants