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 Path type for traits. #100335

Merged
merged 1 commit into from
Aug 14, 2022

Conversation

aDotInTheVoid
Copy link
Member

Avoids using Type for trait fields, as a trait must always be a path, and not any other kind of type.

@rustbot modify labels: +A-rustdoc-json +T-rustdoc

Closes #100106

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 9, 2022
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rustbot rustbot added the A-rustdoc-json Area: Rustdoc JSON backend label Aug 9, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 9, 2022
@camelid
Copy link
Member

camelid commented Aug 9, 2022

I can review the JSON conversion change at least.

Copy link
Member

@camelid camelid left a comment

Choose a reason for hiding this comment

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

The changes to json/conversions.rs and rustdoc-json-types look good to me. I left a few comments. I'll let Guillaume or someone else review the changes to the tests and testing infrastructure since I'm not familiar with it.

src/librustdoc/json/conversions.rs Outdated Show resolved Hide resolved
src/rustdoc-json-types/lib.rs Show resolved Hide resolved
name: String,
id: Id,
args: Option<Box<GenericArgs>>,
param_names: Vec<GenericBound>,
Copy link
Member

Choose a reason for hiding this comment

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

IIUC, you removed this field because it was always empty?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, is was origionaly ment to be part of handling dyn traits, but was never used, and we handle dyn differently now (#99787)

@GuillaumeGomez
Copy link
Member

Since you updated rustdoc-json-types, you need to update FORMAT_VERSION too.

@aDotInTheVoid
Copy link
Member Author

Bumped format version (interesting that highfive didn't send a message about this), fixed comments

@GuillaumeGomez
Copy link
Member

We should add a check for that, indeed.

@aDotInTheVoid
Copy link
Member Author

Highfive used to do this (eg), more recently rustbot has done it (eg), but even more recently it hasn't happeded at all, eg in #99787. No idea why this stoped worked

@GuillaumeGomez
Copy link
Member

Would be better to directly put it into the CI instead. Like that it cannot be mistakenly forgotten.

@aDotInTheVoid
Copy link
Member Author

How would you do that? Something like https://github.com/obi1kenobi/cargo-semver-check?

@GuillaumeGomez
Copy link
Member

No, something much simpler. I'll send a PR.

@GuillaumeGomez
Copy link
Member

Just realized that what I had in mind would fit without a real semver check. So we do need something like the crate you provided.

@GuillaumeGomez
Copy link
Member

Looks good to me, thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Aug 12, 2022

📌 Commit 86bdb3e 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 Aug 12, 2022
@GuillaumeGomez
Copy link
Member

We can now check for semver regressions with github-actions using obi1kenobi/cargo-semver-checks-action@v1 apparently.

Enselic added a commit to cargo-public-api/cargo-public-api that referenced this pull request Aug 12, 2022
Enselic added a commit to cargo-public-api/cargo-public-api that referenced this pull request Aug 12, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 13, 2022
…=GuillaumeGomez

Rustdoc-Json: Add `Path` type for traits.

Avoids using `Type` for trait fields, as a trait must always be a path, and not any other kind of type.

`@rustbot` modify labels: +A-rustdoc-json +T-rustdoc

Closes rust-lang#100106
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 14, 2022
…mpiler-errors

Rollup of 8 pull requests

Successful merges:

 - rust-lang#99646 (Only point out a single function parameter if we have a single arg incompatibility)
 - rust-lang#100299 (make `clean::Item::span` return `Option` instead of dummy span)
 - rust-lang#100335 (Rustdoc-Json: Add `Path` type for traits.)
 - rust-lang#100367 (Suggest the path separator when a dot is used on a trait)
 - rust-lang#100431 (Enum variant ctor inherits the stability of the enum variant)
 - rust-lang#100446 (Suggest removing a semicolon after impl/trait items)
 - rust-lang#100468 (Use an extensionless `x` script for non-Windows)
 - rust-lang#100479 (Argument type error improvements)

Failed merges:

 - rust-lang#100483 (Point to generic or arg if it's the self type of unsatisfied projection predicate)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4989f6a into rust-lang:master Aug 14, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 14, 2022
aDotInTheVoid added a commit to rust-lang/rustdoc-types that referenced this pull request Aug 15, 2022
Enselic added a commit to cargo-public-api/cargo-public-api that referenced this pull request Aug 15, 2022
@aDotInTheVoid
Copy link
Member Author

Highfive used to do this (eg), more recently rustbot has done it (eg), but even more recently it hasn't happeded at all, eg in #99787. No idea why this stoped worked

Asked about this on zulip: Turns out these days the mention won't fire if the author in in the CC list, which isn't ideal

@aDotInTheVoid aDotInTheVoid deleted the rdj-resolved-path branch December 24, 2023 23:14
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 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.

Rustdoc-Json: Add ResolvedPath type
7 participants