Closed vweevers closed 3 years ago
I would still favor a soft deprecation, so we don't surprise anyone, but if you want to go ahead and remove it right away that should work too I guess
@juliangruber It'll be released as semver-major across the board, with the usual changelogs and upgrade guides. For the folks that missed both the 5-year-long documented notice and the upgrade guides, we'll throw an error. I think that's more than enough.
This will greatly simplify the leveldown C++ code.
Work is tracked in https://github.com/Level/community/issues/98.
I propose that we remove the
start
andend
options from iterators & streams. Without doing a soft deprecation, because they were documented as legacy options 5 years ago. I prefer ripping off the band aid and throwing an error ifstart
orend
properties are present inoptions
.@Level/core Anyone opposed? Give a thumbs up or down. Keep reading for the motivation.
The
start/end
options are more surprising in reverse mode. Whileltgte
options fulfill the documented promise of "the returned entries are the same, but in reverse",start/end
options must be swapped by the user to achieve that.The relevant code to handle the whole set of options - which I think in many implementations has been built up through trial & error, putting trust in the extensive tests - is hard to follow, and hard to change.
In addition, there are rules of precedence between
start/end
andltgte
although a formal decision was never made (https://github.com/Level/abstract-leveldown/issues/70) and tests don't cover it.