Thread overview
[Issue 10706] Functions that require a sorted range to take a SortedRange?
Aug 12, 2015
Collin Reeser
Apr 30, 2020
Witold Baryluk
Nov 16, 2021
Dlang Bot
Dec 17, 2022
Iain Buclaw
August 12, 2015
https://issues.dlang.org/show_bug.cgi?id=10706

Collin Reeser <collin.reeser@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |collin.reeser@gmail.com

--- Comment #1 from Collin Reeser <collin.reeser@gmail.com> ---
I was actually burned by this today. Coinciding with the release of 2.068 (though I didn't initially know the release was upon us!), Travis builds for my project started inexplicably failing. The root cause was that a setSymmetricDifference call, which had been working for many months, was suddenly giving nonsense results.

One of the inputs to the call was a .keys() on an associative array.

Presumably, it just-so-happened that the .keys() was yielding sorted output, but with the change to the internals of the associative arrays this release, it just-so-happened that the .keys() result wasn't sorted! Since I misunderstood the documentation of setSymmetricDifference to mean "is-sortable-by 'less'", and not "must have been, prior to input, sorted by 'less'", I didn't initially put the .sort() call after the .keys() call.

Too bad so sad. Figured it out, but lost some time to it.

--
April 30, 2020
https://issues.dlang.org/show_bug.cgi?id=10706

Witold Baryluk <witold.baryluk+d@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |witold.baryluk+d@gmail.com

--
November 16, 2021
https://issues.dlang.org/show_bug.cgi?id=10706

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@burner updated dlang/phobos pull request #6795 "Fix Issue 10706 setops functions need to require SortedRanges" fixing this issue:

- Fix Issue #10706 setops functions need to require SortedRanges

  https://issues.dlang.org/show_bug.cgi?id=10706

  * largestPartialIntersection
  * largestPartialIntersectionWeighted
  * multiwayMerge
  * multiwayUnion
  * setDifference
  * setIntersection
  * setSymmetricDifference

  Now all require SortedRanges to be passed, as that is what they expect
  implicitly anyway.

  A new public symbol `isSortedRange` was added to std.range.
  Comment about usage with non SortedRange ranges
  Add `deprecated` for PR 6795 except on multiwayMerge &
largestPartialIntersectionWeighted
  pragma msg because deprecated will not compile

https://github.com/dlang/phobos/pull/6795

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=10706

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P4

--