kr / text

Miscellaneous functions for formatting text
http://godoc.org/github.com/kr/text
MIT License
92 stars 27 forks source link

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

Closed avanslaars closed 8 years ago

avanslaars commented 8 years ago

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 commented 8 years ago

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?

broady commented 8 years ago

I got this too.

clns commented 8 years ago

This is indeed breaking go get.

eranchetz commented 8 years ago

@kr +1 Please bring back the master branch šŸ˜¢ This affects a lot of golang packages...

orcaman commented 8 years ago

šŸ˜¢ happens to me too

moorereason commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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

moorereason commented 8 years ago

See https://github.com/golang/go/issues/9032

unreal commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

+1

bep commented 8 years ago

+1

bmoyles0117 commented 8 years ago

+1

yoiang commented 8 years ago

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 commented 8 years ago

@kr has responded in this thread:

https://github.com/golang/go/issues/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 commented 8 years ago

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 commented 8 years ago

You know what happens when you make an assumptionā€¦

No, what?

bep commented 8 years ago

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

kr commented 8 years ago

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!

dmitshur commented 8 years ago

Thanks for providing an update on this @kr!