Closed
Bug 1141356
Opened 10 years ago
Closed 10 years ago
utils-xpc.js ls recursive skipped if pattern not matched
Categories
(Firefox OS Graveyard :: Gaia::Build, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jrburke, Assigned: rickychien)
References
Details
Attachments
(10 files)
|
46 bytes,
text/x-github-pull-request
|
rickychien
:
review-
|
Details | Review |
|
46 bytes,
text/x-github-pull-request
|
jrburke
:
feedback+
|
Details | Review |
|
46 bytes,
text/x-github-pull-request
|
rickychien
:
review+
|
Details | Review |
|
46 bytes,
text/x-github-pull-request
|
rickychien
:
review+
|
Details | Review |
|
46 bytes,
text/x-github-pull-request
|
gduan
:
review+
|
Details | Review |
|
46 bytes,
text/x-github-pull-request
|
Details | Review | |
|
46 bytes,
text/x-github-pull-request
|
Details | Review | |
|
46 bytes,
text/x-github-pull-request
|
Details | Review | |
|
46 bytes,
text/x-github-pull-request
|
Details | Review | |
|
46 bytes,
text/x-github-pull-request
|
Details | Review |
I noticed in the email app, when getSharedJs in shared-utils.js was called, it did not include matching .js and .html files in nested folders under the email's js directory.
Tracing it to the ls function in utils-xpc.js, it seems like directories are only recursed if they match the pattern. However, given that the pattern is /\.(js|html)/, it will not recurse into subdirectories.
The fix is to move the `if (recursive && file.isDirectory())` test outside of the pattern match test. I will attach a pull request shortly.
This is particularly important because getting an accurate view of all the JS and HTML files allows the email app's build process to generate the correct cache digest. I will likely ask for 2.2 uplift if this lands in time on master.
Comment 1•10 years ago
|
||
| Reporter | ||
Updated•10 years ago
|
Attachment #8574949 -
Flags: review?(ricky060709)
| Assignee | ||
Comment 2•10 years ago
|
||
Comment on attachment 8574949 [details] [review]
[gaia] jrburke:bug1141356-build-ls-xpc-recurse > mozilla-b2g:master
Thank your for pointing out this bug in build system.
After apply your patch, it seems like breaking our build with exceptions:
Exception: L10nError: "contacts" not found in en-US in app://communications.gaiamobile.org
...
Exception: L10nError: "wait1" not found in en-US in app://ftu.gaiamobile.org
...
[failed] building communications app failed with exit code 1
[failed] building ftu app failed with exit code 1
make: *** [app] Error 1
Attachment #8574949 -
Flags: review?(ricky060709) → review-
Comment 3•10 years ago
|
||
| Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8575135 [details] [review]
[gaia] RickyChien:fix-utils-ls > mozilla-b2g:master
utils.ls() has this issue for a long time, and patch has been submitted to fix this issue. For fixing it, I decided to remove pattern & include parameters and tweaked all utils.ls calls in source tree. For now, you should filter your file by doing Array.prototype.filter by yourself.
James Burke, please apply my patch and verify locally.
George, patch has passed my diff-compare.sh, result was same as last time.
Attachment #8575135 -
Flags: review?(gduan)
Attachment #8575135 -
Flags: feedback?(jrburke)
| Assignee | ||
Updated•10 years ago
|
Assignee: jrburke → ricky060709
Status: NEW → ASSIGNED
| Reporter | ||
Comment 5•10 years ago
|
||
Comment on attachment 8575135 [details] [review]
[gaia] RickyChien:fix-utils-ls > mozilla-b2g:master
Verified locally that email build process gets the full recursive set of files, thank you!
Attachment #8575135 -
Flags: feedback?(jrburke) → feedback+
Comment 6•10 years ago
|
||
Comment 8•10 years ago
|
||
in new utils.ls, we let dev to filter the file by file.path, however, some of original pattern might go wrong, for example, if dev try to filter /tests?/ , it will check the whole path string instead of leaf name of its children, so it might return a null array if gaia is under test folder (test/gaia/build_stage/....).
So, we need to add the parent folder path to the regex to make sure we only filter things we don't want.
Comment 9•10 years ago
|
||
Comment on attachment 8576438 [details] [review]
[gaia] cctuan:1141356 > mozilla-b2g:master
Hi Ricky,
I fixed comment 8. could you please check? Thanks.
Attachment #8576438 -
Flags: review?(ricky060709)
| Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8576438 [details] [review]
[gaia] cctuan:1141356 > mozilla-b2g:master
Gaia-try is green finally. In case of breaking our b2g-inbound, I suggest that we push to try for preventing path problem of Windows.
r=rickychien,
Attachment #8576438 -
Flags: review?(ricky060709) → review+
| Assignee | ||
Updated•10 years ago
|
Attachment #8575135 -
Flags: review?(gduan)
| Reporter | ||
Comment 12•10 years ago
|
||
I would be happy to see this land -- I am doing a larger email refactor, part of it is separating out pieces that might have been in the main build layer to other files.
This change would help me as I push changes, since right now a new push does not always recognize that a change has occurred and an old cache is used, sometimes causing confusion for me while debugging.
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
Comment on attachment 8601341 [details] [review]
[gaia] cctuan:1141356 > mozilla-b2g:master
Hi Ricky,
could you r+ it again? this patch is the same as previous one and tests are all green.
Flags: needinfo?(gduan)
Attachment #8601341 -
Flags: review?(ricky060709)
| Assignee | ||
Comment 15•10 years ago
|
||
Comment on attachment 8601341 [details] [review]
[gaia] cctuan:1141356 > mozilla-b2g:master
Sure! Let's land it.
Attachment #8601341 -
Flags: review?(ricky060709) → review+
| Assignee | ||
Comment 16•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 17•10 years ago
|
||
It is working for me now, thank you!
I had to revert this in https://github.com/mozilla-b2g/gaia/commit/dc52bcfb2439b8239744a47d101baedfe5eca7a4 because it probably broke b2g desktop windows builds:
https://treeherder.mozilla.org/logviewer.html#?job_id=1853036&repo=b2g-inbound
Status: RESOLVED → REOPENED
Flags: needinfo?(gduan)
Resolution: FIXED → ---
| Assignee | ||
Comment 19•10 years ago
|
||
Steal this bug!
Assignee: gduan → ricky060709
Flags: needinfo?(gduan)
Comment 20•10 years ago
|
||
| Assignee | ||
Comment 21•10 years ago
|
||
Root issue probably cause by a filter regexp doesn't support windows path.
I've submitted a fix for it
https://github.com/mozilla-b2g/gaia/pull/29913/files#diff-28c8971f32dbfa56726ec51760967c82R639
| Assignee | ||
Comment 22•10 years ago
|
||
| Assignee | ||
Comment 23•10 years ago
|
||
| Assignee | ||
Comment 24•10 years ago
|
||
I guess there are some try problems causing try job crash.
Push to try #3:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6ffe995b6442
| Assignee | ||
Comment 25•10 years ago
|
||
Comment on attachment 8602038 [details] [review]
[gaia] RickyChien:fix-utils-ls > mozilla-b2g:master
Windows path issue has been fixed, please review it again =)
Attachment #8602038 -
Flags: review?(gduan)
Comment 26•10 years ago
|
||
Comment on attachment 8602038 [details] [review]
[gaia] RickyChien:fix-utils-ls > mozilla-b2g:master
Thank you to pick this bug , r+!
Attachment #8602038 -
Flags: review?(gduan) → review+
| Assignee | ||
Comment 27•10 years ago
|
||
Landed in master: https://github.com/mozilla-b2g/gaia/commit/9ef6f94298277d656a1048c7b752685b16167515
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
Comment 28•10 years ago
|
||
sorry had to revert this for bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=1867423&repo=b2g-inbound
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•10 years ago
|
Flags: needinfo?(ricky060709)
Comment 29•10 years ago
|
||
| Assignee | ||
Comment 30•10 years ago
|
||
Since try doesn't output any path errors on Windows build, I want to land it directly and back-out immediately if we meet build bustage again.
Land in master: https://github.com/mozilla-b2g/gaia/commit/4d793fb125bd44be0bc5e924b5251b01db005116
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Flags: needinfo?(ricky060709)
Resolution: --- → FIXED
Comment 31•10 years ago
|
||
| Assignee | ||
Comment 32•10 years ago
|
||
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 33•10 years ago
|
||
| Assignee | ||
Comment 34•10 years ago
|
||
Land in master and see b2g-inbound status:
https://github.com/mozilla-b2g/gaia/commit/0974a80e81d76f4e8c5b5e39f1e983c5d5dad3be
I will back-out it again once it crash windows build.
Comment 35•10 years ago
|
||
Comment 36•10 years ago
|
||
| Assignee | ||
Comment 37•10 years ago
|
||
Land in master since issue has been reproduced on Windows and fixed.
https://github.com/mozilla-b2g/gaia/commit/3b06584f664746c99eff10d69256838a567c66bc
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•