Skip to content

x/build/cmd/relnote: improve experience for documenting new standard library packages #70706

Open
@dmitshur

Description

@dmitshur

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buildersx/build issues (builders, bots, dashboards)DocumentationIssues describing a change to documentation.FrictionNuisances that make good candidates for our "friction" fix-it weeksNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    Status

    Planned

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions