Coder Social home page Coder Social logo

Comments (44)

jaydson avatar jaydson commented on April 28, 2024

👍 for this one.

from node.

arb avatar arb commented on April 28, 2024

To that same effect, I would like to see version switching (of io.js) build directly into the run time. Needing a separate tool to version switch is just added overhead. I'm pretty sure anyone doing work on node/io.js has either nvm or n already installed so making one pack-in solution seems like a good idea to me.

from node.

gkatsev avatar gkatsev commented on April 28, 2024

Not sure we'd want to have such a thing built into core. Perhaps the binaries can ship with a specific tool, a kin to how npm ships with it.

from node.

Fishrock123 avatar Fishrock123 commented on April 28, 2024

See also: node-forward/discussions#6

from node.

therebelrobot avatar therebelrobot commented on April 28, 2024

👍 to this entire discussion

from node.

ljharb avatar ljharb commented on April 28, 2024

Please note that this may apply to environment variables such as $NODE_PATH, although that's an easier thing to handle, as well as installation methods and relative file paths within the installation directory.

For another +1, if nvm adds iojs support, then travis-ci gets it too with no extra work on their end.

from node.

kenperkins avatar kenperkins commented on April 28, 2024

@arb What's the motivation for adding versioning complexity directly to core itself? I find nvm works great.

from node.

kenperkins avatar kenperkins commented on April 28, 2024

Also +1 to nvm, n, etc support.

from node.

arb avatar arb commented on April 28, 2024

If the versioning is built in, deployments and authoring would probably become easier you would have consistency with how to change versions across different environments.

My main thought was that it's just a tedious chore to ALWAYS have to set up some kind of versioning manager. We all basically need it anyway, why not build it in/ship the binary with it already included like npm.

from node.

sergiolepore avatar sergiolepore commented on April 28, 2024

Awesome! 👍

from node.

smikes avatar smikes commented on April 28, 2024

There are two topics here:

  1. making io.js work with nvm, nvmw, etc..
  2. including one (or more) of nvm, n etc. with official distribution packages of io.js.

I am in favor of both of those, but I think we should talk about them separately. Item 1 will be useful for testing early releases -- such as [email protected]. Item 2 is more like a post-1.0.0 feature from what I understand of the io.js roadmap. (Item 2 also offers more opportunity for bikeshedding...)

I propose that discussion of item 1 stays here and discussion of item 2 goes to node-forward/discussions#6 (which I was not aware of when I created this issue, even though I commented on that issue a month ago...)

@ljharb Can I assume you don't mind me starting to dig around in nvm to put together a PR for the io.js repositories, once they are established?

from node.

ljharb avatar ljharb commented on April 28, 2024

@smikes Not at all, it's appreciated! Multiple smaller PRs preferred, and I'll want to follow the cowpath I've built for node 0.12 and later (the "versions" subdirectory) to make sure that iojs versions end up in a subdirectory as well - but we can bikeshed these things on the nvm repo.

Currently nvm lists versions by scraping the nodejs.org website, which is also where it downloads binaries. Will there be a reliable source for listing iojs versions, and also downloading binaries?

from node.

kenperkins avatar kenperkins commented on April 28, 2024

Maybe we can expose an api as a function of the build system on iojs.org?

from node.

gkatsev avatar gkatsev commented on April 28, 2024

@ljharb I think there will be a better listing, eventually: https://github.com/iojs/build

from node.

smikes avatar smikes commented on April 28, 2024

Will there be a reliable source for listing iojs versions, and also downloading binaries?

This is exactly the sort of thing I want to discuss here. No idea if planned, sounds like a good idea though. ;-)

Since iojs is planning to follow semver, there's that, at least.

from node.

bnoordhuis avatar bnoordhuis commented on April 28, 2024

Will there be a reliable source for listing iojs versions, and also downloading binaries?

