golang/go

x/pkgsite: for some repositories, the View Source works well for reading code but not figuring out where changes are made

dmitshur opened this issue · 3 comments

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.

Duplicate of #46243?

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