Skip to content

consider nudging people to document new features in the unstable book #141527

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

Open
jyn514 opened this issue May 25, 2025 · 7 comments
Open

consider nudging people to document new features in the unstable book #141527

jyn514 opened this issue May 25, 2025 · 7 comments
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools needs-triage This issue may need triage. Remove it if it has been sufficiently triaged.

Comments

@jyn514
Copy link
Member

jyn514 commented May 25, 2025

Location

https://doc.rust-lang.org/nightly/unstable-book/

Summary

right now, when you add a new unstable feature, unstable-book-gen will parse it out of the source code and generate a stub such as https://doc.rust-lang.org/nightly/unstable-book/language-features/async-trait-bounds.html.

do we actually want this? it seems nice to instead encourage people to write docs for the new features they add. i am imagining something like this (see https://github.com/rust-lang/rust/blob/d3a2440384b54664dddd56e0081ca094c444e869/src/doc/unstable-book/README.md for how this differs from how things currently work):

  1. run unstable-book-gen as-is one last time. copy the generated SUMMARY.md to src/doc/unstable-book, so it's tracked by git.
  2. change unstable-book-gen to not overwrite SUMMARY.md, merely generate a local copy. then, give a hard error if its generated SUMMARY differs from the one tracked by git.

the second thing requires people to write their own docs, even if they're just a stub. and hopefully while people are at it, they will take the time to write more docs than just a stub.

@jyn514 jyn514 added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label May 25, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 25, 2025
@jyn514
Copy link
Member Author

jyn514 commented May 25, 2025

cc #40694, #42454

the latter mentions library features; maybe we can generate stubs but only for library features and not lang?

@jyn514
Copy link
Member Author

jyn514 commented May 25, 2025

another option is to generate a stub, but only if we find a tracking issue for the feature, so we never have features that are completely undocumented.

@jyn514
Copy link
Member Author

jyn514 commented May 25, 2025

it would be nice to require unstable-book docs for features "on stabilization track", so everything but incomplete_features. that means we would end up with one of three states:

  1. incomplete_feature, requires either a tracking issue or unstable-book docs
  2. perma-unstable, requires unstable-book docs
  3. regular feature, requires both a tracking issue and unstable-book docs

@lolbinarycat
Copy link
Contributor

it would be nice to require unstable-book docs for features "on stabilization track", so everything but incomplete_features. that means we would end up with one of three states:

Where do experimental features fit in to this?

@lolbinarycat
Copy link
Contributor

I also agree with lang features being more important to have in the unstable book, since library features always have api docs (it would be cool to have a way to tell exactly what functions were enabled by a library feature, though. i guess that would probably belong in rustdoc.)

@jyn514
Copy link
Member Author

jyn514 commented May 27, 2025

it would be nice to require unstable-book docs for features "on stabilization track", so everything but incomplete_features. that means we would end up with one of three states:

Where do experimental features fit in to this?

i don't know what experimental features are. i think treating them as either incomplete features (only tracking issue required) or normal features (both tracking and unstable docs required) could make sense depending on context.

@lolbinarycat
Copy link
Contributor

features that have not yet gone through the relevant approval process (RFC/ACP)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools needs-triage This issue may need triage. Remove it if it has been sufficiently triaged.
Projects
None yet
Development

No branches or pull requests

3 participants