Modules - Issues releasing cron/v3

160 views
Skip to first unread message

robfig

unread,
Jul 16, 2019, 11:03:42 AM7/16/19
to golang-nuts
I maintain the github.com/robfig/cron package, and I have just released v3 using Modules via the branch mechanism (so it's on a v3 branch), but I'm having some issues.

Here are things that would be ideal:
- When people visit github.com/robfig/cron, I would like them to see the v3 version
- Similarly, when people create pull requests, I would like them to be against the v3 branch by default.
- I would like to have godoc available in the usual place. godoc.org does not seem to be module aware, so https://godoc.org/github.com/robfig/cron/v3 does not work.
- "master" reflects ongoing development of v3, rather than being frozen in time as the v1 branch. (minor)

I tried to accomplish this by changing the "default branch" from master to v3. However, that had the effect of breaking everyone who uses "go get" without version pinning, since they expected v1. I just reverted that settings change.

Here's my next-best solution:
- Update the README for v1 and v2 to have a big banner to direct folks to v3
- Link to godoc via gopkg.in: https://godoc.org/gopkg.in/robfig/cron.v3

That works, but it's problematic because (AFAIK) users can NOT actually import `gopkg.in/robfig/cron.v3`, they must import `github.com/robfig/cron/v3`, so the instruction that godoc.org adds at the top of every page to import this package will fail.

Unless I'm missing something, not having godoc for module versions seems like a pretty major problem. Is there something I'm missing? How are other maintainers dealing with this?

Thanks for your advice,
-Rob

Diego Medina

unread,
Jul 16, 2019, 11:58:46 PM7/16/19
to golang-nuts
As a regular user, I wouldn't expect go get to give me v1 all the time, I would expect to get all kinds of breaking builds all the time because that is the reality of go get.
And for those who enter tickets asking why? I would nicely explain that go get is the quick and dirty way to get started with go, but not the way to use it on real app, when you really want a stable build, it is time to use go modules (and vendor for extra safety), or one of the vendor options out there if you have reasons
not to use go modules.


imho, using github's default branch option and set it to v3 is the way to go, but there may be some other go module ways of handling this, iirc, there is also the option of creating a whole v3 folder, not just a branch

Thanks

Diego
Reply all
Reply to author
Forward
0 new messages