-
-
Notifications
You must be signed in to change notification settings - Fork 705
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
Fix Issue 20618 - std.random.unpredictableSeed can work in betterC #7408
Conversation
|
Thanks for your pull request, @n8sh! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#7408" |
|
At least on my machine the |
| @@ -1656,7 +1657,7 @@ version (AnyARC4Random) | |||
| } | |||
| else | |||
| { | |||
| private ulong bootstrapSeed() @nogc nothrow | |||
| private ulong bootstrapSeed()() @nogc nothrow | |||
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.
On my machine changing this function to a template was necessary to avoid a symbol not found error with betterC. This seems like a bug.
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.
Why would that be a bug? Everything that works in betterC must be templated (or inlined), as druntime and Phobos aren't linked. So of course we could needlessly templatize most of druntime, but what would be the point? Static functionality that can be precompiled once for many compilation cycles does provide benefits.
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 misunderstood how betterC treats Phobos then. I thought it treated it like any library.
Good catch! -> #7409 |
Closing because I now have doubts about whether this PR is a net improvement. |
The diff is easier to review with whitespace changes hidden.