Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gx install <pkg> -- does nothing #12

Closed
jbenet opened this issue Aug 29, 2015 · 7 comments
Closed

gx install <pkg> -- does nothing #12

jbenet opened this issue Aug 29, 2015 · 7 comments

Comments

@jbenet
Copy link

jbenet commented Aug 29, 2015

> gx install QmXrnpeF2R5k8StJXCPQjbAYYrjF23qAxpgyfnSGge43Z5
> git status
> ls vendor/src
>

no change. nothing downloaded, and package.json not changed. and no error.

@jbenet
Copy link
Author

jbenet commented Aug 29, 2015

looks like gx import <pkg> is the thing gx wants me to do.

  • other pkg mgrs use gx install <pkg> (see npm)
  • at the very least gx install <pkg> should return an error.

@whyrusleeping
Copy link
Owner

@jbenet right. I had the concepts of 'fetch all dependencies' and 'grab a new dependency' as separate in my mind. Do you think that it should just be install?

Where gx install has the same behaviour that it currently has, and gx install XYZ does what gx import XYZ does now?

@hackergrrl
Copy link
Contributor

(Aside: gx is super cool!)

I'm partial to the way npm separates downloading ("installing") a package and adding a package dependency ("saving"):

npm install X: download X and place it in vendor/ -- don't update package.json
npm install --save X: like the above, but add it as a package dependency
npm install: expands to npm install X Y Z, assuming pkg depends on X, Y, and Z

@whyrusleeping
Copy link
Owner

@noffle yeah, i think i agree with this.

how about this:
gx install X acts like npm install X, no package.json changes
gx import X acts like npm install --save X, and updates the package.json
gx install --save X can essentially be an alias to gx import
gx install currently expands to gx install X Y Z, just like npm install

@hackergrrl
Copy link
Contributor

@whyrusleeping yes! Brilliant. :)

Just to clarify, I think that both install and import should both still create the named symlink in vendor/ -- agreed?

@whyrusleeping
Copy link
Owner

@noffle yeah, i want to keep that. Right now, the link is added at the same time its imported, and the linkname is written to the package.json so that the same link is created on further installs.

@whyrusleeping
Copy link
Owner

this now does a thing, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants