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

io.js support #616

Merged
merged 24 commits into from
Jan 20, 2015
Merged

io.js support #616

merged 24 commits into from
Jan 20, 2015

Conversation

ljharb
Copy link
Member

@ljharb ljharb commented Jan 19, 2015

This branch adds support for https://github.com/iojs/io.js / https://iojs.org/

The following features should now work:

  • nvm install iojs will install the latest io.js version. nvm ls iojs and nvm use iojs will function as you'd expect.
  • nvm install node will install the latest stable node version. nvm ls node and nvm use node will function as you'd expect.
  • In general, a specific io.js version can be referenced with the "iojs-" prefix. If node were to ever release a v1.0.0, v1.0.0 would refer to node, and iojs-v1.0.0 would refer to io.js. In the near future, node-v1.0.0 will also refer to node unambiguously. This applies to all nvm commands, including working with aliases and .nvmrc files.
  • io.js, unlike node, does not have a SunOS binary. Please open an issue on https://github.com/iojs/io.js if this is actually a problem for anyone, as currently it seems like this won't be for anybody.

Note: checksum support upon installation is currently disabled. Relates to nodejs/node#368.
Note: installation of io.js directly from source (via the -s option) is not yet enabled. This will be added soon.

Relates to nodejs/node#40 nodejs/node#420
Fixes #590

I'm going to merge and release this after a number of people test this on their own machines - hopefully sometime on the 19th.

Constructive feedback about this feature, or its usage, is welcome. Please keep "+1"'s and comments that add no value to a minimum.

@ljharb ljharb added the io.js This relates to https://iojs.org/ label Jan 19, 2015
@ljharb ljharb self-assigned this Jan 19, 2015
@rvagg
Copy link

rvagg commented Jan 19, 2015

checksum still disabled, you can't find a way to do sha-256 reliably? have you tested widely?

@ljharb
Copy link
Member Author

ljharb commented Jan 19, 2015

@rvagg I've been primarily focused on getting all the functionality working - I haven't had a chance to test widely. I'm hoping that io.js can simply start including (and retroactively include) SHA-1 checksums along with every version and then I don't have to rely on 256 being available. The likelihood of a tampered file with a checksum that collides under SHA-1 but not under SHA-256 is pretty astronomically low :-)

@rvagg
Copy link

rvagg commented Jan 19, 2015

moar file clutter, moar process

@smikes
Copy link

smikes commented Jan 19, 2015

I pulled the branch to try testing it out

  1. First I ran install.sh. Nothing appeared to change; nvm install iojs didn't work
  2. then I just ran . nvm.sh ; Now testing w/ iojs
  3. nvm ls-remote did not show iojs versions at first
  4. nvm install iojs worked, installed v1.0.2, now running with that...

iojs is nice. But I should be testing nvm..

Above confusion comes in part because new nvm has version 0.22.2, same as old, and install.sh has ref to upstream/master github blobs

@basti1302
Copy link

Looks good on GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu) on Linux Mint 17.

Tested:

  • nvm install iojs
  • nvm ls-remote
  • nvm use iojs
  • nvm use node
  • nvm use stable

@mgol
Copy link
Contributor

mgol commented Jan 19, 2015

I thought I'd have to write nvm install iojs-v1.0 but nvm install iojs-1.0 worked as well. I've also tested .nvmrc with contents: iojs-1.0 and nvm install & nvm use worked as expected in the directory.

nvm use 1.0 worked fine as well. *It would be nice if nvm install 1.0 tried iojs when the matching Node version didn't exist (but it's nothing terribly important).

Nice work!

This change:
 - removes a superfluous N/A
 - fixes the exit code to return 0 unless no version is found
 - enables `nvm install v1` and similar patterns.
@fengmk2
Copy link

fengmk2 commented Jan 20, 2015

It works!

👿  nvm ls
    iojs-v1.0.0
    iojs-v1.0.1
    iojs-v1.0.2
->  iojs-v1.0.3
        v0.8.26
        v0.8.27
        v0.8.28
       v0.10.21
       v0.10.22
       v0.10.23
       v0.10.24
       v0.10.25
       v0.10.26
       v0.10.27
       v0.10.28
       v0.10.29
       v0.10.30
       v0.10.31
       v0.10.32
       v0.10.33
       v0.10.34
       v0.10.35
        v0.11.9
       v0.11.11
       v0.11.12
       v0.11.13
       v0.11.14
stable -> 0.10 (-> v0.10.35) (default)
unstable -> 0.11 (-> v0.11.14) (default)

@ljharb
Copy link
Member Author

ljharb commented Jan 20, 2015

I'll be merging this shortly, followed by a release of v0.23.0 of nvm.

ljharb added a commit that referenced this pull request Jan 20, 2015
Add `io.js` support.

This branch adds support for https://github.com/iojs/io.js / https://iojs.org/

