-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
please remove node
symlink from iojs installer
#796
Comments
If you need Node.js and io.js to coexist on your system, you can use nvm |
Is it really to much to ask for an explanation for this? What purpose does this symlink serve? I would like to switch https://github.com/sintaxi/harp to iojs but this is preventing me from doing that as I'm not comfortable forcing the harp community to abandon NodeJS. This behaviour hostile and unprofessional and the lack of explanation leads me to believe this "feature" is self-serving and not operating in good faith. Please don't dismiss this without an explanation as to why iojs feels compelled to override competing binaries on my machine. |
This does seem like a good case for a simple confirmation in the installer as to whether or not you want the symlink |
@sintaxi I think the explanation is here: #249 (comment) (and there's an even longer discussion at #631) |
It is like MariaDB vs MySQL : io.js is a replacement for Node. Too many modules/scripts rely on the |
This was closed primarily because it is a duplicate. You can find extensive explanation in linked issues |
@sintaxi your harp project relies on this as well as many other packages: https://github.com/sintaxi/harp/blob/master/bin/harp#L1 |
Harp is asking for NodeJS because that is what it depends on. I would like Harp to depend on iojs instead but I'm not going to force the entire Harp community to abandon NodeJS just because Harp wants to use iojs. I can't in good conscience force this decision on them because its not my place to make that decision for them. |
@sintaxi io.js symlinks to node so that it is usable as node, and so that your files with |
@vkurchatkin btw - thanks for the explanation. If you prefer to close this ticket I can move discussion to issue #249 |
@Fishrock123 I understand the explanation it just isn't based on facts. If the user has NodeJS installed which is what the script is asking for, it will run just fine. In reality the scripts are much more likely to break if some systems run |
@Fishrock123 what about a bin shim that would run iojs or node depending on external config? Or maybe at least making this an option in the installer? |
@sintaxi considering the aim is to keep backwards compatibility, how is this more of an issue than upgrading to 0.12? @indexzero not sure, I'm probably not the best person to cc for that. :) |
There's also a significant amount of commentary in #43 |
If you want to know why the symlink is required, try removing it and seeing just how broken everything in the ecosystem gets. So many things assume the binary name is "node" that, if we want to maintain compatibility, we have to use the same name or the vast majority of tools are just plain broken. There may be some clever way to make a wrapper script that can figure out what to run from some environment variable hack, but I don't think it'd be much less intrusive than just using a version manager, like nvm. Really, I think the solution is just to merge back with node.js at some point and forget all this symlink nonsense. The new foundation is a good step in that direction, but it needs further evaluation to see if merging aligns with the goals of io.js. |
@Fishrock123 its in issue because the script is asking to use the |
@Qard as the author of one of the most globally installed modules (forever) I can say with certainty that the symlink is necessary. I (and authors like me) do not want to change how our main executables are structured |
Removing the symlink only breaks my node scripts because iojs chose to clobber my If this is a package ecosystem issue than lets raise awareness and get people to update their modules to something that is sustainable. People will update because those that don't will get left behind. |
io.js is a version of node. saying that it clobbers |
@vkurchatkin This has nothing to do with MY needs. If I tell users to install iojs because my modules depend on it than I am forcing NodeJS OFF other peoples machines which does not sit well with me. If you are saying you understand and that is something iojs is cool with than I suppose this discussion has come to an end but in my view that makes I would be profoundly disappointed if this is the case as I feel this project shows a lot of promise. |
@sintaxi I'm not sure what your needs are. I've tried running |
The problem I see is you may now have other projects on your system that don't work because you clobbered node by installing iojs. That is the concern I have. If I instruct users to install iojs they are (in most cases unknowingly) clobbering their NodeJS binary and I have doubts this behaviour would be expected. If |
0.12 will do the same.
0.11 and 0.12 modules also do this. Tell people to use a node version manager.
By definition, io.js is neither malware, nor a computer virus. io.js is a version of node. Period. |
See the above. io.js is a version of node. |
This is disingenuous to say the least. Why then do we create an I think this project deserves more credit than you are giving it and this is putting far too much stock into the "node" name. I believe io.js can stand on its own and win the community over it doesn't need to stoop to these hostile tactics. Yes modules will need to be updated but that is not as big of deal as its being made out to be. Most people already have node installed and will likely for quite sometime. Forcing people to pick a side is not putting the community first. There is no need for a standoff. |
Not really in any meaningful sense. This may be more true-ish if there was a stated compatibility goal (which seems to have been abandoned, from what I can tell?). As it stands, there are already breaking differences between iojs and node. And barring any progress on the reconciliation front that also results in API reconciliation (or whatever a better term for that is), it seems a bit reckless to just assume that they're interchangeable. That may have been 99% "ok" for the initial release (and making NPM work out-of-the-gate), but it ultimately seems short-sighted as API decisions continue to diverge over time. |
Can you name some? io.js 1.x.x is supposed to be fully backwards compatible |
If node is already installed, is the symlink created anyway? If no and yes, there is no issue here. |
@naholyr The answers are YES and YES and Node.js does the same thing. @sintaxi If you have both installed that would also break it without an NVM. Furthermore, to not "clobber" the Node instillation would make people think you can use both without a NVM which is not possible. This is not a hostile tactic this is just the fact that they can't be used together without a NVM. Also, you do not need to change you reference due to the symlink. That way users can make a choice of which they will use. If you want you can include a recommendation for io.js but if that bothers you don't or include a warning. |
Then wouldn't a good solution be the installer not to overwrite existing How about that? default = do not overwrite + maybe a checkbox to change that. Anyway I join the "use nvm" voices: I think it's already mandatory when working with node itself only. |
@naholyr The problem is if you don't overwrite the node binary neither will work. |
As echoed several times throughout this discussion, if you need them side-by-side, then you really have to use a NVM. That being said, the aim of iojs wasn't ever to be a new product with the intention of competing, it was to be a test ground that could be used to accelerate progress and introduce new features faster, safely (as most people would be using it in production already) and in a more iterative and predictable release schedule than how Joyent had been with NodeJS. I'd really suggest listening to NodeUp Podcast #81 as the had on Mikeal Rogers and Isaac Schlueter (iojs founders) and Chris Dickinson (of Wallmartlabs) where they basically only see the project continuing in its current for or a year or two, and that they wanted to get to a position that all the great things learned and contributed to iojs would be accepted and merged back into NodeJS core (Joyent permitting, which now that they have set up a foundation to oversee Node I cannot image them being opposed to). On the question of hostility: iojs is not trying to steal consumers away from node, its first few releases (nightlies) didn't include the symlink, and so much was borked, as soooo many (too many to expect people to change overnight) modules require the node bin. I ABSOLUTELY agree that a checkbox should be added to the installer to allow you to not have the symlink (stubbed exe on windows) installed with the rest of iojs, but node (and therefore iojs) is supposed to be easy and just work, and therefore its good practice to default the symlink on. tldr; you aren't meant to have both installed and expect them to work together, and if you find a situation where you do need to, you should be using nvm. iojs isn't being hostile it's being practical. |
The exact same problems occur from any major node version bump. (or minor, in Node.js land) |
Like the standoff between 0.10 and 0.12. Or 0.8 and 0.10. If a user doesn't understand the nature of versioning and how different versions could override another, maybe they shouldn't be working in the industry. Yes, maybe there should be more documentation on how to have concurrent installs properly, that is something we as the website working group can take a look at (We're already talking about implementing a guide section). Yes, maybe there should be a checkbox to not override the node if already installed. But to call the entire project hostile, disingenuous and creating a standoff is hyperbolic at best. |
There are probably 2 issues here really:
Either way, the same problems exist whether you're using |
When you use I can't understand why anyone would expect to be able to use |
Having thought on this some more and reading over the comments, I think this makes more sense that I was initially giving it credit for. I do think this needs better communication and stronger guarantees, though (even/especially in the installer). It's not really fair to shrug this off as an analog for node clobbering another version of node:
TLDR:
I realize this isn't the tone or spirit of the message, but I feel like what's currently being communicated is "we don't want to break our binary, so we'll replace (break) the other one instead, but don't worry because it will maybe/possibly/probably be a good drop-in replacement". I'm just looking for something more clear than the maybe/possibly/probably part. And for all I know, that's already very clearly documented somewhere - I just can't find it if it is. Thanks :) |
I really don't like symlink for node either. Not only does this break node installs, but It requires that iojs mirror all expected behaviour for node. Correct me If I'm wrong here, but If someone writes a module that contains a call to node, shouldn't we expect node to be used? I'm talking about modules that are either globally installed, or have package scripts. If these modules we're built with node, then maybe they should be run on node. The same can be said for new modules that are authored against iojs. As far as I know this doesn't affect modules that are required by a script, am I correct? If someone wants to use modules that were written for node on iojs, or vice-versa then let them symlink manually. It may suck that you have to install node for older global modules, but for the sake of sanity, we shouldn't be touching other binaries. I would add it's probably better to allow module authors to add iojs support rather than try to shoe horn the support for them in this way. |
This is a given no matter what. In order to remain compatible with all the modules in
This is actually very similar to what happens with different implementations of the jvm, all of which clobber the |
Edit: Considering @mikeal's comment below this speculation on my part is not particularly accurate I think we could more explicitly declare a philosophy that's close to MariaDBs:
Minor edits with
I do wonder if that statement is actually part of the official plan of record, however. |
@kenperkins I have some similar language about ensuring compatibility in the roadmap and in the stability policy. The problem we have is that while we are compatible with node 0.12.0 JS API (not C++ because of the difference in v8) and not entirely with 0.10.x because of some differences (improvements) in streams, we still can't say we will ensure compatibility with 0.12.x because Joyent could add modified versions of our API additions or change behavior in a point release (there is no official policy they are committed to on this). All we can really say is what we've already stated in the stability policy which is that we won't break compatibility with prior releases on the JS side. |
I'll have to make sure I don't re-use the MariaDB analogy then, considering that. Thanks for the clarification. |
@targos Thanks for the |
Sorry to ressurect this thread, but can't io.js replace the node executable by an executable that will first check if another version of Node is installed and use that, otherwise it uses iojs? That way, programs that strictly depend on iojs can use I honestly do not understand why no one is discussing this possibility. It seems like the most obvious one to me. I'm not saying it's perfect; it just seems the best to me. A version manager would be great, if only version managers didn't tend to suck so bad. They're my main grudge against Python and Ruby. I really didn't want to see Node going that way. @indexzero, what do you think of that? Edit: Are packages compiled for iojs via npm installed on a special iojs directory or are they stored on the same directory Node uses? If the latter, than more would need to be done to get both to work side-by-side. |
So, if we overwrite an existing node installation with an executable, what is there to detect, since the previous one has been removed? |
@rvagg: I think what @n2liquid means, is to replace the node binary inside the iojs directory with a binary that first checks if there is an existing node installation, and only links to the iojs binary when there isn't an existing node installation (feel free to correct me @n2liquid). (@rvagg: totally off topic, but I loved the the latest NodeUp - Never enough of us ANZAC's around, haha) |
"iojs directory" only makes sense on Windows, everywhere else it's a shared |
@rvagg: ahh, that's true, my Windows past is showing; feel free to ignore me. |
@rvagg: So I trust it you've considered deeply the possibility of replacing the This is tough. I know it is. But it's insane to think there isn't a simple solution to it. GNU has come a long way, and there's still no easy way to handle this? This doesn't look like an uncommon scenario: Two or more packages offer the same executable. User can select which one he wants at anytime and if the one in use is removed, it falls back to another one, until there is no more options left; then the executable is gone. I think I've seen some package managers offering such a feature (Portage?), but not all. |
Debian-based systems do it with alternatives but that needs to happen at a package-level, we're considering this over at https://github.com/nodesource/distributions but we have enough on our plate right now that it's not a high priority. OS X installers are pretty rudimentary and I really don't know what the state-of-the-art is there (or if there is such a thing - they don't even do "uninstallers" on OS X). Windows is ironically best placed to do this easily given the mechanism you're proposing. However, what you've suggested involves a lot of magic on the user's behalf, you're making an assumption about what they are wanting to actually invoke and you don't have enough information to even make an informed assumption! The most straight-forward way to make an assumption about what the user is wanting to invoke is to just use the version they last installed, which is the current situation now across all of our installers. Running both io.js and Node.js on the same computer is something that only concerns some developers, most devs and I'd suggest almost all production deploys will only be using one version of one project. Given that version managers like nave, n, nvm, nvm.sh have adapted to the new reality of letting you install multiple versions and do it quite well, this issue is a very low priority for the project. If you want to run Node.js, install that, if you want to run io.js, install that, if you want to run both for some reason, use a version manager, they are perfect for developers and give you an easy way to always grab the latest version as a bonus. |
@rvagg 👍 |
+1 |
Now that we've agreed to merge into the Node Foundation there's not really a point. Maybe if someone can put in the work for a patch to make it optional. |
https://www.binarysludge.com/2015/01/14/how-to-uninstall-io-js-or-io-js-and-node-js-together/ sudo rm /usr/local/bin/node && ln -s /usr/local/Cellar/node/0.10.32/bin/node /usr/local/bin/node
node --version
iojs --version |
👍 rambo-panda |
Why: in short, so that node executable files work properly. (See above for more context.) No such symlinks will exist in the converged node because it will only be |
Is there a good reason the iojs installer creates a
node
symlink? Its seems quite invasive to me and not in the spirit of being a good open source citizen so I'm hoping there is a good reason for it to be there. If not, please remove it.Apart from it being inappropriate its also inconvenient as I'm sure many people want to dabble with
iojs
while maintaining their production NodeJS systems. This makes it more challenging and will create unexpected behaviour for those who do not read the installer process.The text was updated successfully, but these errors were encountered: