tdewolff / minify

Go minifiers for web formats
https://go.tacodewolff.nl/minify
MIT License
3.72k stars 219 forks source link

"go get" fails #277

Closed shlomif closed 4 years ago

shlomif commented 4 years ago
[shlomif@telaviv1 ~]$ go get -u github.com/tdewolff/minify/cmd/minify
# github.com/tdewolff/minify/html
apps/golang/src/github.com/tdewolff/minify/html/html.go:215:33: undefined: html.Amp_Boilerplate
[shlomif@telaviv1 ~]$ go get github.com/tdewolff/minify/cmd/minify
# github.com/tdewolff/minify/html
apps/golang/src/github.com/tdewolff/minify/html/html.go:215:33: undefined: html.Amp_Boilerplate
[shlomif@telaviv1 ~]$

I am on mageia linux v8 with go version go1.13.2 linux/amd64. Thanks!

tdewolff commented 4 years ago

Either use a version of minify with Go modules, or use both repositories (minify and parse) at their latest commit to master. You can't use the latest commit of minify on master and then use an old version of parse. I've updated the go.mod anyways, but this is cumbersome to maintain as I have to switch it for every version and then switch it back to master for any commits after.

EDIT: I recommend sticking to a published version and not the latest commit.

EDIT2: Seems like I hadn't pushed commit to parse yet, my fault.

shlomif commented 4 years ago

Either use a version of minify with Go modules, or use both repositories (minify and parse) at their latest commit to master. You can't use the latest commit of minify on master and then use an old version of parse. I've updated the go.mod anyways, but this is cumbersome to maintain as I have to switch it for every version and then switch it back to master for any commits after.

EDIT: I recommend sticking to a published version and not the latest commit.

EDIT2: Seems like I hadn't pushed commit to parse yet, my fault.

Hi! Thanks for the reply.

How should the correct go get command look like?

tdewolff commented 4 years ago

I was under the impression that go get -u github.com/tdewolff/minify/v2 would get the latest version. Anyways, I will make sure in the future that minify@master works well with parse@master, but be aware that master may include bugs!