-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
require_optional is super sketchy… https://github.com/mongodb-js/mongodb-core/blob/master/lib/utils.js#L4
I'm pretty sure at this point that how its being used with kerberos is the root cause of debugging an issue that has had me chasing my tail for the past 4 days.
I now have a feeling it is also the root cause of a similar but distinct issue durran.jordan has just started chasing his tail on.
require_optional creates a non-deterministic state that makes debugging far more complicated than it should be.
For example, Durran is trying to confirm a Kerberos bug has been fixed in Compass. He expects his dependency updates for kerberos/driver to just work. But in his initial smoke testing, confusion abounds... The Kerberos module isn’t loading for me in Electron on Windows, but works fine in the Node REPL and no errors during the npm install. There are several likely causes of this underlying issue; electron ABI compatibility not being ensured in the build scripts, a dependency error resulting in Kerberos just not being included, etc.
A simple console.warn would save a lot of time and frustration here... An environment variable or anything to tell the driver I expect you to be able to require kerberos here and if you cannot please die hard with a useful error message.
- is caused by
-
COMPASS-3237 Unknown fatal Kerberos error on Travis with Electron app
- Closed
- is related to
-
NODE-3050 Infinite loop on Windows due to a bug in require_optional package
- Closed