Confirmed users
429
edits
Ricky Chien (talk | contribs) (→Plan) |
Ricky Chien (talk | contribs) (Undo revision 1067242 by Ricky Chien (talk)) |
||
| Line 17: | Line 17: | ||
= Plan = | = Plan = | ||
[http://nodejs.org/ Node.js] refactoring plan will be split into 4 milestones . | [http://nodejs.org/ Node.js] refactoring plan will be split into 4 milestones . | ||
| Line 29: | Line 25: | ||
* '''Total expected schedule:''' 18 - 22 weeks (5 months) | * '''Total expected schedule:''' 18 - 22 weeks (5 months) | ||
== Milestone 0 == | |||
To ensure our work works on all environments and operating systems, we would like to create test suites on Gaia-Try/Try/b2g-inbound, namely (Gbn/Gbun) tests. They will be keep hidden and red until M1 is complete, as a proof for achieving M1 (explaining below). | |||
* '''Deliverable:''' Enable test suites for node build script | |||
* '''Expected schedule:''' 2 week | |||
* '''Breakdowns:''' | |||
<bugzilla> | |||
{ | |||
"id": "1131469, 1131471", | |||
"include_fields": "id, summary, assigned_to, status, resolution" | |||
} | |||
</bugzilla> | |||
== Milestone 1 == | == Milestone 1 == | ||
Tackle each of the build system core functions (parallel build, webapp-manifests, preferences, webapp-optimize, webapp-zip... etc). All of them exist certain specific code only use for XPCShell. We would also like to finish the previous attempt to wrap Node.js APIs into high-level Utils in (build/node-utils.js) (See also: {{Bug|955988}}). During this milestone, we will ensure the build system continue to work on both XPCShell setup and Node.js. Once we complete all the work for the milestone, Gbn and Gbun should be green and set visible. | |||
* '''Deliverable:''' | * '''Deliverable:''' Complete the implementation of node build scripts that coexist with XPCShell and passes Gbn / Gbun tests | ||
* '''Expected schedule:''' | * '''Expected schedule:''' 4 - 6 weeks | ||
* '''Breakdowns:''' | * '''Breakdowns:''' | ||
<bugzilla> | |||
{ | |||
"id": "955988, 1130934, 955989, 1131468, 1131496, 1131497, 1131499, 1131500, 1131501, 1131502, 1131503, 1131504, 1131505, 1131506, 1131510, 1131511, 1131512, 1131513, 1131514, 1131515, 1131516, 1131517, 1131518, 955994, 1131519, 1131521, 1131522, 1131524, 955996, 1131525, 955997, 955998, 1131526, 955999, 1131527, 1138773", | |||
"include_fields": "id, summary, assigned_to, status, resolution" | |||
} | |||
</bugzilla> | |||
== Milestone 2 == | == Milestone 2 == | ||
* '''Deliverable:''' Turn on node build script by default until stabilization and remove all legacy APIs. | |||
* '''Expected schedule:''' 4 - 6 weeks | |||
* '''Deliverable:''' | |||
* '''Expected schedule:''' | |||
* '''Breakdowns:''' | * '''Breakdowns:''' | ||
** Keep tracking build system status and fix any regression. | |||
** Bug ? - Turn on node build script by default | |||
* Backlog: | |||
** Bug ? - Refactor utils-node.js API and remove utils-xpc.js and utils.js | |||
** Bug ? - Refactor all build/*.js to conform to node-style | |||
== Milestone 3 == | == Milestone 3 == | ||
The M3 goal is to simplify make Makefile into merely a compatibility layer for the existing commands, and move all the logic into external JavaScript-based build tools. By doing so it would improve the maintainability and readability of the build system. We tentatively choose [http://gulpjs.com/ Gulp.js] as target currently as it offers [https://github.com/gulpjs/gulp#incremental-builds incremental builds] and stream workflow. | |||
* '''Deliverable:''' Purge complex logic from Makefile and rely on an external JavaScript-based build tools for most of the complexities. | |||
* '''Deliverable:''' | * '''Expected schedule:''' 8 weeks | ||
* '''Expected schedule:''' | * '''Breakdowns:''' | ||
* '''Breakdowns:''' | ** Extract Makefile logic into JS modules | ||
** Rewrite Makefile targets into JS | |||
*** Task dependency - [https://www.npmjs.com/package/gulp gulp] | |||
*** Parallel build - [https://www.npmjs.com/package/gulp-spawn gulp-spawn] | |||
*** Incremental build | |||
**** Watch file changes - [https://github.com/sindresorhus/gulp-changed gulp-changed] | |||
**** File dependency resolving (speed up incremental build) [https://www.npmjs.com/package/gulp-resolve-dependencies gulp-resolve-dependencies] | |||
*** Edit file content [https://www.npmjs.com/package/gulp-replace gulp-replace] | |||
*** Support ES6 [https://www.npmjs.com/package/gulp-babel gulp-babel] | |||
*** Minify | |||
**** JS [https://www.npmjs.com/package/gulp-uglify gulp-uglify] | |||
**** CSS [https://www.npmjs.com/package/gulp-minify-css gulp-minify-css] | |||
**** HTML [https://www.npmjs.com/package/gulp-minify-html gulp-minify-html] | |||
**** SVG [https://www.npmjs.com/package/gulp-svgmin gulp-svgmin] | |||
**** Image [https://github.com/sindresorhus/gulp-imagemin gulp-imagemin] | |||
*** Concatenate [https://www.npmjs.com/package/gulp-concat gulp-concat] | |||
*** Package to zip [https://www.npmjs.com/package/gulp-zip gulp-zip] | |||
*** Process everything in memory (remove build_stage) [https://github.com/gulpjs/gulp/blob/master/docs/recipes/make-stream-from-buffer.md make-stream-from-buffer] | |||
** Building parameters management | |||
*** [https://github.com/gulpjs/gulp/blob/master/docs/recipes/using-external-config-file.md using-external-config-file] | |||
*** [https://www.npmjs.com/package/parse-env parse-env] | |||
*** [https://www.npmjs.com/package/config-manager config-manager] | |||
** Redesign build.js - A config file rather than lots of build processes | |||
* '''Reference:''' | |||
** https://github.com/RickyChien/gaia-build | |||
** https://github.com/fxos/build | |||
= Q & A = | = Q & A = | ||