-
-
Notifications
You must be signed in to change notification settings - Fork 707
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
Breaking change: Rebindable
is always a struct with get
.
#8735
Breaking change: Rebindable
is always a struct with get
.
#8735
Conversation
Thanks for your pull request and interest in making D better, @FeepingCreature! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. 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#8735" |
Rebindable
is always a struct with get
.Rebindable
is always a struct with get
.
At first glance the ddox failure seems unrelated, you need to bring the attention of the author on that failure however. |
Right, I've seen the ddox thing before on other PRs, I suspect it's some build timeout or memory usage, especially since it doesn't happen locally. Ping @s-ludwig edit: I mean, what do I need to do unrelated to the ddox issue? This is a pretty big change, and not amenable to |
unrelated ddox fail: dlang/ddox#239 |
I didn't understand the explanation for why the current behaviour is bad. |
When you have |
I guess I should investigate why "alias to T for arrays" was done in the first place. |
I think investigating would be wise. I don't know either. |
Looks like "that's just how Andrei wrote it back in 2008." Ping @andralex ? |
Honestly I forgot the particulars, but probably that alias has to do with qualified arrays having an obvious way to rebind (dropping the top-level qualifier and passing it to the element type).
|
I mean, we do have "struct Rebindable" now! I think it's salvageable. Since pretty much every other type now results in a struct with |
c477427
to
d20ad40
Compare
ping <3 |
hi bump btw :)) (Srsly, if you're not gonna merge, just reject, this silent waiting is just bad project management practice.) |
This needs a changelog entry |
I'm sorry, I'll address this stalling of Phobos PRs in the next meeting |
d20ad40
to
6bd4f98
Compare
Changelog entry added. |
Wait, why did I misremember that this was mostly about arrays? :stares at the diff in confusion: I mean, the change makes sense but ... I should add classes to the changelog as well. Okay, updated: Everything that uses This type is messed up, yo. |
6bd4f98
to
e7fd9b5
Compare
Wait. No. How did this used to work for classes? The tests say that Wait. Wait, no. The code used to alias away Out with it anyways. Being able to always write |
Update: I have tried to get rid of edit: Seems to work. 3 files changed, 127 insertions(+), 147 deletions(-) Should I push it? edit: Hm, unittests don't compile. If somebody can sanity check me on this?
I had to remove the |
Previously, `Rebindable!T` aliases itself away to `T` if `T` is an array. This is bad, because it means we cannot reliably get rid of `Rebindable` with `r.get` again, forcing an additional cryptic `static if` in all code where the callee should never be `Rebindable`. Let's just get rid of it.
e7fd9b5
to
553453a
Compare
Since the function returns |
Ah, so any (sensible)
edit: nevermind, more errors... edit: Yeah that attempt fails in cryptic ways further in. I'll make a separate PR if I can make it work, it shouldn't hold up this one. |
Only when it returns |
hi ping |
Since it's been "an issue" lately (I disagree, but whatever): I'm entirely fine with renaming this to Ie. I want to use it in my own Phobos std.algorithm PRs, I don't care who else uses it. |
In that case, you can make a Although I don't mind the PR as is, since I don't think it breaks much. |
In case this (against expectations) actually gets merged, let me document my rationale of why it's okay to break behavior here. I don't think anybody was actually using In order for the Of course, now that Rebindable does support structs, this rationale becomes less true by the day. That's why I was kind of hoping to get this in before 2.104. (Note: part of the problem is that it is impossible to deprecate this behavior.) |
Correction: I just saw that this change affects classes as well. Nevermind this, I'm making a Rebindable2. Be right back. |
Given that the name |
Previously,
Rebindable!T
aliases itself away toT
ifT
is an array. This is bad, because it means we cannot reliably get rid ofRebindable
withr.get
again, forcing an additional crypticstatic if
in all code where the callee should never beRebindable
.Let's just get rid of it.
See #8734 for a PR made awkward by
Rebindable!T
sometimes aliasing itself toT
.Note: This PR is largely to run Buildkite to see if this breaks anything.Seems surprisingly green!
Okay, what do I need to do to get this merged?