Skip to content

rustdoc-json: Clean up serialization and printing. - #129191

Merged
bors merged 1 commit into
rust-lang:masterfrom
aDotInTheVoid:rdj-serial-cleanup
Aug 17, 2024
Merged

rustdoc-json: Clean up serialization and printing.#129191
bors merged 1 commit into
rust-lang:masterfrom
aDotInTheVoid:rdj-serial-cleanup

Conversation

@aDotInTheVoid

Copy link
Copy Markdown
Member

Somewhat a followup to #128963, but makes sense regardless.

  • Renames out_path to out_dir because it's not the path to the JSON, but the directory
    • Also adds a comment explaining None
  • Renames write to serialize_and_write because it does both.
    • Also renames the self-profile activity name to be clear this measures both IO cost and serialization CPU cost
    • Expands the timer to cover flushing
  • Renames output to output_crate, to emphasize it's the contents, not the --output flag.

r? @GuillaumeGomez

@rustbotrustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 17, 2024
@aDotInTheVoidaDotInTheVoid added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Aug 17, 2024
Comment threadsrc/librustdoc/json/mod.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Member

Thanks! r=me once CI pass.

@aDotInTheVoid

Copy link
Copy Markdown
MemberAuthor

@bors r=GuillaumeGomez rollup

@bors

bors commented Aug 17, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit 321d40f has been approved by GuillaumeGomez

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 17, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 17, 2024
…iaskrgr
Rollup of 6 pull requests
Successful merges:
- rust-lang#128989 (Emit an error for invalid use of the linkage attribute)
- rust-lang#129167 (mir/pretty: use `Option` instead of `Either<Once, Empty>`)
- rust-lang#129168 (Return correct HirId when finding body owner in diagnostics)
- rust-lang#129191 (rustdoc-json: Clean up serialization and printing.)
- rust-lang#129192 (Remove useless attributes in merged doctest generated code)
- rust-lang#129196 (Remove a useless ref/id/ref round-trip from `pattern_from_hir`)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 1a95a5f into rust-lang:masterAug 17, 2024
@rustbotrustbot added this to the 1.82.0 milestone Aug 17, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 17, 2024
Rollup merge of rust-lang#129191 - aDotInTheVoid:rdj-serial-cleanup, r=GuillaumeGomez
rustdoc-json: Clean up serialization and printing.
Somewhat a followup to rust-lang#128963, but makes sense regardless.
- Renames `out_path` to `out_dir` because it's not the path to the JSON, but the directory
- Also adds a comment explaining `None`
- Renames `write` to `serialize_and_write` because it does both.
- Also renames the self-profile activity name to be clear this measures both IO cost and serialization CPU cost
- Expands the timer to cover flushing
- Renames `output` to `output_crate`, to emphasize it's the contents, not the `--output` flag.
r? `@GuillaumeGomez`
@aDotInTheVoid
aDotInTheVoid deleted the rdj-serial-cleanup branch August 17, 2024 21:57
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-jsonArea: Rustdoc JSON backendC-cleanupCategory: PRs that clean code up or issues documenting cleanup.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@aDotInTheVoid@GuillaumeGomez@bors@rustbot