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

Unify OsString/OsStr for byte-based implementations #58953

Merged
merged 1 commit into from
Mar 22, 2019

Conversation

jethrogb
Copy link
Contributor

@jethrogb jethrogb commented Mar 5, 2019

As requested in #57860

r? @joshtriplett

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 5, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:00f55755:start=1551827454640017285,finish=1551827455546996046,duration=906978761
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
---
[00:04:52]    Compiling panic_unwind v0.0.0 (/checkout/src/libpanic_unwind)
[00:04:59] error: use has missing stability attribute
[00:04:59]   --> src/libstd/sys/unix/ext/ffi.rs:37:1
[00:04:59]    |
[00:04:59] 37 | pub use crate::sys_common::ffi_bytes::*;
[00:04:59] 
travis_time:end:12e1d180:start=1551827466555934200,finish=1551827766510703537,duration=299954769337
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:03134afc

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@jethrogb
Copy link
Contributor Author

jethrogb commented Mar 5, 2019

[00:04:59] error: use has missing stability attribute
[00:04:59]   --> src/libstd/sys/unix/ext/ffi.rs:37:1
[00:04:59]    |
[00:04:59] 37 | pub use crate::sys_common::ffi_bytes::*;

Why is a stability attribute required now? There wasn't one on the pub mod before. What do I even put here? unstable(std_internals)?

@joshtriplett
Copy link
Member

This looks great!

I wish we could unify the doc comments as well, but even without that, this is a huge improvement.

@jethrogb
Copy link
Contributor Author

jethrogb commented Mar 6, 2019

I wish we could unify the doc comments as well, but even without that, this is a huge improvement.

I'll take suggestions on how to do that. As you can see, currently you need to use the respective modules, so they have to be different.

@joshtriplett
Copy link
Member

joshtriplett commented Mar 6, 2019 via email

@jethrogb
Copy link
Contributor Author

jethrogb commented Mar 6, 2019

Ok cool. Do you have any comments on the stability attribute issue?

@joshtriplett
Copy link
Member

@jethrogb No, I don't know why that happens. I don't know why you'd need separate stability attributes here.

@rust-lang/libs?

@alexcrichton
Copy link
Member

If the compiler requires a stability attribute then one needs to be applied. The compiler will often ask for a stability attribute on something that isn't actually used in stability attribute processing, but theoretically can be taken into account one day

@jethrogb
Copy link
Contributor Author

jethrogb commented Mar 7, 2019

Nevermind, I wasn't reading the error message correctly. Stability attributes are warranted here. Fixed now.

@Dylan-DPC-zz
Copy link

ping from triage @joshtriplett waiting for your review on this

@joshtriplett
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 18, 2019

📌 Commit 3bc4e76befab3e55bce7c29824f5d26b34deabba has been approved by joshtriplett

@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 18, 2019
pub mod io;
pub mod mutex;
#[cfg(any(unix,
Copy link
Member

Choose a reason for hiding this comment

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

Could this #[cfg] annotation perhaps be removed to simply #![allow(dead_code)] in the module? It's not really critical we actually delete dead code here and maintaining this #[cfg] over time seems like it may get burdensome (especially if it's duplicated with the above)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not possible because the code doesn't compile as-is on Windows - see https://travis-ci.com/rust-lang/rust/jobs/186485408

I don't think maintaining the cfg (which I put back) is problematic, lots of sys/ has code like this.

src/libstd/sys_common/mod.rs Outdated Show resolved Hide resolved
@jethrogb
Copy link
Contributor Author

Made requested changes

@alexcrichton
Copy link
Member

@bors: r=JoshTriplett

@bors
Copy link
Contributor

bors commented Mar 20, 2019

📌 Commit fbc1aeda438c402af79e629fbac7f66dccdf9f8c has been approved by JoshTriplett

@tesuji
Copy link
Contributor

tesuji commented Mar 21, 2019

Force-pushed. This PR needs to be approved again.

@Dylan-DPC-zz Dylan-DPC-zz 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 Mar 21, 2019
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 21, 2019

📌 Commit 7b1fc49e5d424765dde8baf4f29d8fddc71abc41 has been approved by alexcrichton

@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 21, 2019
@bors
Copy link
Contributor

bors commented Mar 21, 2019

⌛ Testing commit 7b1fc49e5d424765dde8baf4f29d8fddc71abc41 with merge 987e145a46b12c6cd8dc5fc75817bc02fe95b764...

@bors
Copy link
Contributor

bors commented Mar 21, 2019

💔 Test failed - status-appveyor

@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 Mar 21, 2019
@jethrogb
Copy link
Contributor Author

Fixed rustdoc. It's a pretty ugly hack because rustdoc can document code that doesn't otherwise compile. But this is how it used to work, so I'm not too keen on changing that now.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 22, 2019

📌 Commit 2079df1 has been approved by alexcrichton

@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 22, 2019
@bors
Copy link
Contributor

bors commented Mar 22, 2019

⌛ Testing commit 2079df1 with merge cb2f34d...

bors added a commit that referenced this pull request Mar 22, 2019
Unify OsString/OsStr for byte-based implementations

As requested in #57860

r? @joshtriplett
@bors
Copy link
Contributor

bors commented Mar 22, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: alexcrichton
Pushing cb2f34d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 22, 2019
@bors bors merged commit 2079df1 into rust-lang:master Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants