-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Remove write-stream from levelup! #207
Conversation
cool, is there anything left in the functional-tests for this? does |
@rvagg just took care of that. Everything is just |
"14 changed files with 1 addition and 1,068 deletions.", nice Also needs WriteStream removed from the README, but you can leave that with me if you like because I also want to do some minor work on the streams wording to update it to streams2 anyway, unless you feel like having a go at that too. The rest lgtm, this'll probably be v0.18.0 unless anyone has anything else to add before a release or has any objections to this PR? This would also make @jcrugzz the 14th addition to the core contributors team (assuming he's happy with that), which is cool, he's been pretty active in promoting and talking about level* stuff around the place, including at the upcoming jsconf.co I believe. I've also heard word from inside Nodejitsu that the level* rumblings are becoming quite loud, which is great! I need to do a write-up about the rationale behind removing this and the way forward with the level-packager packages for 0.18.0+. It would be good if anyone with an alternative WriteStream implementation could get theirs ready for general release (@pgte, @maxogden, @brycebaril?). The test suite in level-ws could serve as a basic-functionality suite, it's not fully exported yet but we can do the same as what we have with AbstractLevelDOWN's suite so that other packages can import and run it. Also, the prototype for WriteStream is exported from level-ws so it's also available as a base if anyone wants to release a version with minor modifications, just take the parts of the prototype that you want. |
I'm very strongly for bumping the major version on this one. Also see my suggestions on what tests not to remove. |
@juliangruber these are difficult tests to include without fstream compatibility, there's lots of additional LOC needed to perform the same job. Any takers on doing this? Of course, level-fstream isn't a bad idea... |
It seems to drop |
@juliangruber that's correct, the fstream cruft was the biggest overhead in the current WriteStream impl and it's been flagged for removal for a while, unfortunately the functional tests all rely on it because they throw tar files around which can only be directly streamed to fstream-compatible streams. |
to not lose tests I'm then for pulling in level-fs and level-fstream for now, until we've come up with tests that do the same but can be well written using only levelup core primitives. |
@jcrugzz I'm pretty sure concat-stream can finally be removed from the dependencies list with these changes too. |
@rvagg I got another half hour to kill before I crash so I'll take a stab at the docs. And sure I will take care of that. @juliangruber I'd think that any tests that were removed would be replicated in the external module replacing its functionality. There is no need to pull anything extra into the [edit]: Also I would totally be ok being added as a core contributor :). I appreciate the consideration! |
The tests that @juliangruber identified are kind of important to ensure we don't have breakage across leveldb versions, but you're right that they probably don't belong here. We should probably at least have them in leveldown though so we don't lose it. |
Oh yeah, leveldown is the better place for them. |
Agreed, |
I'm 👍 for hitting 1.0.0 on this. However, people usually put too much emphasis on the "1.0" release (I saw a few complaining about node not being '1.0'), so we might want to include some more stuff in it. As an example, I also think we might want to put #201 in, too. |
I've just released MemDOWN@0.5.0 which supports the new ranges (gt/gte/lt/lte) as per dominic's tests, I've also extended AbstractLevelDOWN (@0.11.0) to include some help in supporting these. There's a pull request for level.js that adds the test suite for the ranges and upgrades AbstractLevelDOWN but the implementation is required--if anyone feels like helping @maxogden on that I'm sure it would be appreciated. I don't think I have this in LMDB yet but it's not very heavily used and it shouldn't be hard to add anyway. IMO once level.js is done with the new ranges we can document them and deprecate start & end. |
@mcollina we've had some discussions about the semver thing and as far as I remember this project uses the early chaotic version of semver, so breaking changes will happen before |
fwiw my attitude towards semver is that the major version is uninteresting and irrelevant to any of my uses, except in the recent case where I took over the ssh package name and jumped straight to 1.0.0 to differentiate a completely different codebase from what was there previously. But even that was a fuzzy criteria and only done for the pageantry, as are all other major version bumps as far as I'm concerned. I use If y'all want a 1.0.0 then so be it, I care not, I'd be happy to keep on incrementing minor forevermore. |
A |
I think a good compromise here is to use semver just to indicate whether dependent modules may need to be rewritten (and this change will break lots of stuff), and indicate the stability of a project via separate documentation |
that's a good point, like level-sublevel currently doesn't support lt/lte/gt/gte and I'm pretty sure other modules don't either |
adding lte?/gte? is a feature addition (normally minor), but removing |
Just an update on this PR: we're needing a level-fstream (or even better level-write-fstream and level-read-fstream). I'm happy to do these as I've already done the necessary banging-of-head to understand how they work but anyone else is welcome to have a go before I manage to find the time to do it. Once we have some fstream packages we can reimplement the tests that verify leveldb compatibility across versions (amongst other things that the fstream tests were verifying). |
hmm, wasn't there some talk about removing fstream support? |
ping @jcrugzz any status here or are you snowed under? |
@rvagg I had been but I can take some time this week. The big issue here was that the tests that I moved into |
I'm currently rewriting level-sublevel and intend to release level-sublevel@6 without writestreams, |
@dominictarr somehow the tests in |
@jcrugzz I'm closing this PR and will continue working on your rebased branch (that lives in |
Thought I would go ahead and remove all the references to rip off the
bandaid. @rvagg let me know if i missed something but all the tests
pass. Closes #199