This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 249924 - Consider support of io.js
Summary: Consider support of io.js
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-21 10:00 UTC by Tomas Mysik
Modified: 2015-02-04 10:05 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2015-01-21 10:00:15 UTC
io.js is a fork of node.js. We should have a look at it and try not to block users from using it and ideally add some support for it, if needed. Basically, everything should already work except automatic downloading of sources.

Láďo, if you have any ideas or comments, please let me know. Thanks.
Comment 1 Tomas Mysik 2015-01-21 10:02:11 UTC
To avoid possible clashes in node.js and io.js sources (once they have same versions), we could perhaps force users to download sources of io.js manually (and select it then in NB).
Comment 2 Tomas Mysik 2015-01-21 10:04:34 UTC
Petře, io.js allows to use ES6 [1] - I guess we are not ready for it in the JS editor, right?

Thanks.
[1] https://iojs.org/es6.html
Comment 3 Vladimir Riha 2015-01-21 10:41:08 UTC
I think it would be cool to support it, I'm just not sure how to let user know about it. Have Node.js/io.js everywhere? And when creating new project, should there be io.js mentioned as well? Or should it be support in term of "not mentioned anywhere but working fine if one uses it" :) ?

About the sources, does that mean to have configuration for both Node and IO? In case of the "secret" support, wouldn't it be "enough" to try to recognize io.js from node.js based on given path to the binary (if it ends with io/io.exe or node/nodejs/node.exe). If it fails, user can always set sources manually?
Comment 4 Tomas Mysik 2015-01-21 11:34:45 UTC
(In reply to Vladimir Riha from comment #3)
> I think it would be cool to support it, I'm just not sure how to let user
> know about it. Have Node.js/io.js everywhere? And when creating new project,
> should there be io.js mentioned as well? Or should it be support in term of
> "not mentioned anywhere but working fine if one uses it" :) ?

The last option I would say. At least for NB 8.1.

> About the sources, does that mean to have configuration for both Node and
> IO? In case of the "secret" support, wouldn't it be "enough" to try to
> recognize io.js from node.js based on given path to the binary (if it ends
> with io/io.exe or node/nodejs/node.exe). If it fails, user can always set
> sources manually?

One can always select sources manually so this is fine. Whether to detect and download proper sources needs to be investigated.

Thanks.
Comment 5 Petr Pisl 2015-01-26 10:04:33 UTC
(In reply to Tomas Mysik from comment #2)
> Petře, io.js allows to use ES6 [1] - I guess we are not ready for it in the
> JS editor, right?
> 
> Thanks.
> [1] https://iojs.org/es6.html

No we are not ready for ES6. It will be probably planned for the next release.
Comment 6 Tomas Mysik 2015-01-30 09:23:08 UTC
So, if NetBeans detects io.js (based just on the CLI name, must start with "io"), it will automatically download io.js sources. Such sources are then treated as any other node.js sources, so there is no difference between node.js and io.js. This can, of course, lead to this: once node.js sources with the same version as io.js ones are released, there can be "clashes". But, I don't think that this should be a big problem and happen very often (user will prefer just one platform I guess). Moreover, user can easily solve it - either by downloading sources again or manually selecting any directory.

Thanks.

http://hg.netbeans.org/web-main/rev/e01f3e81486d
Comment 7 Quality Engineering 2015-01-31 07:57:17 UTC
Integrated into 'main-silver', will be available in build *201501310002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e01f3e81486d
User: Tomas Mysik <tmysik@netbeans.org>
Log: #249924 - Consider support of io.js
Comment 8 Tomas Mysik 2015-02-02 08:19:59 UTC
Minor improvement + should work on Mac as well.

Thanks.

http://hg.netbeans.org/web-main/rev/6006106e6244
Comment 9 Quality Engineering 2015-02-03 04:14:35 UTC
Integrated into 'main-silver', will be available in build *201502030002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6006106e6244
User: Tomas Mysik <tmysik@netbeans.org>
Log: #249924 cont'd - Consider support of io.js

Fixed for Mac. Minor refactoring & improvement.
Comment 10 Antonin Nebuzelsky 2015-02-03 16:21:08 UTC
It makes sense for Martin to have a look at V8 debugging compatibility. io.js is using a new version of V8.
Comment 11 Vladimir Riha 2015-02-03 16:48:59 UTC
Would it be worthy/possible to also be "sensitive" to project problem "Node.js: Missing node.js sources" and show "Io.js: Missing io.js sources" for io.js?
Comment 12 Vladimir Riha 2015-02-03 16:52:04 UTC
Btw I might misunderstood Tomas' comment about ES6 support. Io.js sources are written in ES6 and some of used ES6 syntax breaks code completion for some modules (fs for example)
Comment 13 Tomas Mysik 2015-02-03 18:35:33 UTC
(In reply to Vladimir Riha from comment #11)
> Would it be worthy/possible to also be "sensitive" to project problem
> "Node.js: Missing node.js sources" and show "Io.js: Missing io.js sources"
> for io.js?

I will try to look at it but I don't think so; we don't support io.js officially, we just try not to break it :) Let's think about it more for the next release.

Please, report it as a new issue.

Thanks.
Comment 14 Vladimir Riha 2015-02-04 10:05:07 UTC
(In reply to Tomas Mysik from comment #13)
> 
> Please, report it as a new issue.
> 
> Thanks.

Sure, will do.

I tried to use project with iojs, sources were downloaded OK, the same if global NodeJS is set to io.js. It seems OK to me


Product Version: NetBeans IDE Dev (Build 201502040002)
Java: 1.8.0_25; Java HotSpot(TM) Client VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b17
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)