Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 398109

Summary: Remove usage of PromisedIO
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: NodeAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-01-14 12:56:47 EST
The Orionode code currently depends on the Promised-IO library [1]. We should look at removing this dependency. Here's a list of what we're using from it:

1. Deferred(), all()
--------------------
Orion has perfectly good implementations of these in Deferred.js. We should use them instead.

2. Promised-based Node filesystem API
-------------------------------------
As an experiment, I've written a standalone npm module [1] that reflects Node's built-in "fs" library into a Deferred-based API using Orion's Deferred. We can use this instead of promised-io/fs.

3. Sequential promise generation
--------------------------------
Promised-IO provides "seq()" which allows several promises to be executed in sequence by invoking an array of generator functions. This comes in handy for async tasks that need to run in a particular order (like much of the build). Should investigate writing a replacement for this (ideally based on a Promises/* spec if one exists for higher-level async operations).

[1] https://npmjs.org/package/promised-io
[2] https://npmjs.org/package/deferred-fs
Comment 1 Mark Macdonald CLA 2013-02-07 11:52:47 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=3112e475d4350ec6984baa46f21b4c0a3da3fe89

2) Use 'deferred-fs' for the equivalent of promised-io/fs.

3) Use 'sequence' in lib/async.js for the equivalent of PromisedIO.seq.