-
-
Notifications
You must be signed in to change notification settings - Fork 177
Produce a unique namespace at compile time #687
Conversation
It seems to me that any native module using the same technique should suffer from same problems.
I think this should be fine, since we link statically with leveldb. |
I'll leave this hanging for a few days, in case someone has a better solution, or additional insights. |
@ralphtheninja the leveldb symbols are still exported though, which might cause problems? Similar to how Node.js exporting OpenSSL symbols blocks native addons from using a custom OpenSSL version (nodejs/help#1724). I'm reading about hiding symbols ( |
I came across nodejs/node-addon-api#460. These folks recommend always using |
So that symbols don't clash when multiple versions of the addon are loaded into node.
Closes #686. Summary of that thread: when two 5.x versions of
leveldown
are loaded side by side, for example 5.3.0 and 5.0.2, their (static) methods conflict. E.g. if you open a 5.0.2 db, on completion Node.js will call theBaseWorker::Complete
method of 5.3.0.Some remaining questions:
I've only tested debug builds so far