Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#16919 closed defect (fixed)

node version sniffing problem for >= 0.10

Reported by: zzebastien Owned by: Kitson Kelly
Priority: blocker Milestone: 1.7.5
Component: BuildSystem Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Hi, I found a bug in the Dojo Build System and node js v0.10.1

Error log report:

{ [Error: spawn EMFILE] code: 'EMFILE', errno: 'EMFILE', syscall: 'spawn' }
Error: spawn EMFILE
    at errnoException (child_process.js:945:11)
    at ChildProcess.spawn (child_process.js:892:11)
    at exports.spawn (child_process.js:680:9)
    at .../src/util/build/node/process.js:25:16
    at Object.release (.../src/util/build/fileHandleThrottle.js:9:20)
    at ChildProcess.finish (.../src/util/build/node/process.js:30:12)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at Process.ChildProcess._handle.onexit (child_process.js:754:12)

The error is in the file process.js in src/util/build/node/ folder:

The condition check on version >=0.8 is wrong because the node version 0.10.1 is converted to 0.1.

var version = Number(process.version.match(/\d+\.\d+/)[0]) //will return 0.1 for node version 0.10.0 and will be considered as inferior as 0.8 :(
...
if(version>=0.8){
process.on("close", finish);
}else{
++status;
}

Thanks !

Change History (11)

comment:1 Changed 6 years ago by bill

Description: modified (diff)
Summary: BUildSystemnode version sniffing problem for >= 0.10

Confirmed that Number("0.10.0".match(/\d+\.\d+/)[0]) returns 0.1, and that code is still there in trunk.

comment:2 Changed 6 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

In [31266]:

fix node decoding bug; thanks zzebastien; fixes #16919; !strict

comment:3 Changed 6 years ago by Rawld Gill

In [31267]:

remove debugging cruft improperly committed in [31266]; refs #16919; !strict

comment:4 Changed 6 years ago by bill

Milestone: tbd1.9

comment:5 Changed 6 years ago by Kitson Kelly

This needs backporting into 1.8 and 1.7. I can do it if no one minds.

comment:6 Changed 6 years ago by Colin Snover

Milestone: 1.91.7.5
Priority: undecidedblocker
Resolution: fixed
Status: closedreopened

Backport, please.

comment:7 Changed 6 years ago by Colin Snover

Owner: changed from Rawld Gill to Kitson Kelly
Status: reopenedassigned

comment:8 Changed 6 years ago by Kitson Kelly <dojo@…>

Resolution: fixed
Status: assignedclosed

In b3605360d170650222dc621d26c47297a63be83f/util:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:9 Changed 6 years ago by Kitson Kelly <dojo@…>

In 6b4a45ca89d27e445d2409779effa8fde78d40dd/util:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:10 Changed 6 years ago by Kitson Kelly <dojo@…>

In 05ef9ff452c5718308052a0a7de3a36e974700c0/util:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:11 Changed 6 years ago by Kitson Kelly <dojo@…>

In dcbf8c71b2cd3b27af0f05e33e71105d7c385915/util:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.