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/build/cmd/relnote: improve experience for documenting new standard library packages #70706

Open
dmitshur opened this issue Dec 5, 2024 · 1 comment
Labels
Builders x/build issues (builders, bots, dashboards) Documentation Issues describing a change to documentation. Friction Nuisances that make good candidates for our "friction" fix-it weeks NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Dec 5, 2024

The cmd/relnote test requires that all new APIs have a corresponding entry in doc/next/*-stdlib/*-minor. This works as intended for most APIs, but some new APIs are entirely new packages. Those are not considered "minor" changes, and get their own heading.

The current approach for new packages is to include a file in *-minor/nnn.md anyway, but make its content just a comment like "<!-- This is a new package; covered in 6-stdlib/5-sha3.md. -->".

This causes some friction down the road, as relnote generate ends up creating empty headings like these:

https://cs.opensource.google/go/x/website/+/master:_content/doc/go1.24.md;l=271-277;drc=4ccfb99db16b1419ac640fb08dd654053bd819ee

Those need to eventually be removed.

This is a tracking issue to improve this edge case. A simple fix is to make relnote generate detect when a fragment contains nothing but a comment, and in such cases avoid creating a heading. A more involved change would be to make the cmd/relnote test recognize when a new package is documented in *-stdlib and not require the file with a comment to be added in the first place, if that can be done without risking forgetting to document such changes.

CC @golang/release.

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Friction Nuisances that make good candidates for our "friction" fix-it weeks labels Dec 5, 2024
@dmitshur dmitshur added this to the Unreleased milestone Dec 5, 2024
@gabyhelp
Copy link

gabyhelp commented Dec 5, 2024

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gopherbot gopherbot added Builders x/build issues (builders, bots, dashboards) Documentation Issues describing a change to documentation. labels Dec 5, 2024
@dmitshur dmitshur moved this to Planned in Go Release Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) Documentation Issues describing a change to documentation. Friction Nuisances that make good candidates for our "friction" fix-it weeks NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: Planned
Development

No branches or pull requests

3 participants