-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Make v2 installable via "go install" #26
Comments
Hm, I can't really get it to work... I added the
Okay, gets 1.1.1, which is expected; let's try with /v2:
Hmkay? It doesn't load https://arp242.net/uni/v2.html Adding a version is even weirder:
I hate this whole v2 thing so much about modules. I've never been able to get it to work. |
Maybe it needs to add the /v2 to the meta tag as well in:
But can you still fetch v1.1.1 then? I need to modify the Jekyll plugin I wrote to generate these pages to test that, which I don't really feel like doing right now 😅 |
Yeah wow, this is super confusing. I looked around for how other modules with a custom domain do this, and found https://pkg.go.dev/goa.design/goa/v3 as an example that manages to pull this off:
Confirming how it does it:
So it seems that you might need
Presumably that should still work, as long as Assuming I've got this right, I actually think the Go docs are plain wrong on this. https://golang.org/ref/mod#vcs-find says:
And according to https://golang.org/ref/mod#module-path, the |
Thanks for looking in to this; it looks you also need to modify the
I modified the HTML page:
But it still doesn't work:
It still wants to fetch v1.1.1 🤔 I tried a bunch of different variations, but couldn't come up with anything that works. I think the problem is that the entire idea behind "v2" is that it's a different path: that is, a It's an annoying limitation and I really don't want that. I don't mind going slightly out of my way to have this work, but there's a limit to that. I think having The only issue is the I'll leave things as they are for now in case I've missed something, but otherwise I'll just back out the entire /v2 changes and live with the fact that "go get" doesn't work 🤷 |
Okay, I had another idea:
So
Okay, so that still fetches v1.1.1, hmm, but:
Okay, so I created and pushed a v2.2.0 tag so the latest
And if I type Using Fuck's sake all of this was almost more time-consuming and complicated than writing the v2 in the first place (and certainly a lot less fun)... |
I can confirm: this works for me too. (Outside of a Go project, you need to do Thanks a lot! I hadn't actually realized that v2.1.0 didn't have the
Yeah I think that's just how it's meant to work.
Totally agree, Go modules are amazingly subtle and complicated for a language priding itself on being simple. |
Ah yeah, I added those in master only yesterday, but because I wasn't sure that was going to work I didn't tag anything yet. Adding Either way, it works now so I'm hesitant to muck with it further 😅 I'll probably do a follow-up blog on this at some point, so I'll figure out the nuances then.
It's one of those things that sound great and simple in theory, but doesn't work all that well in reality. When I first read through all the proposals I thought it was a great idea. After having worked with it ... a bit less so. Besides, "simple" is not necessarily the same as "easy"; I wrote about that before: Go is not an easy language I did a "proper" v2.2.0 release, so closing as this is solved. Thanks for your help in figuring this out! |
Currently,
go install arp242.net/uni@latest
installs the latest 1.x version. Also, https://pkg.go.dev/arp242.net/uni claims version 1.1.1 is the latest.With the way Go module versioning works, I believe the module name should be updated to
arp242.net/uni/v2
now, and this should be reflected in thego.mod
. Possiblyhttps://arp242.net/uni/v2
also needs to be enabled, not sure.See https://golang.org/doc/modules/major-version, https://golang.org/doc/modules/release-workflow#breaking.
The text was updated successfully, but these errors were encountered: