alexanderGugel / ied

:package: Like npm, but faster - an alternative package manager for Node
http://alexandergugel.github.io/ied
MIT License
1.99k stars 53 forks source link

Revert "Add configurable storage directory that defaults to `node_mod… #158

Closed alexanderGugel closed 8 years ago

alexanderGugel commented 8 years ago
~/r/i/example (fix-dir) $ env NODE_DEBUG=install ied i is-array
🕐  INSTALL 47919: extracting dependencies,devDependencies,optionalDependencies from ../..
INSTALL 47919: resolving is-array@*
INSTALL 47919: resolving /Users/alex/repos/ied/node_modules/is-array from node_modules
INSTALL 47919: failed to resolve is-array@* from local ../.. via /Users/alex/repos/ied/example/node_modules
INSTALL 47919: resolving is-array@* from remote registry
INSTALL 47919: resolving is-array@* from npm
🕒  0% resolving is-array@*INSTALL 47919: resolved is-array@* to tarball shasum e9850cc2cc860c3bc0977e84ccf0dd464584279a from npm
INSTALL 47919: symlinking .cas/e9850cc2cc860c3bc0977e84ccf0dd464584279a/package -> node_modules/is-array
INSTALL 47919: fetching http://registry.npmjs.org/is-array/-/is-array-1.0.1.tgz into /Users/alex/repos/ied/example/node_modules/.cas/e9850cc2cc860c3bc0977e84ccf0dd464584279a/package
INSTALL 47919: extracting dependencies,optionalDependencies from e9850cc2cc860c3bc0977e84ccf0dd464584279a
INSTALL 47919: fixing persmissions of  in /Users/alex/repos/ied/example/node_modules/.cas/e9850cc2cc860c3bc0977e84ccf0dd464584279a/package
INSTALL 47919: downloading http://registry.npmjs.org/is-array/-/is-array-1.0.1.tgz, expecting e9850cc2cc860c3bc0977e84ccf0dd464584279a
INSTALL 47919: downloaded e9850cc2cc860c3bc0977e84ccf0dd464584279a into /Users/alex/.ied_cache/.tmp/6e8512f3-1e4e-4231-a17c-59e0344fdcad

ied was installing the dependencies into the wrong directory:

See INSTALL 47919: resolving /Users/alex/repos/ied/node_modules/is-array from node_modules

pwd:

~/r/i/example (fix-dir) $ pwd
/Users/alex/repos/ied/example

After revert:

INSTALL 48165: resolving /Users/alex/repos/ied/example/node_modules/tape from node_modules

I'm reverting this for now to unbreak things, I still think the .cad is a great idea. cc @mgcrea

mgcrea commented 8 years ago

Indeed it looks like it was not properly resolving already installed deps! Sorry for letting that through. Had it work with both big frontend and backend projects so I assumed everything was fine. Looks like post first install operations would miss the installed deps.

I'm looking into it atm, main issue is the split between entry deps and non-entry deps stored inside the .cas folder. I'm trying to find a solution that minimize refactoring, but it may need a bigger change that what I hoped for.

I'm currently away for vacations but I do hope to have it working soon.