mozilla/lmdb-rs

pick largest of multiple `mdb_idl_logn_*` features

mykmelez opened this issue · 0 comments

If two or more crates depend on lmdb-rkv-sys, and they specify different mdb_idl_logn_* features (f.e. mdb_idl_logn_9 and mdb_idl_logn_15), then lmdb-rkv-sys currently fails to build. It should instead pick the largest of the specified features (perhaps warning in the process), as that's more likely to satisfy the needs of all the crates that depend on lmdb-rkv-sys.

Ideally, consumers will never get into this situation, as they'll always specify compatible features in their own crate dependencies. But it isn't possible for consumers to have complete control over the features specified by third-party crates that themselves depend on lmdb-rkv-sys.

And sometimes even first-party crates can disagree, such as in a monorepo, in which multiple applications depend on a shared library, and both the applications and the shared library depend on lmdb-rkv-sys, but they disagree on the desired size of MDB_IDL_LOGN.

(The mozilla-central repo has the potential for this, although currently only the shared library specifies an mdb_idl_logn_* feature, per bug 1543795.)