lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Apr 21, 2019 at 4:18 PM Sean Conner <sean@conman.org> wrote:
> Duplicated dependencies don't necessarily even get mapped onto each other.
> If they're not the same module (with compatibility determined by the
> importer's explicitly-requested versioning information) then you can
> actually end up with two copies of the module loaded in, and since they're
> different modules with isolated namespaces they don't interfere with each
> other. It's not the BEST solution to dependency hell because it leads to
> bloating and bugfixes that don't get applied consistently, but it does mean
> that a transitive dependency is a little less likely to screw you over.

  So basically, version numbers are checked when loading modules. 

Not even close. It would be nice if it were that simple.

No, version numbers are checked by the package manager when installing modules. It creates a directory tree where each module gets a copy (or symlink) of its dependencies inside its own definition, and then that module's imports are resolved within its own path before falling back to the configured path.

I can't exactly say I recommend this approach. </understatement>

/s/ Adam