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: Stick to the preferred package version #41325

Open
rakyll opened this issue Sep 10, 2020 · 6 comments
Open

x/pkgsite: Stick to the preferred package version #41325

rakyll opened this issue Sep 10, 2020 · 6 comments

Comments

@rakyll
Copy link
Member

@rakyll rakyll commented Sep 10, 2020

When browsing packages at a particular version, for example master, the package site doesn't stick to the version.

For example, on https://pkg.go.dev/go.opentelemetry.io/otel@master/api/trace?tab=doc the links are not generated for the master branch. When I click on "subdirectories", it takes me to https://pkg.go.dev/go.opentelemetry.io/otel@v0.11.1-0.20200909181337-06689a01bd02/api/trace?tab=subdirectories.

This makes package site not a viable option during development. Please stick to the preferred version if possible to improve this issue.

@gopherbot gopherbot added this to the Unreleased milestone Sep 10, 2020
@mvdan
Copy link
Member

@mvdan mvdan commented Sep 10, 2020

This seems like a duplicate of #39630 cc @julieqiu

@mvdan
Copy link
Member

@mvdan mvdan commented Sep 10, 2020

I might have spoken too early. It seems like the problem isn't that links aren't versioned, but rather that master gets replaced with a specific pseudo-version. I think that's on purpose, so that the links are stable and don't change over time - which is also a reasonable use case.

Would you provide both as an option? If so, how?

@rakyll
Copy link
Member Author

@rakyll rakyll commented Sep 10, 2020

Hmm, the development branches are inherently not stable so users won't expect to have stability when browsing branches. Not being able to use the package site during development is a more major issue in our case.

@mvdan
Copy link
Member

@mvdan mvdan commented Sep 10, 2020

Pehraps GitHub's model could be copied here. The links are as-is by default, e.g. master in most cases when opening a repo for the first time. And you can press y while looking at a specific path to replace that branch name with a fully expanded commit hash.

Though I have to say that such a default worries me a little bit. Far too often people share GitHub links with just "master" as the ref, which tends to break over time. Especially now that many projects are renaming their master branch :)

@rakyll
Copy link
Member Author

@rakyll rakyll commented Sep 10, 2020

I have one more idea but not sure if it's a good one.

Development-time package serving can a separate service clearly indicating that it's not the stable thing.
http://unstable.pkg.go.dev/go.opentelemetry.io/otel

@mvdan
Copy link
Member

@mvdan mvdan commented Sep 10, 2020

Another way to implement that could be just a URL query parameter like ?unstable, which might be less invasive.

@julieqiu julieqiu added the pkgsite label Sep 14, 2020
@jba jba modified the milestones: Unreleased, pkgsite/unplanned Sep 15, 2020
@gopherbot gopherbot added the go.dev label Sep 18, 2020
@julieqiu julieqiu removed the go.dev label Sep 19, 2020
@gopherbot gopherbot added the go.dev label Sep 19, 2020
@julieqiu julieqiu removed the go.dev label Sep 19, 2020
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
5 participants
You can’t perform that action at this time.