Closed Bug 955998 Opened 12 years ago Closed 9 years ago

Running webapp-optimize.js on node.js

Categories

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

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: yurenju, Assigned: rickychien)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #955988 +++
Blocks: 955988
No longer depends on: 955988
Assignee: nobody → gduan
Status: NEW → ASSIGNED
Currenly, there're some issues encountered. 1. jsdom-nogyp: outerHTML only has get property => workaround to defineSetter for jsdom.dom.level3.html.Element outerHTML 2. jsdom-nogyp: compareDocumentPosition when doing document.querySelector('script[src$="l10n.js"]') => after put jsdom.level(3, 'html'), the error is gone, however, the html cannot be parsed successfully 3. esprima: jsComparator cannot work with it. still investigating.
It turns out our node.ls doesn't really do the filter pattern. After new patch, diff with "make PRODUCTION=1" would have some thing different on NODE, 1. <!-- <script> --> would be gone, since jsdom's limited api, but I think that doesn't affect the functionality 2. <input /> ---> <input> , still jsdom, but that doesn't affect functionality 3. <input type="text" class="xxx"> ---> <input class="xxx" type="text"> , still jsdom, but doesn't affect
Since we have new plan for buildscript, I would deassign myself on this bug for now. Feel free to take it.
Assignee: georgeiscoming → nobody
Status: ASSIGNED → NEW
Priority: -- → P1
Assignee: nobody → rchien
Status: NEW → ASSIGNED
Comment on attachment 8708796 [details] [review] [gaia] rickychien:webapp-optimize-to-nodejs > mozilla-b2g:master Scott, one of our migration's difficult part is done. Remember that OPTIMIZE mode doesn't enable by default so please be aware of GAIA_OPTIMIZE=1 when you're trying to test it. command: make RUN_ON_NODE=1 GAIA_OPTIMIZE=1 or pass GAIA_OPTIMIZE=1 to node-build-diff.sh
Attachment #8708796 - Flags: review?(scwwu)
P.S. Modify FLAG variable FLAG="GAIA_OPTIMIZE=1" at line 8 in node-build-diff.sh to enable optimization.
Comment on attachment 8708796 [details] [review] [gaia] rickychien:webapp-optimize-to-nodejs > mozilla-b2g:master Hi Zibi, shared/js/language_list.js is touched since it used array comprehensions that is unrecognized by esprima [1]. I noticed you are the person who modified this script last time so I'd like to inform you this changes. We should be aware of using some ES6 syntax which node.js (V8) doesn't support yet during or after build system migration to node.js. [1] http://esprima.org
Attachment #8708796 - Flags: review?(gandalf)
Comment on attachment 8708796 [details] [review] [gaia] rickychien:webapp-optimize-to-nodejs > mozilla-b2g:master Tested on device okay and diff looks fine except some anomalies [1]. r+ [1]: SVG tag <feColorMatrix> became <fecolormatrix> when built with node, but works fine on device.
Attachment #8708796 - Flags: review?(scwwu) → review+
Attachment #8708796 - Flags: review?(scwwu)
Attachment #8708796 - Flags: review?(gandalf)
Attachment #8708796 - Flags: review+
Attachment #8708796 - Flags: review?(scwwu) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
I have updated one of my dogfooding devices and got Homescreen broken because of: > 01-29 19:12:30.139 1448 1448 E Default Home Screen: [JavaScript Error: "TypeError: this.settings is undefined" {file: "app://homescreen.gaiamobile.org/gaia_build_defer_index.js" line: 862}] After manually reinstalling homescreen with and without gaia optimize flag, it seems the GAIA_OPTIMIZE=1 might be the reason why it broke in the first place.
After a cleanup of gaia/profile* and rebuilding and testing several times I could not reproduce. So maybe a one thing that happens at the "migration" time with previous profile builds already here
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: