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

Hugo Dependency error on github.com/kr/text #6

Closed
avanslaars opened this issue May 5, 2016 · 23 comments
Closed

Hugo Dependency error on github.com/kr/text #6

avanslaars opened this issue May 5, 2016 · 23 comments

Comments

@avanslaars
Copy link

I have been publishing changes to my hugo site via CodeShip and it is now failing when running go get -u -v github.com/spf13/hugo It seems to be failing when loading this repo which doesn't appear to have a master branch. Could this be related to a recent change in this repo, or is this specific to the way the dependency is defined in hugo? Any ideas would be appreciated. Thanks!

github.com/kr/text (download)
# cd /home/rof/src/github.com/kr/text; git checkout master
error: pathspec 'master' did not match any file(s) known to git.
package github.com/spf13/hugo
    imports github.com/BurntSushi/toml
    imports github.com/PuerkitoBio/purell
    imports github.com/opennota/urlesc
    imports github.com/bep/inflect
    imports github.com/dchest/cssmin
    imports github.com/eknkc/amber
    imports github.com/eknkc/amber/parser
    imports github.com/fsnotify/fsnotify
    imports golang.org/x/sys/unix
    imports github.com/gorilla/websocket
    imports github.com/kardianos/osext
    imports github.com/kyokomi/emoji
    imports github.com/miekg/mmark
    imports github.com/mitchellh/mapstructure
    imports github.com/russross/blackfriday
    imports github.com/shurcooL/sanitized_anchor_name
    imports github.com/spf13/afero
    imports github.com/pkg/sftp
    imports github.com/kr/fs
    imports golang.org/x/crypto/ssh
    imports golang.org/x/crypto/curve25519
    imports github.com/spf13/afero/mem
    imports github.com/spf13/afero/sftp
    imports golang.org/x/text/transform
    imports golang.org/x/text/unicode/norm
    imports github.com/spf13/cast
    imports github.com/spf13/jwalterweatherman
    imports github.com/spf13/cobra
    imports github.com/spf13/pflag
    imports github.com/spf13/cobra/doc
    imports github.com/cpuguy83/go-md2man/md2man
    imports github.com/spf13/fsync
    imports github.com/spf13/hugo/bufferpool
    imports github.com/spf13/hugo/commands
    imports github.com/spf13/hugo/create
    imports github.com/spf13/hugo/helpers
    imports github.com/spf13/hugo/hugofs
    imports github.com/spf13/viper
    imports github.com/hashicorp/hcl
    imports github.com/hashicorp/hcl/hcl/ast
    imports github.com/hashicorp/hcl/hcl/strconv
    imports github.com/hashicorp/hcl/hcl/token
    imports github.com/hashicorp/hcl/hcl/parser
    imports github.com/hashicorp/hcl/hcl/scanner
    imports github.com/hashicorp/hcl/json/parser
    imports github.com/hashicorp/hcl/json/scanner
    imports github.com/hashicorp/hcl/json/token
    imports github.com/kr/pretty
    imports github.com/kr/text: exit status 1
@raphael
Copy link

raphael commented May 5, 2016

Not having a master branch breaks go get, Godoc (see https://godoc.org/github.com/kr/text) and pretty much the whole Go tool-chain. Wondering about the intent?

raphael added a commit to goadesign/goa that referenced this issue May 5, 2016
Building `mdc` requires `github.com/kr/text` which is currently broken
kr/text#6.
@broady
Copy link

broady commented May 5, 2016

I got this too.

@clns
Copy link

clns commented May 5, 2016

This is indeed breaking go get.

@eranchetz
Copy link

eranchetz commented May 5, 2016

@kr +1 Please bring back the master branch 😢
This affects a lot of golang packages...

@orcaman
Copy link

orcaman commented May 5, 2016

😢 happens to me too

@moorereason
Copy link

Works for me...

$ rm -rf $GOPATH/src/github.com/kr/text $GOPATH/pkg/*/github.com/kr/text*
$ go get -u -v github.com/kr/text
github.com/kr/text (download)
github.com/kr/text
$ go version
go version go1.6.2 linux/amd64

What version of Go are you using? Am I missing something?

@avanslaars
Copy link
Author

I'm running go get -u -v github.com/spf13/hugo and it's failing on the dependency for this repo because it's looking for a master branch. It worked a couple days ago, then it stopped.

This is running in a CD pipeline on Codeship. They have Go 1.4 installed. (according to their docs: https://codeship.com/documentation/languages/go/)

@avanslaars
Copy link
Author

@moorereason - Your comment about the version helped. I was able to add a script to change the version of Go in my CodeShip setup to version 1.6.2 and my build worked. Thanks!

For anybody else with the same issue, here are instructions for working the different version of Go into the CodeShip process.

Specifically, the linked script to add to setup to use a different version of go. Just change the version in that script to 1.6.2
https://codeship.com/documentation/languages/go/

@yoiang
Copy link

yoiang commented May 5, 2016

@avanslaars Are you clear what this changed? Does go get with 1.6.2 look for alternative branches besides master?

@moorereason
Copy link

See golang/go#9032

@unreal
Copy link

unreal commented May 5, 2016

For what it's worth, I ran into the same issue while using the arjen/hugo-build step for wercker. (only applicable when attempting to build the latest version of Hugo instead of a released binary)

Resolved similarly by using the golang:1.6.2 box in wercker.yml.

@raphael
Copy link

raphael commented May 5, 2016

There would have to be a very good reason for that change though. Not all environments can upgrade Go easily. And there's the broken godoc which in itself seems pretty bad...

@clns
Copy link

clns commented May 5, 2016

Tests that run on Travis fail on Go < 1.6, and testing against older versions not only the current one is something to be expected.

@TomDeVito
Copy link

+1

@bep
Copy link

bep commented May 6, 2016

+1

1 similar comment
@bmoyles0117
Copy link

+1

@yoiang
Copy link

yoiang commented May 6, 2016

Please no more +1's, it notifies everyone watching and doesn't help the devs sort through the issue. Instead please give a thumbs up on the original post to voice support!

@bep
Copy link

bep commented May 7, 2016

@kr has responded in this thread:

golang/go#15580

So he is online and not on vacation and aware of the situation. So I guess it means the master branch is gone for good, not sure why, but up to him, I guess.

Some would say bad manners, but the practical approach is forking.

@kr
Copy link
Owner

kr commented May 7, 2016

guess it means the master branch is gone for good

You know what happens when you make an assumption…

I'm really sorry this has caused so many problems. I honestly didn't know that so many people depended on this package, and that so many people still use out-of-date Go releases, and that so many people still don't vendor their dependencies in critical projects, and therefore that this change would break for so many people.

I'm not yet sure what to do about this. It would obviously be preferable just to stick with main alone, but since outdated versions of Go seem to be still so widespread, I'm trying to think of a good workaround. I will come up with an answer one way or another soon. I beg your patience.

(Meanwhile, for any projects where it's important they don't break, vendor your dependencies.)

@bep
Copy link

bep commented May 7, 2016

You know what happens when you make an assumption…

No, what?

bep added a commit to spf13/viper that referenced this issue May 8, 2016
bep added a commit to gohugoio/hugo that referenced this issue May 8, 2016
@bep
Copy link

bep commented May 8, 2016

This is now fixed in Hugo -- by removing all of the @kr dependencies. Lesson learned.

@kr
Copy link
Owner

kr commented May 9, 2016

Ok folks, I tried a few different things, and none of my workarounds really got the job done, so I went ahead and put a master branch back alongside of main for now. It's sad but it seems there's no way around it for now. Maybe we can revisit this in another six or twelve months.

Thanks for being so understanding!

@kr kr closed this as completed May 9, 2016
fujita added a commit to fujita/gobgp that referenced this issue May 9, 2016
Now the issue was fixed. No need for the workaround:

kr/text#6

This reverts commit 9c8dca5.
fujita added a commit to osrg/gobgp that referenced this issue May 9, 2016
Now the issue was fixed. No need for the workaround:

kr/text#6

This reverts commit 9c8dca5.
@dmitshur
Copy link

dmitshur commented May 9, 2016

Thanks for providing an update on this @kr!

tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests