Bug 17966 – chunkBy cannot accept an input range (from multiwayMerge)

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2017-11-05T13:20:13Z
Last change time
2019-01-30T06:37:23Z
Assigned to
No Owner
Creator
Matthew Gamble

Comments

Comment #0 by gamblemj — 2017-11-05T13:20:13Z
I posted this issue to forum.dlang.org/learn https://forum.dlang.org/post/[email protected] I was asked to post this here by Nicholas Wilson, who responded to my post on "learn". This is my first post here, apologies I did it wrong. I guess there are two issues one of which seems to be a bug. The bug: chunkBy is advertised as working on input ranges, but it seems that it doesn't. The smaller issue: Why can't multiwayMerge produce a forward range instead of input range? auto d =[2,4,6,8]; auto e =[1,2,3,5,7]; auto f =[d,e]; writeln(f.multiwayMerge.chunkBy!"a == b");//error happens writeln(f.multiwayMerge.array.chunkBy!"a == b");//no error, but there must be a better way! I know the test code seems silly. Why not just use multiwayUnion and no need for chunkBy? However, this is a dumbed down version to show the error. There are use cases where "a == b" is a bit more complicated and the underlying elements are not completely equivalent and so you want them all grouped together, in which case multiwayUnion is not going to do the right thing. OK, hope I did this right. Matt
Comment #1 by github-bugzilla — 2017-11-20T17:25:31Z
Commits pushed to stable at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/84ac676d1d26edd8b3611d857adc5caed42c92d5 fix Issue 17966 - don't build libphobos2.a with PIC for i386 - use MODEL=64/32 to decide on default - allow overriding default with explicit PIC=0/1 make args https://github.com/dlang/druntime/commit/7c8ca6a4f0f3d4eb7564e00d4d770044ba8b889d Merge pull request #1974 from MartinNowak/fix17996 fix Issue 17966 - don't build libphobos2.a with PIC for i386 merged-on-behalf-of: Petar Kirov <[email protected]>
Comment #2 by github-bugzilla — 2017-11-21T14:59:21Z
Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/84ac676d1d26edd8b3611d857adc5caed42c92d5 fix Issue 17966 - don't build libphobos2.a with PIC for i386 https://github.com/dlang/druntime/commit/7c8ca6a4f0f3d4eb7564e00d4d770044ba8b889d Merge pull request #1974 from MartinNowak/fix17996
Comment #3 by greeenify — 2017-11-23T14:07:08Z
This has been accidentally closed.
Comment #4 by jrdemail2000-dlang — 2019-01-22T19:19:24Z
The PR I am working on for issue 19532 will likely fix this as well.
Comment #5 by jrdemail2000-dlang — 2019-01-30T06:37:23Z