Closed Bug 955988 Opened 6 years ago Closed 4 years ago

[meta] Running build scripts on node.js

Categories

(Firefox OS Graveyard :: Gaia::Build, defect)

x86
macOS
defect
Not set

Tracking

(tracking-b2g:backlog)

RESOLVED FIXED
tracking-b2g backlog

People

(Reporter: yurenju, Assigned: rickychien)

References

Details

No description provided.
Assignee: nobody → yurenju.mozilla
we should have a integration test case for each build script and then we can running that test case on  node.js & xpcshell
Blocks: 965327
Component: Gaia → Gaia::Build
Assignee: yurenju → nobody
Ricky, this is the bug for node.js
This bug no longer receives priority, removing blocking of bug 908549 (and migration to blocking-b2g: backlog)
blocking-b2g: --- → backlog
Assignee: nobody → ricky060709
Status: NEW → ASSIGNED
Depends on: 1130934
Depends on: 1131468
Depends on: 1131496
Depends on: 1131497
Depends on: 1131499
Depends on: 1131500
Depends on: 1131501
Depends on: 1131502
Depends on: 1131503
Depends on: 1131504
Depends on: 1131505
Blocks: 1131506
No longer blocks: 1131506
Depends on: 1131506
Depends on: 1131510
Depends on: 1131511
Depends on: 1131512
Depends on: 1131513
Depends on: 1131514
Depends on: 1131515
Depends on: 1131516
Depends on: 1131517
Depends on: 1131518
Depends on: 1131519
Depends on: 1131521
Depends on: 1131522
Depends on: 1131524
Depends on: 1131525
Depends on: 1131526
Depends on: 1131527
Depends on: 1138773
Depends on: 1138813
blocking-b2g: backlog → ---
Assignee: rchien → nobody
Status: ASSIGNED → NEW
Assignee: nobody → rchien
Status: NEW → ASSIGNED
Depends on: 1210404
It has been a long time since I touched gaia, and it looks like we are replacing xpcshell issues with some others related to node.
Various contributors keeps saying in the mailing list, there is many edge cases.

The nodejs version checker is great. It would be even better to provide a link to the mdn page that tells us more about that (which provide a useful link to install it!).

It would be great to also do a clang checker!! This is from from being obvious when npm fails during any of our make target.

Also, npm/node comes with tons of possible failures. It would be great to have a dedicated page with all possible failures and ways to get rid of them. Like all these node version issue, clang (or other possibly missing dependencies). Also I had to wipe ~/.npm/ because of some error in random package.json manifest... And if we could, displaying a link to this page anytime something fails would be even better!
Flags: needinfo?(rchien)
Also, README file is completely outdated and doesn't help there. I filled bug 1238501 about that.
Depends on: 1240678
Depends on: 1240740
Depends on: 1242326
Depends on: 1242327
Depends on: 1243351
Sure, I'll take over this documentation for Gaia build once node.js migration is complete.
Flags: needinfo?(rchien)
Assignee: rchien → nobody
Status: ASSIGNED → NEW
I'd like to mark meta bug resolved since our target plan on [1] are already fixed. However, b2g project will deliver to community soon. 

There are some things we haven't done yet before enabling node build system by default:

1. Performance issue - running build system on node is slower than on xpcshell:
  1. Spawn multi-process is slow - Node's child_process is cumbersome than nsIProcess on xpcshell, but the root cause is hard to be addressed without fixing performance issue within node.js. However, we could leverage NPM multi-thread libraries to manage multi-thread in a pool (depends on CPU cores) that would improve performance issue.
  2. Requirejs on node is slow [2] - Due to performance compared between Esprima.js [3] and native Spidermonkey parser, causing Spidermonkey parser wins in this area a lot. However, I found [5] that there is a huge performance regression and that might be a chance to improve if someone is free to take a look and replace esprima with acorn parser.

2. We just make sure all changes don't break `make RUN_ON_NODE=1`, `make RUN_ON_NODE=1 GAIA_OPTIMIZE=1` and `make reset-gaia RUN_ON_NODE=1` but haven't verified for other build flags yet.

Node.js build system will be able to enable by default after above things are done.

[1] https://wiki.mozilla.org/Gaia/Build/RefactoringToNodejs
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1131468#c5
[3] http://esprima.org/
[4] https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API
[5] https://github.com/jrburke/r.js/issues/850
Assignee: nobody → rchien
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.