The following features should now work:
 - `nvm install iojs` will install the latest `io.js` version. `nvm ls iojs` and `nvm use iojs` will function as you'd expect.
 - `nvm install node` will install the latest stable `node` version. `nvm ls node` and `nvm use node` will function as you'd expect.
 - In general, a specific `io.js` version can be referenced with the "iojs-" prefix. If `node` were to ever release a `v1.0.0`, `v1.0.0` would refer to `node`, and `iojs-v1.0.0` would refer to `io.js`. In the near future, `node-v1.0.0` will also refer to `node` unambiguously. This applies to all `nvm` commands, including working with aliases and `.nvmrc` files.
 - `io.js`, unlike `node`, does not have a SunOS binary. Please open an issue on https://github.com/iojs/io.js if this is actually a problem for anyone, as currently it seems like this won't be for anybody.

**Note**: checksum support upon installation is currently disabled. Relates to nodejs/node#368.
**Note**: installation of `io.js` directly from source (via the `-s` option) is not yet enabled. This will be added soon.

Relates to nodejs/node#40 nodejs/node#420
Fixes #590
@ljharb ljharb merged commit 879dda6 into nvm-sh:master Jan 20, 2015
fengmk2 added a commit to fengmk2/nvmw that referenced this pull request Jan 20, 2015
@jalcine
Copy link

jalcine commented Jan 20, 2015

Totally awesome! Thanks for all of the hard work!

@nikolay
Copy link

nikolay commented Jan 20, 2015

A bit too late to this discussion, but why it is "iojs" and not just "io"? It's inconsistent with "node", which should otherwise be "nodejs" for consistency.

@mikeal
Copy link
Contributor

mikeal commented Jan 20, 2015

It would be cool if nvm install v1.0.3 worked as expected :(

@ljharb
Copy link
Member Author

ljharb commented Jan 20, 2015

@nikolay it's the same number of letters as "node"? ¯_(ツ)_/¯ It's too late to remove "iojs" (yesterday was the day for that kind of feedback), although I could add "io" as the prefix too in the future if there's enough interest to warrant the complexity. fwiw, if you never install node versions, the prefix shouldn't ever be necessary.
edit: also, yes, iojs is the name of the binary, so actually I'm convinced to leave it the same.

@mikeal that's definitely a bug - nvm install v1 and nvm install v1.0 both work, so too should nvm install v1.0.3. Can you file a new issue for it?

@mikeal
Copy link
Contributor

mikeal commented Jan 20, 2015

@ljharb strange, none of those work for me:

% nvm install v1                                                                                                                                                                           ~
Version 'v1' not found - try `nvm ls-remote` to browse available versions.
% nvm install v1.0                                                                                                                                                                         ~
Version 'v1.0' not found - try `nvm ls-remote` to browse available versions.
% nvm install v1.0.3                                                                                                                                                                       ~
Version 'v1.0.3' not found - try `nvm ls-remote` to browse available versions.
% nvm ls-remote | grep v1                                                                                                                                                                  ~
    iojs-v1.0.0
    iojs-v1.0.1
    iojs-v1.0.2
    iojs-v1.0.3

@idx3d
Copy link

idx3d commented Jan 20, 2015

@nikolay then we should ask the same question about binary. For node.js it is node, but for io.js it is iojs.

@ljharb
Copy link
Member Author

ljharb commented Jan 20, 2015

@mikeal ◉︵◉ please file an issue with your shell and OS and i'll get to work on a fix, those should all be working.

@nikolay
Copy link

nikolay commented Jan 20, 2015

Thank you all - it makes sense. By the way, nodebrew adopted "io" - it would be nice to at least support "io" as an alias.

I think the team behind io.js picked iojs, because io was just too generic. In the early days, everybody was calling Node.js "Node.js" and now more and more people call it just "Node". I don't think this will ever be the case with the too-generic io.js.

@mgol
Copy link
Contributor

mgol commented Jan 20, 2015

Thank you all - it makes sense. By the way, nodebrew adopted "io" - it would be nice to at least support "io" as an alias.

See nodejs/node#28 (comment) for why this is a bad idea.

Anyway, this has nothing to do with this issue which is about supporting io.js in nvm.

@varya
Copy link

varya commented Jan 29, 2015

For me nvm install iojs responds with Version 'iojs' not found - try nvm ls-remote to browse available versions.. And nothing about io.js is mentioned in the remote list. What else should I try to make it work?

@mgol
Copy link
Contributor

mgol commented Jan 29, 2015

You most likely have an out-of-date nvm version. Invoke:
nvm --version
You should see 0.23.0 or newer.

@jalcine
Copy link

jalcine commented Jan 29, 2015

@varya what's the SHA of the nvm version you're using?

@varya
Copy link

varya commented Jan 29, 2015

That's true. nvm --version says 0.17.2. However when I'm trying to update running curl https://raw.githubusercontent.com/creationix/nvm/v0.23.2/install.sh | bash, version stays old :-(

@ljharb
Copy link
Member Author

ljharb commented Jan 29, 2015

@varya have you closed and reopened your shell / re-sourced your bashrc/bash_profile/zshrc?

@varya
Copy link

varya commented Jan 29, 2015

Oh, thanks! I should have guessed that this matters. Everything works finely after update.

@jalcine
Copy link

jalcine commented Jan 29, 2015

Ah, I always forget to do that, heh! I have a resrc function in my shell to reload my ~/.bashrc for little events like this. Glad it's working for you @varya!

@ljharb ljharb deleted the iojs branch November 15, 2023 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
io.js This relates to https://iojs.org/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IO.js, node-forward: should/will NVM support more than node?