switch lmdb-rs dependency to mozilla/lmdb-rs fork (fix #70) #73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per #70, we should switch from the crates.io package to the mozilla/lmdb-rs fork of the lmdb crate, where we've taken fixes for rkv.
I'd rather not publish mozilla/lmdb-rs to a new crates.io package, which'd require a different (but presumably similar) name, sow confusion about the differences between the two crates, and potentially complicate unforking in the future.
Instead, I'd like to point rkv's lmdb dependency to mozilla/lmdb-rs via its Cargo.toml file's [dependencies] section, which is a paved cow path, f.e. in https://searchfox.org/mozilla-central/source/gfx/wrench/Cargo.toml, where Gecko does that for yaml-rust and osmesa-src.
Another option would be to override rkv's lmdb dependency via a patch, as https://searchfox.org/mozilla-central/source/Cargo.toml does for serde_derive. That could avoid depending on two incompatible versions of the crate, as described in rust-lang-deprecated/failure#230 (comment) and following comments. But I don't think that's an issue in this case, as I don't expect Gecko's crate dependency tree to include another dependency on lmdb.
Thus I think the best option is for rkv to depend on mozilla/lmdb-rs via its Cargo.toml file's [dependencies] section, and that's what I've done in this branch.
I've further specified that rkv should depend on the "rkv" branch of mozilla/lmdb-rs, to ensure we're explicit about upgrading the dependency. (Otherwise, any change to mozilla/lmdb-rs's master branch would implicitly upgrade the dependency, which feels brittle.)
@ncalexan I'm requesting review from you at an architectural level, not a code level (as the code changes are trivial), to get a sanity check on this plan!