I think that can be arranged. Do you need something like a .txt with file paths or would a base URL + predictable path work (e.g. https://iojs.org/download/x.y.z/iojs-x.y.z.tar.gz)? I guess you'd still need a list of released versions.

from node.

smikes avatar smikes commented on April 28, 2024

I would like to have two resources at static locations --

  1. a text file which documents all available releases
  2. a text file which identifies the latest version, or (if there are multiple release streams eg stable, canary) the latest in each release stream

Item 2 is useful in a brew doctor type context, where I want to do a quick request and let the user know if an upgrade is available, while Item 1 is what a fully-capable tool like nvm wants.

Since nvm is a shell script, simpler is better. A parseable list of each tar.gz would be ideal. Notionally:

$ curl https://iojs.org/download/all-versions.txt
https://iojs.org/download/1.0.0-a1/iojs-1.0.0-a1.tar.gz
https://iojs.org/download/1.0.0-a2/iojs-1.0.0-a2.tar.gz
https://iojs.org/download/1.0.0/iojs-1.0.0.tar.gz
$ curl https://iojs.org/download/latest-versions.txt
stable: https://iojs.org/download/1.0.0/iojs-1.0.0.tar.gz
latest: https://iojs.org/download/1.0.0/iojs-1.0.0.tar.gz
canary: https://iojs.org/download/1.0.0/iojs-1.1.0.tar.gz

Do those sound like reasonable URLs? https://iojs.org/download/all-versions.txt and https://iojs.org/download/latest-versions.txt

from node.

ljharb avatar ljharb commented on April 28, 2024

What @smikes is suggesting would work perfectly, especially because it's easily curlable and parseable.

from node.

alexgorbatchev avatar alexgorbatchev commented on April 28, 2024

may I suggest the following:

$ curl https://iojs.org/download/all-versions.txt
1.0.0-a1: https://iojs.org/download/1.0.0-a1/iojs-1.0.0-a1.tar.gz
1.0.0-a2: https://iojs.org/download/1.0.0-a2/iojs-1.0.0-a2.tar.gz
1.0.0: https://iojs.org/download/1.0.0/iojs-1.0.0.tar.gz

from node.

SomeoneWeird avatar SomeoneWeird commented on April 28, 2024

What about a json blob with a latest key?

from node.

keithamus avatar keithamus commented on April 28, 2024

What about replicating/emulating NPM's JSON structure? Seems to work well for them. Something like:

{
    "dist-tags": {
        "latest": "1.0.0",
        "beta": "1.1.0-beta"
    },
    "versions": {
        "1.0.0": {
            "dist": {
                "shasum": "2f246aeae428f07feaceb8d39a2e3870a978c9f8",
                "tarball": "http://iojs.io/download/1.0.0.tgz"
            }
        },
        "1.1.0-beta": {
            "dist": {
                "shasum": "910e639e7f523e8fa28047307aecfd89fe6a55a7",
                "tarball": "http://iojs.io/download/1.1.0-beta.tgz"
            }
        }
    }
}

from node.

ljharb avatar ljharb commented on April 28, 2024

JSON is much nicer but much more difficult to parse on a shell. I'm all for a JSON option but please let's also provide a straight plain text option?

@alexgorbatchev's modification to all-versions.txt is better 👍

from node.

smikes avatar smikes commented on April 28, 2024

JSON is much nicer but much more difficult to parse on a shell. I'm all for a JSON option but please let's also provide a straight plain text option?

The challenge of a version manager is it has to work when there is no node installed. That's bad enough with nvm running under a POSIX-y shell, but think how hard it must be for nvmw who have to do it under CMD.EXE or (if lucky) powershell.

Plain text for now. JSON for 1.1 or 2.0

@alexgorbatchev's modification to all-versions.txt is better 👍

Also 👍 to version: url

from node.

bnoordhuis avatar bnoordhuis commented on April 28, 2024

Nominating for the v1.0.0 milestone. I suggest a simple line-based $version $url because it's easy to parse.

/cc @Fishrock123 - I expect that the list will have to be updated manually for now. Ideally, it's auto-generated but it's unclear to me how that would work. A cron job running on dist.iojs.org? Generated by the CI when releasing? TBI.

from node.

naholyr avatar naholyr commented on April 28, 2024

How does nvm work for node already? Would not the best way to make life easier for @ljharb be to just provide the exact same files, same paths, same formats, with just a different domain name?

from node.

ljharb avatar ljharb commented on April 28, 2024

That would indeed make it insanely trivial for me to add iojs support to nvm. However, the current method for nvm ls remote of scraping a webpage and parsing stuff out of it is atrocious, and I'd love to move away from that.

from node.

naholyr avatar naholyr commented on April 28, 2024

Oh OK didn't know that ;) then 👍 for @alexgorbatchev 's version: url very easy to parse. May I propose = instead of : as separator? It would then become simple ini data, which is fast & safe & easy to parse in any language.

from node.

Fishrock123 avatar Fishrock123 commented on April 28, 2024

@bnoordhuis we'd definitely want to have shasums directly along side of them, imo.

from node.

bnoordhuis avatar bnoordhuis commented on April 28, 2024

@Fishrock123 Yes, agreed.

from node.

mostman1043 avatar mostman1043 commented on April 28, 2024

As someone responsible for the engineering team of a software company that is built on top of Node - this right here is what will get us to test out and contribute to io.js. If anyone needs any feedback or help getting this going, I'm raising my hand.

from node.

caineio avatar caineio commented on April 28, 2024

Hello!

I am pleased to see your valuable contribution to this project. Would you
please mind answering a couple of questions to help me classify this submission
and/or gather required information for the core team members?

Questions:

  1. Issue-only Does this issue happen in core, or in some user-space
    module from npm or other source? Please ensure that the test case
    that reproduces this problem is not using any external dependencies.
    If the error is not reproducible with just core modules - it is most
    likely not a io.js problem. Expected: yes
  2. Which part of core do you think it might be related to?
    One of: debugger, http, assert, buffer, child_process, cluster, crypto, dgram, dns, domain, events, fs, http, https, module, net, os, path, querystring, readline, repl, smalloc, stream, timers, tls, url, util, vm, zlib, c++, docs, other (label)
  3. Which versions of io.js do you think are affected by this?
    One of: v0.10, v0.12, v1.0.0 (label)

Please provide the answers in an ordered list like this:

  1. Answer for the first question
  2. Answer for the second question
  3. ...

Note that I am just a bot with a limited human-reply parsing abilities,
so please be very careful with numbers and don't skip the questions!

In case of success I will say: ...summoning the core team devs!.

In case of validation problem I will say: Sorry, but something is not right here:.

Truly yours,
Caine.

Responsibilities

  1. indutny: crypto, tls, https, child_process, c++
  2. trevnorris: buffer, http, https, smalloc
  3. bnoordhuis: http, cluster, child_process, dgram

from node.

smikes avatar smikes commented on April 28, 2024
  1. yes
  2. other
  3. v0.12

Marking this as "v0.12" because it would be good if this were stably implemented < v1.0.0, to facilitate testing and deployment of v1.0.0-alpha releases; please relabel if appropriate /cc @bnoordhuis

from node.

caineio avatar caineio commented on April 28, 2024

...summoning the core team devs!

from node.

ljharb avatar ljharb commented on April 28, 2024

Awesome - if someone could put up example content anywhere for me to play with, that pointed to a real installation URL (of any version), then I could get something out prior to the iojs release that would, for everyone else, start working once a release came out. Otherwise there'll be a bit of lag time while I do testing :-)

from node.

cjihrig avatar cjihrig commented on April 28, 2024

Is the format of the file(s) the only thing in question? Can you point the files to joyent/node installations for the time being for testing?

from node.

Fishrock123 avatar Fishrock123 commented on April 28, 2024

@mikeal can this be on a tc agenda please?

from node.

mikeal avatar mikeal commented on April 28, 2024

@Fishrock123 we don't have any control over this do we? this is up to the nvm maintainers. Once we have a release I'll send them a PR myself if I have to :)

