-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add copysign #207
Add copysign #207
Conversation
704cc73
to
31b0016
Compare
@cuviper Would you be able to help out with why the CI is failing? I don't really understand what the macro is generating or how it works, and the diff looks identical to PRs that have succeeded to me. |
The standard library didn't get |
770deed
to
e6e9769
Compare
I think I've implemented that, but it's still failing the tests, and I still can't really tell what I need to do to fix it. |
The workflow needs to be approved :) |
@tspiteri Thanks for that, it seems like it's passing now. |
@cuviper Friendly review ping 🙂 |
Cargo.toml
Outdated
@@ -23,6 +23,7 @@ libm = { version = "0.2.0", optional = true } | |||
default = ["std"] | |||
std = [] | |||
i128 = [] | |||
copysign = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need a feature for this? I'd rather leave it to autocfg
, unless there's a strong reason to expose that condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because autocfg
is not something that can be used on custom targets (related rust-lang/cargo#7501). I would go as far as saying that autocfg
is an anti-pattern for supporting custom targets currently, the way probing capabilities currently works is very incompatible if your project requires being built in a specialised way. One example a project that needs num-traits
and a custom target is rust-gpu
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, even as the autocfg
author I am frustrated by that situation, but I haven't found time to design/push for tool changes that would alleviate it. I think having something like TARGET_RUSTFLAGS
from cargo set for build scripts would solve a lot of issues. Might you be interested in pursuing this, since it impacts targets you work with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, autocfg
uses CARGO_ENCODED_RUSTFLAGS
now, which should be more reliable.
If you're not even happy with that, then I'd prefer a plain version check rather than a feature for every little implementation detail. ("i128" is a little different because it actually adds to the API.)
@cuviper I believe I've fixed the issues, but you'll need to approve the workflow first to check. |
Signed-off-by: Fredrick Brennan <copypaste@kittens.ph>
(Merged into MFEK@ce9a7df due to #189 (comment).) |
bors r+ |
Signed-off-by: Fredrick Brennan <copypaste@kittens.ph>
Signed-off-by: Fredrick Brennan <copypaste@kittens.ph>
Signed-off-by: Fredrick Brennan <copypaste@kittens.ph>
Resolves #152
Closes #155