Skip to content

rustdoc-json: Add test for field ordering. - #110435

Merged
bors merged 1 commit into
rust-lang:masterfrom
aDotInTheVoid:rdj-field-ordering
Aug 10, 2023
Merged

rustdoc-json: Add test for field ordering.#110435
bors merged 1 commit into
rust-lang:masterfrom
aDotInTheVoid:rdj-field-ordering

Conversation

@aDotInTheVoid

Copy link
Copy Markdown
Member

Inspired by this on twitter, the ordering of fields really matters, so we should test we preserve it through json.

r? rustdoc

@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 Apr 16, 2023
Comment threadtests/rustdoc-json/structs/field_order.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Member

I suppose it needs to be checked for unions and enum struct variants as well?

@obi1kenobi

Copy link
Copy Markdown
Member

This looks great!

If you're open to adding one more thing, it would be great to assert that the order of variants in an enum is preserved as well. There are some sneaky non-obvious semver hazards there:

cargo-semver-checks is probably going to support both of these checks before too long, and it would be awesome to be sure that rustdoc preserves variant order.

@GuillaumeGomez

Copy link
Copy Markdown
Member

Sorry, I missed this one. Don't hesitate to ping me if approval is taking too long. ^^'

Thanks!

@bors r+ rollup

@bors

bors commented Aug 8, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 006903e 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 8, 2023
@Dylan-DPCDylan-DPC mentioned this pull request Aug 8, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 8, 2023
…r=GuillaumeGomez
rustdoc-json: Add test for field ordering.
Inspired by [this on twitter](https://twitter.com/PredragGruevski/status/1647705616650043392), the ordering of fields really matters, so we should test we preserve it through json.
r? rustdoc
@matthiaskrgr

Copy link
Copy Markdown
Member

Looks like this failed in #114627 (comment) ?
@bors r-

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 8, 2023
@GuillaumeGomez

Copy link
Copy Markdown
Member

r=me once CI pass

@rust-log-analyzer

This comment has been minimized.

@aDotInTheVoid

Copy link
Copy Markdown
MemberAuthor

@bors r=GuillaumeGomez

@bors

bors commented Aug 9, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 31ddea6 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 9, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 9, 2023
…iaskrgr
Rollup of 6 pull requests
Successful merges:
- rust-lang#110435 (rustdoc-json: Add test for field ordering.)
- rust-lang#111891 (feat: `riscv-interrupt-{m,s}` calling conventions)
- rust-lang#114377 (test_get_dbpath_for_term(): handle non-utf8 paths (fix FIXME))
- rust-lang#114469 (Detect method not found on arbitrary self type with different mutability)
- rust-lang#114587 (Convert Const to Allocation in smir)
- rust-lang#114670 (Don't use `type_of` to determine if item has intrinsic shim)
Failed merges:
- rust-lang#114599 (Add impl trait declarations to SMIR)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 4e7e2a5 into rust-lang:masterAug 10, 2023
@rustbotrustbot added this to the 1.73.0 milestone Aug 10, 2023
@aDotInTheVoid
aDotInTheVoid deleted the rdj-field-ordering branch August 10, 2023 19:51
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Sep 6, 2023
…iaskrgr
Rollup of 6 pull requests
Successful merges:
- rust-lang#110435 (rustdoc-json: Add test for field ordering.)
- rust-lang#111891 (feat: `riscv-interrupt-{m,s}` calling conventions)
- rust-lang#114377 (test_get_dbpath_for_term(): handle non-utf8 paths (fix FIXME))
- rust-lang#114469 (Detect method not found on arbitrary self type with different mutability)
- rust-lang#114587 (Convert Const to Allocation in smir)
- rust-lang#114670 (Don't use `type_of` to determine if item has intrinsic shim)
Failed merges:
- rust-lang#114599 (Add impl trait declarations to SMIR)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-jsonArea: Rustdoc JSON backendS-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.

7 participants

@aDotInTheVoid@GuillaumeGomez@obi1kenobi@bors@matthiaskrgr@rust-log-analyzer@rustbot