from node.

gkatsev avatar gkatsev commented on April 28, 2024

@mikeal the thing that can go on the agenda is whether iojs will provide a file with the builds and urls to builds in the following format: #40 (comment)

from node.

mikeal avatar mikeal commented on April 28, 2024

ah, ok. adding to tc agenda.

from node.

Fishrock123 avatar Fishrock123 commented on April 28, 2024

@gkatsev We'll be doing some format of that anyways.

@mikeal it would be nice to have an official one imo

Edit:

More specifically it would be nice to have something builtin where users can easily upgrade versions without having to install anything extra.

I know this is feature creep, but it seems worthwhile.

Maybe not TC for now then.

from node.

ljharb avatar ljharb commented on April 28, 2024

@mikeal I am the nvm maintainer, and you won't need to send a PR if I have the right info available to me and if I won't have to rewrite everything to support iojs :-)

from node.

crueber avatar crueber commented on April 28, 2024

@ljharb That would be awesome. I would dig not having to a whole lot to do but hit an nvm install. :)

from node.

JJ avatar JJ commented on April 28, 2024

👍 1:

from node.

rvagg avatar rvagg commented on April 28, 2024

After discussion in the TC meeting, see #144, the outcome is:

  • TC wants to make it easy for version managers / installers
  • The details are not necessarily the responsibility of the TC to bikeshed right now so the mechanics of the distributions, including catalog files will be passed to the build team for now and will come back to the TC prior to formal release for acceptance.

See nodejs/build#22 where I've pulled in a bunch of you already, we can continue discussion there but perhaps wait until we have started work on something and then we can iterate to make sure everyone is happy.

from node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.