Skip to content
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

x/pkgsite: support viewing a package @ default branch HEAD #41312

Open
hugelgupf opened this issue Sep 10, 2020 · 8 comments
Open

x/pkgsite: support viewing a package @ default branch HEAD #41312

hugelgupf opened this issue Sep 10, 2020 · 8 comments

Comments

@hugelgupf
Copy link
Contributor

@hugelgupf hugelgupf commented Sep 10, 2020

Previously, #36811 added support for viewing packages at master on pkg.go.dev. Many repos are moving their default branch names away from master to main or something-else-not-master.

It seems that master is hard-coded in pkgsite.

Would it be possible to support some kind of magic version string that gets the default branch, whatever it may be named? This may end up being the reason that I move some of my repos back to master, which I'd like to avoid.

See also this comment as FYI

cc @julieqiu

@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Sep 10, 2020

Thanks @hugelgupf for bringing this up! We would like to add support for this, but can't get to it right now.

If someone wants to propose a design and send us a CL, we would be happy to accept the contribution!

@hajimehoshi
Copy link
Member

@hajimehoshi hajimehoshi commented Oct 19, 2020

Now specifying a default branch like @master takes the snapshot at that time, which is never updated. (e.g., https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2@master) I'd be happy if we could update this.

@deadprogram
Copy link

@deadprogram deadprogram commented Oct 23, 2020

Is anyone working on this at the moment? If so, please let yourself be known in this issue so we can hopefully coordinate efforts.

We moved to non-master branch for many repos, and also have changed all our links to point to pkg.go.dev for docs. I suspect that there are many of us in this situation at the moment, so it seems like a little bit of a collective priority.

@phouse512
Copy link

@phouse512 phouse512 commented Nov 1, 2020

I am just coming across this issue as well. I have some time over the next few weeks to work on an approach if no one else has started. All of our repos are no longer using the master branch as default and we need a reliable way to publish.

@anacrolix
Copy link
Contributor

@anacrolix anacrolix commented Nov 11, 2020

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 2, 2020

Change https://golang.org/cl/274244 mentions this issue: internal: add support for path@main

gopherbot pushed a commit to golang/pkgsite that referenced this issue Dec 2, 2020
Support requests for path@main in addition to path@master.

For golang/go#41312

Change-Id: Ie7665fbb3906e366c784a9cc592ffe37ef347671
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/274244
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
@anacrolix
Copy link
Contributor

@anacrolix anacrolix commented Dec 2, 2020

FWIW, @master now works, per my comment above. Thanks

@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Dec 2, 2020

Requests to @main should also now work. We're still open to a contribution for supporting non-master and non-main branch names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants