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

Rustdoc-Json: Add enum discriminant #101386

Merged
merged 2 commits into from
Sep 5, 2022

Conversation

aDotInTheVoid
Copy link
Member

Does the first part of #101337, by adding it to clean, but doesn't change HTML output, as

  1. No Consensus has appeared on the UI for this
  2. When inlining across crates, information is lost

JSON doesn't have either of these limitations.

r? @GuillaumeGomez

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 3, 2022
@rustbot
Copy link
Collaborator

rustbot commented Sep 3, 2022

rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing src/librustdoc/json/conversions.rs; otherwise, make sure you bump the FORMAT_VERSION constant.

cc @CraftSpider, @aDotInTheVoid, @Enselic

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 3, 2022
src/rustdoc-json-types/lib.rs Outdated Show resolved Hide resolved
src/rustdoc-json-types/lib.rs Outdated Show resolved Hide resolved
src/rustdoc-json-types/lib.rs Outdated Show resolved Hide resolved
@GuillaumeGomez
Copy link
Member

Looks good to me. Let's make a perf run first.

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 3, 2022
@bors
Copy link
Contributor

bors commented Sep 3, 2022

⌛ Trying commit b76a012 with merge 1d47f06959f0dd98dc00d4fcdf835a8791410ec9...

@bors
Copy link
Contributor

bors commented Sep 4, 2022

☀️ Try build successful - checks-actions
Build commit: 1d47f06959f0dd98dc00d4fcdf835a8791410ec9 (1d47f06959f0dd98dc00d4fcdf835a8791410ec9)

@rust-timer
Copy link
Collaborator

Queued 1d47f06959f0dd98dc00d4fcdf835a8791410ec9 with parent 84f0c3f, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1d47f06959f0dd98dc00d4fcdf835a8791410ec9): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.7% [0.6%, 0.8%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.3% [-4.3%, -4.3%] 1
All ❌✅ (primary) 2.1% [2.1%, 2.1%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.3% [2.3%, 2.3%] 1

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 4, 2022
@GuillaumeGomez
Copy link
Member

It's a bit more than I expected. Considering it's only used for the JSON output, it seems to have a big impact on HTML output. Would it be possible to query this information on demand instead of storing it?

@aDotInTheVoid
Copy link
Member Author

@bors try @rust-timer queue

@bors
Copy link
Contributor

bors commented Sep 4, 2022

@aDotInTheVoid: 🔑 Insufficient privileges: not in try users

@rust-timer
Copy link
Collaborator

Insufficient permissions to issue commands to rust-timer.

@GuillaumeGomez
Copy link
Member

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 4, 2022
@bors
Copy link
Contributor

bors commented Sep 4, 2022

⌛ Trying commit efbd8f6 with merge 4296b71ebf7432355171670548dc32058a5e9f5d...

@bors
Copy link
Contributor

bors commented Sep 4, 2022

☀️ Try build successful - checks-actions
Build commit: 4296b71ebf7432355171670548dc32058a5e9f5d (4296b71ebf7432355171670548dc32058a5e9f5d)

@rust-timer
Copy link
Collaborator

Queued 4296b71ebf7432355171670548dc32058a5e9f5d with parent 8521a8c, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4296b71ebf7432355171670548dc32058a5e9f5d): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
3.2% [3.2%, 3.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements ✅
(secondary)
-2.8% [-3.0%, -2.6%] 2
All ❌✅ (primary) 0.6% [-2.0%, 3.2%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Footnotes

  1. the arithmetic mean of the percent change

  2. number of relevant changes

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 4, 2022
@GuillaumeGomez
Copy link
Member

Seems all good now. The impact on rss is expected unfortunately, but not much we can do. Thanks for working on this!

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Sep 4, 2022

📌 Commit efbd8f6 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors 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 Sep 4, 2022
@bors
Copy link
Contributor

bors commented Sep 5, 2022

⌛ Testing commit efbd8f6 with merge 406e03f...

@bors
Copy link
Contributor

bors commented Sep 5, 2022

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 406e03f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 5, 2022
@bors bors merged commit 406e03f into rust-lang:master Sep 5, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 5, 2022
aDotInTheVoid added a commit to aDotInTheVoid/rustdoc-types that referenced this pull request Sep 5, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 6, 2022
…GuillaumeGomez

Rustdoc-Json: Store Variant Fields as their own item.

Closes rust-lang#100587
Closes rust-lang#92945

Successor to rust-lang#100762

Unlike that one, we don't have merge `StructType` and `Variant`, as after rust-lang#101386 `Variant` stores enum specific information (discriminant).

Resolves the naming discussion (rust-lang#100762 (comment)) by having seperate enums for struct and enum kinds

Resolves `#[doc(hidden)]` on tuple structs (rust-lang#100762 (comment)) by storing as a `Vec<Option<Id>>`

r? `@GuillaumeGomez`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant 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.

7 participants