Skip to content

rustdoc: rename --emit names#153460

Open
notriddle wants to merge 1 commit intorust-lang:mainfrom
notriddle:emit-renames
Open

rustdoc: rename --emit names#153460
notriddle wants to merge 1 commit intorust-lang:mainfrom
notriddle:emit-renames

Conversation

@notriddle
Copy link
Contributor

These new names are pithier and match up with the rest of our terminology:

  • --emit=static-files matches the default name of the directory that it actually emits, which is static.files (the hyphen is used for emit because every other emit option uses hyphens, but the directory uses a dot because we don't want its name to conflict with a crate).
  • --emit=data-files matches the convention that emit is a noun, not an adjective.

This commit changes the docs, but leaves in support for the old names, to break the cycle with cargo and docs.rs. This commit needs merged, then cargo and docs.rs will be updated to use the new names, then, finally, the old names will be removed.

CC #146220 (comment)

These new names are pithier and match up with the rest of our
terminology:

- `--emit=static-files` matches the default name of the directory that
  it actually emits, which is `static.files` (the hyphen is used for
  emit because every other emit option uses hyphens, but the directory
  uses a dot because we don't want its name to conflict with a crate).
- `--emit=data-files` matches the convention that emit is a noun, not an
  adjective.

This commit changes the docs, but leaves in support for the old names,
to break the cycle with cargo and docs.rs. This commit needs merged,
then cargo and docs.rs will be updated to use the new names, then,
finally, the old names will be removed.
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 5, 2026

r? @fmease

rustbot has assigned @fmease.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: rustdoc
  • rustdoc expanded to 9 candidates
  • Random selection from GuillaumeGomez, camelid, fmease, lolbinarycat

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Mar 5, 2026
@fmease
Copy link
Member

fmease commented Mar 5, 2026

Should we poll these names, discuss these names with the other team members on Zulip or something like that?

@fmease
Copy link
Member

fmease commented Mar 5, 2026

@rfcbot ask rustdoc Do you like static-files as a replacement for toolchain-shared-resources?

@rfcbot ask rustdoc Do you like data-files as a replacement for invocation-specific?


This is for resolving concern naming raised in pFCP #146220 (comment). See also #146220 (comment).

At the latest, I'm going to close both polls in one week from now (2026-03-12, 12pm UTC). I might merge the PR before that. This is just a vibe check & non-binding.

@rust-rfcbot
Copy link
Collaborator

rust-rfcbot commented Mar 5, 2026

Team member @fmease has asked teams: T-rustdoc, for consensus on:

Do you like static-files as a replacement for toolchain-shared-resources?

@rust-rfcbot
Copy link
Collaborator

rust-rfcbot commented Mar 5, 2026

Team member @fmease has asked teams: T-rustdoc, for consensus on:

Do you like data-files as a replacement for invocation-specific?

@fmease fmease added S-waiting-on-t-rustdoc Status: Awaiting decision from T-rustdoc and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2026
@GuillaumeGomez
Copy link
Member

I'm fine with both.

@notriddle
Copy link
Contributor Author

Added to meeting notes for 2026-03-09

@lolbinarycat
Copy link
Contributor

the new names also seem a lot more convenient to type out that the old ones, which i like.

@Urgau
Copy link
Member

Urgau commented Mar 6, 2026

I'm fine with static-files, but data-files feels too vague (what data?).

What about re-using Rust terminology with crate-files? We would have static-files and crate-files.

@fmease
Copy link
Member

fmease commented Mar 6, 2026

Re. crate-files, see #146220 (comment) (tl;dr: rustdoc *.md, Markdown files aren't crates).

"toolchain-shared-resources" => Ok(Self::Toolchain),
"invocation-specific" => Ok(Self::InvocationSpecific),
// old nightly-only choices that are going away soon
"toolchain-shared-resources" => Ok(Self::StaticFiles),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth emitting a warning here for now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work IINM since Cargo wouldn't have a way to suppress it so its tests would fail. Moreover, we can't fix Cargo from within this repository since it's a git submodule.

See also: #139869 (comment), #139869 (comment).

That's why we have to temporarily keep the old names in the first place.

@fmease
Copy link
Member

fmease commented Mar 10, 2026

According to #t-rustdoc/meetings > 2026-03-09 @ 💬 it looks like we've settled on:

  1. toolchain-shared-resourceshtml-static-files
  2. invocation-specifichtml-non-static-files

Since this is non-binding, I'd say let's go for it (ultimately, only the pFCP #146220 (comment) is binding ofc).

@rustbot author

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 10, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@fmease fmease removed the S-waiting-on-t-rustdoc Status: Awaiting decision from T-rustdoc label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants