make the project go-getable
jzelinskie opened this issue · 1 comments
Maybe this is a configuration I have for git, but if I try to go get
this repository, I get the following error:
< TONS OF SUBMODULE REGISTRATION AND CLONING >
...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
fatal: clone of 'https://github.com/httpspec/sublime-highlighting' into submodule path '/Users/jzelinskie/OSS/go/faq/src/github.com/generaltso/linguist/data/linguist/vendor/grammars/Sublime-HTTP' failed
Failed to clone 'vendor/grammars/Sublime-HTTP' a second time, aborting
Failed to recurse into submodule path 'data/linguist'
package github.com/generaltso/linguist: exit status 1
If I run the following, everything works flawlessly
go get github.com/jteeuwen/go-bindata/go-bindata
mkdir -p $GOPATH/src/github.com/generaltso/linguist
git clone --depth=1 https://github.com/generaltso/linguist $GOPATH/src/github.com/generaltso/linguist
go get -d github.com/generaltso/linguist
cd $GOPATH/src/github.com/generaltso/linguist
make
This is a shame because I'd like to include linguist in a project that I want to be go-getable
and I cannot do so unless I vendor linguist and run its makefile (and carry that knowledge going forward for whenever I want to update linguist as a dependency).
I think the current reason it's not included as @dayvonjersen mentioned to me is that the generated data would need to be checked in and currently generates about 3.5mb of Go code for the language classifier.
I personally think it's reasonable to check it in as 3.5mb isn't really that big, relatively speaking, and the benefits of the module being go gettable far outweigh the downsides.