Uh oh!
There was an error while loading. Please reload this page.
Refactor stdlib for pal - #39325
Conversation
This removes one exception in the tidy lint 'pal'.
This removes exceptions in the tidy lint 'pal'.
rust-highfive
commented
Jan 26, 2017
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
alexcrichton
commented
Jan 26, 2017
r? @brson |
brson
commented
Jan 26, 2017
@bors r+ beautiful thanks @cassiersg ! |
bors
commented
Jan 26, 2017
📌 Commit 662fef6 has been approved by |
brson
commented
Jan 26, 2017
@bors r- |
brson
commented
Jan 26, 2017
@cassiersg the float commit looks incomplete to me - it adds the sys definitions but does not rewrite the float modules to use the sys/float modules. I'd expect std/f32 and std/f64 to change and for those files to be removed from the pal whitelist. Can you add another commit to do that? |
Also remove exceptions in tidy lint 'pal'.
cassiersg
commented
Jan 26, 2017
@brson I actually forgot to commit some files. Everything should be there now. |
@bors r+ Thanks @cassiersg. As a follow up to this (or in this PR if you want), even the common C functions need to be moved into 'sys' - a platform-independent std is ultimately not allowed to call C directly. Duplication of the C declarations is fine. |
bors
commented
Jan 27, 2017
📌 Commit badd513 has been approved by |
bors
commented
Jan 27, 2017
💡 This pull request was already approved, no need to approve it again.
|
bors
commented
Jan 27, 2017
📌 Commit badd513 has been approved by |
alexcrichton
commented
Jan 27, 2017
I'm getting some failures on the rollup (#39353) on 64-bit MSVC: I think those may be related to this PR? (haven't dug deeply though) |
bors
commented
Jan 28, 2017
⌛ Testing commit badd513 with merge 1881594... |
bors
commented
Jan 28, 2017
💔 Test failed - status-appveyor |
brson
commented
Feb 7, 2017
@cassiersg Can you peek at the errors here? |
cassiersg
commented
Feb 8, 2017
@brson I don't have currently access to a windows system. I'll look at this next weekend. |
| #[cfg_attr(target_env = "msvc", link_name = "__lgamma_r")] | ||
| pub fn lgammaf_r(n: c_float, sign: &mut c_int) -> c_float; | ||
| #[cfg_attr(target_env = "msvc", link_name = "_hypot")] |
There was a problem hiding this comment.
I think the link_names here should be __lgammaf_r and _hypotf.
Since the test failed on f32::hypot_0 could this have caused the failure?
cassiersg
commented
Feb 12, 2017
@brson I have not yet access to a windows environment. I just pushed a fix for the bug @whataloadofwhat found, since it is probably the cause of test failure. |
alexcrichton
commented
Feb 14, 2017
@bors: r=brson |
bors
commented
Feb 14, 2017
📌 Commit 7298535 has been approved by |
Refactor stdlib for pal This is a small step towards [pal](https://internals.rust-lang.org/t/refactoring-std-for-ultimate-portability/4301/40). I moved all platform-specific code from `libstd/{path,f32,f64}.rs` to `libstd/sys`. For the float implementation, I moved only the parts that are currently platform-specific, which leaves direct dependency on libc in `libstd/f32.rs` and `libstd/f64.rs`. I don't know if it is better to move all the dependency to libc in `sys`.
Refactor stdlib for pal This is a small step towards [pal](https://internals.rust-lang.org/t/refactoring-std-for-ultimate-portability/4301/40). I moved all platform-specific code from `libstd/{path,f32,f64}.rs` to `libstd/sys`. For the float implementation, I moved only the parts that are currently platform-specific, which leaves direct dependency on libc in `libstd/f32.rs` and `libstd/f64.rs`. I don't know if it is better to move all the dependency to libc in `sys`.
bors
commented
Feb 14, 2017
⌛ Testing commit 7298535 with merge ad597e7... |
bors
commented
Feb 14, 2017
💔 Test failed - status-travis |
brson
commented
Mar 9, 2017
Errors are legit @cassiersg. |
alexcrichton
commented
Mar 14, 2017
Closing due to inactivity, but feel free to resubmit with tests fixed! |
This is a small step towards pal. I moved all platform-specific code from
libstd/{path,f32,f64}.rstolibstd/sys.For the float implementation, I moved only the parts that are currently platform-specific, which leaves direct dependency on libc in
libstd/f32.rsandlibstd/f64.rs. I don't know if it is better to move all the dependency to libc insys.