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

Help suggests non-existent package std::os::ext::process::CommandExt #55007

Merged
merged 1 commit into from
Oct 20, 2018

Conversation

davidtwco
Copy link
Member

Fixes #39175.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 12, 2018
@nikomatsakis
Copy link
Contributor

r? @petrochenkov

Glad to see this getting fixed, @davidtwco =)

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Oct 17, 2018

📌 Commit e95472b has been approved by petrochenkov

@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 Oct 17, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Oct 18, 2018
Help suggests non-existent package std::os::ext::process::CommandExt

Fixes rust-lang#39175.
@bors

This comment has been minimized.

@bors

This comment has been minimized.

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 19, 2018
@kennytm

This comment has been minimized.

@bors bors 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 Oct 19, 2018
@davidtwco
Copy link
Member Author

Updated the test to only run on unix - this change isn't platform dependent so I think it's fine to not have a corresponding test for a Windows-only extension trait.

@bors r=petrochenkov

@bors

This comment has been minimized.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 19, 2018
@bors

This comment has been minimized.

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 19, 2018
@rust-highfive

This comment has been minimized.

In order to output a path that could actually be imported (valid and
visible), we need to handle re-exports correctly.

For example, take `std::os::unix::process::CommandExt`, this trait is
actually defined at `std::sys::unix::ext::process::CommandExt` (at time
of writing).

`std::os::unix` rexports the contents of `std::sys::unix::ext`.
`std::sys` is private so the "true" path to `CommandExt` isn't accessible.

In this case, the visible parent map will look something like this:

(child) -> (parent)
`std::sys::unix::ext::process::CommandExt` -> `std::sys::unix::ext::process`
`std::sys::unix::ext::process` -> `std::sys::unix::ext`
`std::sys::unix::ext` -> `std::os`

This is correct, as the visible parent of `std::sys::unix::ext` is in fact
`std::os`.

When printing the path to `CommandExt` and looking at the current
segment that corresponds to `std::sys::unix::ext`, we would normally
print `ext` and then go to the parent - resulting in a mangled path like
`std::os::ext::process::CommandExt`.

Instead, we must detect that there was a re-export and instead print `unix`
(which is the name `std::sys::unix::ext` was re-exported as in `std::os`).
@davidtwco
Copy link
Member Author

Updated the test again so it only runs on platforms that other tests using CommandExt run on.

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Oct 19, 2018

📌 Commit 4334aaa has been approved by petrochenkov

@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 Oct 19, 2018
@bors

This comment has been minimized.

@bors

This comment has been minimized.

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 19, 2018
@rust-highfive

This comment has been minimized.

@davidtwco
Copy link
Member Author

@bors retry

@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 Oct 19, 2018
@bors
Copy link
Contributor

bors commented Oct 20, 2018

⌛ Testing commit 4334aaa with merge 89be71a...

bors added a commit that referenced this pull request Oct 20, 2018
Help suggests non-existent package std::os::ext::process::CommandExt

Fixes #39175.
@bors
Copy link
Contributor

bors commented Oct 20, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: petrochenkov
Pushing 89be71a to master...

@bors bors merged commit 4334aaa into rust-lang:master Oct 20, 2018
@davidtwco davidtwco deleted the issue-39175 branch October 21, 2018 14:54
davidtwco added a commit to davidtwco/rust that referenced this pull request Jan 21, 2019
This commit extends previous work in rust-lang#55007 where the name from the
visible parent was used for modules. Now, we also print the name from
the visible parent for types.
Centril added a commit to Centril/rust that referenced this pull request Jan 25, 2019
Print visible name for types as well as modules.

Fixes rust-lang#56943 and fixes rust-lang#57713.

This commit extends previous work in rust-lang#55007 where the name from the
visible parent was used for modules. Now, we also print the name from
the visible parent for types.

r? @estebank
VardhanThigle pushed a commit to jethrogb/rust that referenced this pull request Jan 31, 2019
This commit extends previous work in rust-lang#55007 where the name from the
visible parent was used for modules. Now, we also print the name from
the visible parent for types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants