mvdan / mvdan.cc

Personal website
3 stars 0 forks source link

New github page breaks go-get protocol for mvdan.cc packages #1

Closed zikaeroh closed 3 years ago

zikaeroh commented 3 years ago

I noticed when doing a go get with GOPROXY=direct set that pages like https://mvdan.cc/xurls/v2?go-get=1 now 404. This means packages under mvdan.cc can't be fetched, and are only working for existing builds if they happened to already be cached on a module proxy (which itself necessarily fetches with GOPROXY=direct at some point).

$ GOPROXY=direct go get mvdan.cc/xurls/v2@upgrade
go get mvdan.cc/xurls/v2@upgrade: unrecognized import path "mvdan.cc/xurls/v2": reading https://mvdan.cc/xurls/v2?go-get=1: 404 Not Found

Sorry to leave a bug report on your personal website! I'd have reported this on specific repos, but since I use both shfmt and xurls, I thought it would be better to leave it in just one place.

mvdan commented 3 years ago

Thank you for reporting this so quickly. I indeed moved from Nginx to a static GitHub Pages just yesterday. I did test that go get still worked... but forgot about v2+ paths :)

mvdan commented 3 years ago

Okay, https://github.com/mvdan/mvdan.cc/commit/824a2dc1e2a93bcb7a68989e65d3c36b1bf5a074 seems to have fixed it. I can now GOPROXY=direct go get both mvdan.cc/sh/v3 and mvdan.cc/xurls/v2.

Package paths like https://mvdan.cc/sh/v3/syntax are still 404s where the old server showed the module, but I think that's not necessarily wrong. There isn't a module there, so serving the module HTML is wrong. We could redirect to pkgsite, but I'm not sure how to do that with github pages without generating lots of little HTML files.