Skip to content

x/website/_content: consider reusing repo list from x/build/repos instead of maintaining own hard-coded copy #36136

Open
@dmitshur

Description

@dmitshur

This is an extension of #36047. /cc @bradfitz

There are hard-coded lists in the static templates for x/website/cmd/golangorg and x/tools/cmd/godoc, e.g.:

https://github.com/golang/website/blob/12a8390500dd3fedb41561111a59df98883b92b9/content/static/packageroot.html#L122-L138

In theory, x/website can be modified to get the list of repos from x/build/repos and pass that list to the template. However, that would require modifying golang.org/x/tools/godoc to either be able to pass data through from x/website, or having golang.org/x/tools/godoc itself get the list from x/build.

There may or may not be a constraint about whether we should add a requirement on x/build to x/tools, since x/tools contains many stable packages, while x/build is more internal and less oriented to be imported by library modules (e.g., see #29935).

I don't think it's worth implementing right now, because it's a lot of forced changes and not a lot of benefit. But there are changes planned in order to resolve #29206, and this may become more viable after that. Filing this issue to track this task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.website

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions