Skip to content

Conversation

camelid
Copy link
Member

@camelid camelid commented Mar 10, 2021

  • Rename clean::Item.source to span
  • Rename clean::Span::span() to clean::Span::inner()
  • Rename rustdoc_json_types::Item.source to span
  • rustdoc-json: Rename Import.span to Import.source

See also the discussion on Zulip (this is a bit more than discussed in
that conversation, but all the changes are related).

r? @jyn514

@camelid camelid added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 10, 2021
@rust-highfive
Copy link
Contributor

Some changes occurred in intra-doc-links.

cc @jyn514

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 10, 2021
@camelid
Copy link
Member Author

camelid commented Mar 10, 2021

This will likely conflict with #82993 so probably one of these should be merged before the other.

@camelid camelid force-pushed the rename-source-to-span branch from 5eb5be2 to 0ee92b9 Compare March 10, 2021 23:27
@camelid
Copy link
Member Author

camelid commented Mar 10, 2021

Rebased to fix conflicts.

@rust-log-analyzer

This comment has been minimized.

@camelid camelid force-pushed the rename-source-to-span branch from 0ee92b9 to 3261656 Compare March 10, 2021 23:54
@rust-log-analyzer

This comment has been minimized.

@camelid camelid force-pushed the rename-source-to-span branch from 3261656 to a32a68a Compare March 11, 2021 00:46
@jyn514
Copy link
Member

jyn514 commented Mar 11, 2021

rustdoc-json: Rename Import.span to Import.source

Why this change?

@camelid
Copy link
Member Author

camelid commented Mar 11, 2021

rustdoc-json: Rename Import.span to Import.source

Why this change?

Quoting from the commit message:

  • It is called source in rustc and the rest of rustdoc
  • It is not a span, rather it is the source of the import

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

LGTM with the nits fixed :)

@camelid camelid added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 20, 2021
@camelid
Copy link
Member Author

camelid commented Mar 20, 2021

Addressed most of the comments, but I'm waiting on a response on #82994 (comment).

@camelid camelid removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 20, 2021
@rust-log-analyzer

This comment has been minimized.

@camelid camelid added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 22, 2021
camelid added 7 commits March 21, 2021 19:47
Its type is called `clean::Span`, and also the name in the rest of
rustdoc and rustc for this kind of field is `span`.
Otherwise you get a lot of instances of `item.span.span()`, which is
just plain confusing. `item.span.inner()` conveys the correct meaning of
"get the type that `clean::Span` wraps".
* It is called `source` in rustc and the rest of rustdoc
* It is not a span, rather it is the source of the import
The rustdoc-json-types renames are breaking changes.
...and add docs to the types instead of the fields that hold the types.
These tests were added to master after I made my changes.
@camelid camelid force-pushed the rename-source-to-span branch from 6253c88 to 99ff276 Compare March 22, 2021 02:50
@camelid camelid removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 22, 2021
@jyn514 jyn514 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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 22, 2021
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
@camelid camelid added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 23, 2021
@jyn514
Copy link
Member

jyn514 commented Mar 23, 2021

Looks great, thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 23, 2021

📌 Commit d5f2bb2 has been approved by jyn514

@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 Mar 23, 2021
@bors
Copy link
Collaborator

bors commented Mar 23, 2021

⌛ Testing commit d5f2bb2 with merge 673d0db...

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 23, 2021
…n514

Rename `source` to `span` and `span` to `source`

- Rename `clean::Item.source` to `span`
- Rename `clean::Span::span()` to `clean::Span::inner()`
- Rename `rustdoc_json_types::Item.source` to `span`
- rustdoc-json: Rename `Import.span` to `Import.source`

*See also the [discussion on Zulip][z] (this is a bit more than discussed in
that conversation, but all the changes are related).*

r? ``@jyn514``

[z]: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/get.20span.20of.20file.20from.20name/near/229603729
@bors
Copy link
Collaborator

bors commented Mar 23, 2021

☀️ Test successful - checks-actions
Approved by: jyn514
Pushing 673d0db to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 23, 2021
@bors bors merged commit 673d0db into rust-lang:master Mar 23, 2021
@rustbot rustbot added this to the 1.53.0 milestone Mar 23, 2021
@camelid camelid deleted the rename-source-to-span branch March 24, 2021 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.

8 participants