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 · 9 comments
Open

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

hugelgupf opened this issue Sep 10, 2020 · 9 comments
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@hugelgupf
Copy link
Contributor

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

@gopherbot gopherbot added this to the Unreleased milestone Sep 10, 2020
@andybons andybons added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite labels Sep 10, 2020
@julieqiu
Copy link
Member

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 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

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

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

https://pkg.go.dev/github.com/anacrolix/torrent@master as an example, does not work.

@gopherbot
Copy link

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

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

@julieqiu
Copy link
Member

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.

@krasi-georgiev
Copy link

@julieqiu I just tried https://pkg.go.dev/github.com/cryptoriums/flashbot@main after adding the license file , but the docs didn't update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

9 participants