-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[libc++] add floating point type check for uniform real distribution #70564
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
[libc++] add floating point type check for uniform real distribution #70564
Conversation
Can anyone tell me what is the issue with the Modular Build? I dont quite understand. How should I fix this? |
The error message says that there is a missing include for |
18ffd01
to
3473e1e
Compare
ffcacfa
to
a8b9c70
Compare
@philnik777 phik |
✅ With the latest revision this PR passed the C/C++ code formatter. |
e763c80
to
da2c18f
Compare
@NhatNguyen1810 could you add a better description to the test? I looked at that file first and wasn't sure what's the purpose without reading the whole test carefully. |
da2c18f
to
7fc260c
Compare
I added more descriptions to the test file. |
7fc260c
to
bcc3db1
Compare
@philnik777 can you review when you have time and let me know if it looks good to be approved? There is a workflow awaiting approval, can you run it for me? Thanks! |
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.
Thanks for working on this! Some minor comments.
libcxx/test/libcxx/random/random.uniform.real/traits_mismatch.verify.cpp
Outdated
Show resolved
Hide resolved
9924012
to
661bcdb
Compare
@philnik777 phik |
661848b
to
46a046c
Compare
We have a utility called |
@NhatNguyen1810 you can see error report by clicking details next to the buildkite and then on the job which failed. It looks like your code works with GCC only. You can find details here: https://buildkite.com/llvm-project/libcxx-ci/builds/31338#018b8dda-3da3-4049-af36-d3bbe1bf054c
# .---command stderr------------
--
| # \| error: 'expected-error' diagnostics seen but not expected:
| # \| File /home/libcxx-builder/.buildkite-agent/builds/google-libcxx-builder-6be6c9a4344c-1/llvm-project/libcxx-ci/build/generic-cxx26/include/c++/v1/__random/uniform_real_distribution.h Line 31: static assertion failed due to requirement 'is_floating_point<int>::value': result_type must be floating type
| # \| File /home/libcxx-builder/.buildkite-agent/builds/google-libcxx-builder-6be6c9a4344c-1/llvm-project/libcxx-ci/libcxx/test/libcxx/random/random.uniform.real/traits_mismatch.verify.cpp Line 20: cannot find end ('}}') of expected string
| # \| 2 errors generated.
| # `----------------------------- |
@philnik777 phil |
libcxx/test/libcxx/random/random.uniform.real/traits_mismatch.verify.cpp
Outdated
Show resolved
Hide resolved
@mordante mordanta |
It's a known problem at the moment. There is no need to take any action at the moment. |
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.
LGTM with latest changes. I will merge once CI is done.
Update libcxx/test/libcxx/random/random.uniform.real/traits_mismatch.verify.cpp Co-authored-by: Mark de Wever <[email protected]>
a6b7b6b
to
a30ac88
Compare
@ldionne ld |
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.
Please give me 24 hours to test this change at Google to see what the impact is.
@changkhothuychung You have a setting on your Github account to "hide your email". Please disable it, otherwise upon committing this the email address will be |
Do you see my email now? it should show up as [email protected], thanks! |
Yes I can see it now, thanks. @EricWF Do you have any results internally? We've been sitting on this for a while and I'd like to merge it by EOD if possible, since it looks otherwise good to go. |
@ldionne I have to run the tests off hours, they're set up to run tonight. |
Sounds good, I'll check again tomorrow morning or mid-day. I'm eager to close this PR :) |
@ldionne For one reason or another, the test runs got aborted last night. I'm rerunning them again tonight. |
Do you have any news about this? |
Yes, there are a few users in Google3. I would like to clean them up before this lands, but that will take until Wednesday. None of them seem show-stopping though. All of the usages are weird, but otherwise fine, code. If you're so inclined, I would love the extra time. Otherwise, this LGTM. |
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.
I would ask kindly that you wait a day or two, but that's only a request.
LGTM.
Cool, thanks a bunch for the information. I'll land this on Thursday. This is not an emergency at all but it would be good to get it done. Hopefully that should give you enough time. |
Created a PR to fix this issue - #62433