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: show the stdlib/module version when a symbol was added #42933

Closed
cespare opened this issue Dec 2, 2020 · 1 comment
Closed

x/pkgsite: show the stdlib/module version when a symbol was added #42933

cespare opened this issue Dec 2, 2020 · 1 comment
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite/dochtml Issues related to package documentation in pkgsite pkgsite

Comments

@cespare
Copy link
Contributor

cespare commented Dec 2, 2020

It would be helpful if pkg.go.dev could show the version where a symbol was added.

This is something that is shown for the stdlib by the godoc HTTP server but not a feature that gddo has.

For instance, consider https://golang.org/pkg/log/#Writer:

screen_20201201172443

The equivalent pkg.go.dev page is https://pkg.go.dev/log#Writer:

screen_20201201172459

To begin with, perhaps this could be shown only for the stdlib (to reach feature parity with godoc). It seems that godoc displays the first Go version where a symbol (type, function, method) existed if it was added after 1.0.

As a further improvement, it would be great to show this information for third-party modules as well. Here's one possible heuristic:

  • If the symbol existed in the earliest version of that module (i.e., the first release with the same major version), don't show anything.
  • Otherwise, show the first version where the symbol exists.

So if a module had releases

  • 1.0.0 with symbols {A}
  • 2.0.0 with symbols {A, B}
  • 2.1.0 with symbols {A, B, C}
  • 2.1.1 with symbols {A, B, C}

then the 1.0.0 and 2.0.0 doc pages wouldn't show any versions, whereas the 2.1.0 and 2.1.1 pages would show that C was added in 2.1.0.

Apologies if this feature request already exists somewhere. I tried a few github searches and couldn't turn up anything.

@gopherbot gopherbot added this to the Unreleased milestone Dec 2, 2020
@julieqiu julieqiu added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 2, 2020
@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/dochtml Dec 2, 2020
@julieqiu julieqiu self-assigned this Dec 2, 2020
@julieqiu
Copy link
Member

julieqiu commented Dec 2, 2020

Thanks for the suggestion, @cespare! I appreciate the added context. This seems like a duplicate of #37102, so closing as a duplicate of that issue.

@julieqiu julieqiu closed this as completed Dec 2, 2020
@golang golang locked and limited conversation to collaborators Dec 2, 2021
@hyangah hyangah added the pkgsite/dochtml Issues related to package documentation in pkgsite label May 20, 2022
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/dochtml Issues related to package documentation in pkgsite pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants