-
-
Notifications
You must be signed in to change notification settings - Fork 745
Revert "findSplit: return named tuples instead of an anonymous tuple" #6078
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
Revert "findSplit: return named tuples instead of an anonymous tuple" #6078
Conversation
|
Thanks for your pull request, @jacob-carlborg! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. 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. |
|
I suspect that this comes from how It's already questionable to make the change given that any code that uses the type explicitly will break (or which uses |
|
According to the examples of in the documentation of |
|
I'd like to build consensus on this with @wilzbach. First, let's get a better understanding of the breakage and if it can be addressed or at least improved upon with library code - e.g. by defining opAssign to accept structurally equivalent tuples. Can someone enumerate a few breakages in current code? |
May I suggest we revert this first and then figure out if it's possible to make this change without breaking existing code.
It broke DStep [1] and Phobos [2]. It was fixed in Phobos by the same PR that introduced the change. [1] https://travis-ci.org/jacob-carlborg/dstep/jobs/333759750 |
wilzbach
left a comment
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.
Ugh. I didn't expect that to happen. Yeah reverting and regrouping is the best course of action - even though this shouldn't have happened :/
@jacob-carlborg could you please add dstep to Jenkins? Thanks!
|
Thx @wilzbach. Regarding the dstep error: That sounds entirely addressable by us. |
|
And the other seems just the same. |
|
We should be able to make it so that What we can't fix and makes changing to named tuples somewhat debatable depending on the context is that unnamed tuples are not compatible with named tuples type-wise. So, any time that someone has explicitly used In the case of a function like // do something with result Outside of strings, it's not particularly likely that someone would use Either way, I think that it's clear that we need to make sure that |
Yes, I agree that the chances of someone using an explicit type for the return value is low, so the breakage once the semantics are fixed should be to a very small area. However, it can also be argued that using anything other than |
@wilzbach done: dlang/ci#145. |
Reverts #5968. As mentioned in #5968 (comment), this broke DStep and Phobos. Meaning it might break other projects as well.