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: for some repositories, the View Source works well for reading code but not figuring out where changes are made #47520

Closed
dmitshur opened this issue Aug 3, 2021 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Aug 3, 2021

What is the URL of the page with the issue?

https://pkg.go.dev/golang.org/x/website/internal/history#Releases

What did you do?

I shared the link https://pkg.go.dev/golang.org/x/website/internal/history#Releases that points to Releases, an exported package-scope variable in the golang.org/x/website/internal/history package, with the goal of making it clear what the identifier is, what package it's located in, and in turn what repository that package is located in.

In this situation, I wanted it to be possible for someone to find out where the source code lives, so they can send a change that modifies the Releases variable.

What did you expect to see?

I expected to see a documentation page with the Releases variable highlighted, and a way of finding out the underlying source code location for purposes of making changes (in addition to just reading).

In this case, the custom import path golang.org/x/website has a go-import meta tag that specifies that the root golang.org/x/website corresponds to a git repository at the URL https://go.googlesource.com/website:

$ curl -s https://golang.org/x/website | grep go-import
<meta name="go-import" content="golang.org/x/website git https://go.googlesource.com/website">

What did you see instead?

Under the "Repository" link, I saw a link to "cs.opensource.google/go/x/website":

image

On the right hand side of the identifier, I saw a "View Source" link:

image

Clicking that link takes one to https://cs.opensource.google/go/x/website/+/55fae94f:internal/history/release.go;l=16, which displays the source code and makes reading it convenient. There are many mentions of "x/website", but I have not been able to find the full URL of the underlying git repository.

Perhaps this is a bug/feature request for the https://cs.opensource.google website, although then it would still require pkg.go.dev users 2 hops to be able to get to this information.

@gopherbot gopherbot added this to the Unreleased milestone Aug 3, 2021
@jamalc jamalc added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 3, 2021
@jamalc jamalc modified the milestones: Unreleased, pkgsite/unplanned Aug 3, 2021
@jamalc
Copy link

jamalc commented Aug 3, 2021

/cc @julieqiu

@bcmills
Copy link
Contributor

bcmills commented Aug 4, 2021

Duplicate of #46243?

@dmitshur
Copy link
Contributor Author

dmitshur commented Aug 4, 2021

Yep, I think it's the same, thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge 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

4 participants