Last modified: 2013-08-01 19:05:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47994, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45994 - Incompatible with Node 0.10
Incompatible with Node 0.10
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Arlo Breault
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-11 19:15 UTC by C. Scott Ananian
Modified: 2013-08-01 19:05 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description C. Scott Ananian 2013-03-11 19:15:28 UTC
As documented at http://blog.nodejs.org/2013/03/11/node-v0-10-0-stable/ and http://blog.nodejs.org/2012/12/20/streams2/ the new stable version of node changes the streams API.  As noted there, "Old programs will almost always work without modification, but streams start out in a paused state, and need to be read from to be consumed. WARNING: If you never add a 'data' event handler, or call resume(), then it'll sit in a paused state forever and never emit 'end'."

That matches the behavior I saw when I tested parsoid with a node 0.9 prerelease -- node api/server.js appeared to "hang" without ever doing anything.  I didn't do any digging to find out which part was failing; it could well be one of our npm dependencies which needs to be updated.

As discussed in bug 45993, it appears that a monkey-patch we're doing to domino also stops working in node 0.10.  I'm hoping we get an new upstream release of domino to fix that.

There may be other issues with node 0.10...
Comment 1 C. Scott Ananian 2013-04-17 19:06:49 UTC
See https://github.com/aredridel/html5/issues/73 -- the html5 package also has issues with node 0.10, so bug 47323 is probably a blocker for this bug.
Comment 2 Gerrit Notification Bot 2013-04-24 17:44:41 UTC
Related URL: https://gerrit.wikimedia.org/r/60681 (Gerrit Change Ifd7800f1d2949c4e0b0ce186755e26dc65b2d506)
Comment 3 C. Scott Ananian 2013-04-24 19:30:10 UTC
With the above patch, api/server.js fails with:

TypeError: Cannot assign to read only property '' of #<Object>
    at new Namespace (/home/cananian/Projects/Mediawiki/Parsoid/js/lib/mediawiki.Title.js:116:40)
    at new Title (/home/cananian/Projects/Mediawiki/Parsoid/js/lib/mediawiki.Title.js:19:12)
    at Function.Title.fromPrefixedText (/home/cananian/Projects/Mediawiki/Parsoid/js/lib/mediawiki.Title.js:49:10)
    at WikiLinkHandler.onWikiLink (/home/cananian/Projects/Mediawiki/Parsoid/js/lib/ext.core.LinkHandler.js:127:17)
    at AsyncTokenTransformManager.transformTokens (/home/cananian/Projects/Mediawiki/Parsoid/js/lib/mediawiki.TokenTransformManager.js:596:17)
    at AsyncTokenTransformManager.onChunk (/home/cananian/Projects/Mediawiki/Parsoid/js/lib/mediawiki.TokenTransformManager.js:381:17)
    at SyncTokenTransformManager.EventEmitter.emit (events.js:117:20)
    at SyncTokenTransformManager.onChunk (/home/cananian/Projects/Mediawiki/Parsoid/js/lib/mediawiki.TokenTransformManager.js:945:7)
    at PegTokenizer.EventEmitter.emit (events.js:95:17)
    at emitChunk (eval at <anonymous> (/home/cananian/Projects/Mediawiki/Parsoid/js/lib/mediawiki.tokenizer.peg.js:93:44), <anonymous>:17080:23)

and tests/parserTests.js hangs.  So there's still work to do here.
Comment 4 Andre Klapper 2013-07-04 10:33:46 UTC
[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]
Comment 5 C. Scott Ananian 2013-07-23 20:34:25 UTC
We're hoping that we don't need to update html5 (yet).  The domino fix mentioned above has already been fixed.  The html5 package issues linked from comment 1 looked like they were related to the use of process.nextTick() inside html5's test runner (tap) instead of in html5 proper.  (knock on wood)

The html5 issue report des suggest running node with --throw-deprecation though.

And we do have a number of calls to process.nextTick() in parsoid (in ext.core.ParserFunctions, ext.core.QuoteTransformer.js, mediawiki.ApiRequest.js, mediawiki.tokenizer.peg.js, and tests/parserTests.js).

Worst-case we might need to add a Util.nextTick() to call process.nextTick or setImmediate(), depending on the node version.  Hopefully that won't be necessary, since I don't think we're doing anything too clever with process.nextTick.

For more details on the nextTick issue, see http://stackoverflow.com/questions/15349733/setimmediate-vs-nexttick and
http://nodejs.org/docs/latest/api/process.html#process_process_maxtickdepth
Comment 6 Gerrit Notification Bot 2013-07-26 16:45:54 UTC
Change 76114 had a related patch set uploaded by Arlolra:
Node v0.10.x Compatibility

https://gerrit.wikimedia.org/r/76114
Comment 7 Gerrit Notification Bot 2013-08-01 19:02:59 UTC
Change 76114 merged by jenkins-bot:
Node v0.10.x Compatibility

https://gerrit.wikimedia.org/r/76114

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links