Status

Firefox OS
Gaia::Build
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: gasolin@mozilla.com, Assigned: gasolin@mozilla.com)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(8 attachments)

(Assignee)

Description

3 years ago
We currently have grunt for jsdoc generation, to align with build script revice plan, it's better to do it with gulp

we can reuse existing jsdoc.json for gulp tasks
(Assignee)

Updated

3 years ago
Depends on: 1151894
Created attachment 8589159 [details] [review]
[gaia] gasolin:issue-1151765 > mozilla-b2g:master
(Assignee)

Comment 2

3 years ago
The good news is its work, the bad news is the `gulp-jsdoc` plugin is not maintained.
(Assignee)

Comment 3

3 years ago
Comment on attachment 8589159 [details] [review]
[gaia] gasolin:issue-1151765 > mozilla-b2g:master

As comment above, the risk is we may need to fork our own version of gulp jsdoc plugin
Attachment #8589159 - Flags: feedback?(ricky060709)
Comment on attachment 8589159 [details] [review]
[gaia] gasolin:issue-1151765 > mozilla-b2g:master

Instead of maintaining a new jsdoc plugin, I'd like to babel transpiler to compile es6 to es5. We can fallback to fork our own version plugin if there are still problems.
Attachment #8589159 - Flags: feedback?(ricky060709) → feedback+
(Assignee)

Comment 5

3 years ago
Comment on attachment 8589159 [details] [review]
[gaia] gasolin:issue-1151765 > mozilla-b2g:master

Good idea! after apply babel, the es6 functions can be transcompiled to general js and pass to jsdoc processor. Therefore the blacklist is minified now.
Attachment #8589159 - Flags: review?(ricky060709)
Comment on attachment 8589159 [details] [review]
[gaia] gasolin:issue-1151765 > mozilla-b2g:master

Nice job! r=me.

I leaved some comments on Github for build part review.
Attachment #8589159 - Flags: review?(ricky060709) → review+
Created attachment 8590126 [details] [review]
[gaia-node-modules] gasolin:gulp-jsdoc > mozilla-b2g:master
(Assignee)

Comment 8

3 years ago
issue addressed,

merged https://github.com/mozilla-b2g/gaia/commit/9fc2df7b45974249064010bdaee4cdd1adb16ea3

thanks!
Assignee: nobody → gasolin
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Updated

3 years ago
Blocks: 1152712
this burned down b2g-inbound like https://treeherder.mozilla.org/logviewer.html#?job_id=1685967&repo=b2g-inbound and so i had to revert this
Status: RESOLVED → REOPENED
Flags: needinfo?(gasolin)
Resolution: FIXED → ---
seems the error was:

11:48:32 INFO - Unable to create a symbolic link from /home/worker/gaia/node_modules/gulp-jsdoc/node_modules/jsdoc/lib/jsdoc to /home/worker/gaia/node_modules/gulp-jsdoc/node_modules/jsdoc/node_modules/jsdoc. Error: EEXIST, symlink '/home/worker/gaia/node_modules/gulp-jsdoc/node_modules/jsdoc/lib/jsdoc'
11:48:32 INFO - npm ERR! jsdoc@3.3.0-alpha5 postinstall: `node ./node/postinstall.js`
11:48:32 INFO - npm ERR! Exit status 1
11:48:32 INFO - npm ERR!
11:48:32 INFO - npm ERR! Failed at the jsdoc@3.3.0-alpha5 postinstall script.
11:48:32 INFO - npm ERR! This is most likely a problem with the jsdoc package,
11:48:32 INFO - npm ERR! not with npm itself.
11:48:32 INFO - npm ERR! Tell the author that this fails on your system:
11:48:32 INFO - npm ERR! node ./node/postinstall.js
11:48:32 INFO - npm ERR! You can get their info via:
11:48:32 INFO - npm ERR! npm owner ls jsdoc
11:48:32 INFO - npm ERR! There is likely additional logging output above.
11:48:32 INFO - npm ERR! System Linux 3.13.0-27-generic
11:48:32 INFO - npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "rebuild"
11:48:32 INFO - npm ERR! cwd /home/worker/gaia
11:48:32 INFO - npm ERR! node -v v0.10.36
11:48:32 INFO - npm ERR! npm -v 1.4.28
11:48:32 INFO - npm ERR! code ELIFECYCLE
11:48:32 INFO - npm ERR!
11:48:32 INFO - npm ERR! Additional logging details can be found in:
11:48:32 INFO - npm ERR! /home/worker/gaia/npm-debug.log
Also backed out from gaia-node-modules so we can keep things in sync: https://github.com/mozilla-b2g/gaia-node-modules/commit/8a8808a63f1989d95d1432b444a7ff2df07789e9
(Assignee)

Comment 13

3 years ago
would try to reland the patch once figure out why node_modules bark errors.
Flags: needinfo?(gasolin)
Created attachment 8595167 [details] [review]
[gaia] gasolin:issue-1151765-2 > mozilla-b2g:master
Created attachment 8595173 [details] [review]
[gaia-node-modules] gasolin:gulp-jsdoc-2 > mozilla-b2g:master
(Assignee)

Comment 16

3 years ago
soft link gaia-node-module to gaia folder to test it works, let's try land it again.
(Assignee)

Comment 17

3 years ago
gaia-node-modules 32431bccebaba44cfc557bf502b585ac57087c39

let's wait for treeherder result
Created attachment 8595194 [details] [review]
[gaia-node-modules] mozilla-b2g:revert-127-gulp-jsdoc-2 > mozilla-b2g:master
(Assignee)

Comment 19

3 years ago
failed, looks like soft link issue.

reverted https://github.com/mozilla-b2g/gaia-node-modules/pull/128
Created attachment 8605715 [details] [review]
[gaia] gasolin:issue-1151765-3 > mozilla-b2g:master
(Assignee)

Comment 21

3 years ago
Comment on attachment 8605715 [details] [review]
[gaia] gasolin:issue-1151765-3 > mozilla-b2g:master

previous implement depends on gulp-jsdoc, which is un-maintained and cause gaia_node_module error when landing.

The new approach modify the gulpfile.js and use gulp-shell to run jsdoc, and the jsdoc.json format is updated to real jsdoc config format 
http://usejsdoc.org/about-configuring-jsdoc.html

It means each app could manage their preferred jsdoc output as well.
Attachment #8605715 - Flags: review?(ricky060709)
Comment on attachment 8605715 [details] [review]
[gaia] gasolin:issue-1151765-3 > mozilla-b2g:master

Thanks fred! it looks good to me.

Remember to update README.md at https://github.com/mozilla-b2g/gaia#generate-jsdoc for document new gulp command. thanks!
Attachment #8605715 - Flags: review?(ricky060709) → review+
Created attachment 8606806 [details] [review]
[gaia-node-modules] gasolin:gulp-jsdoc-3 > mozilla-b2g:master
Created attachment 8606821 [details] [review]
[gaia-node-modules] mozilla-b2g:revert-138-gulp-jsdoc-3 > mozilla-b2g:master
(Assignee)

Comment 25

3 years ago
merged to https://github.com/mozilla-b2g/gaia/commit/9ba8cb4ef2e0344b70f189e5b587d5d703f22d93

thanks!
Status: REOPENED → RESOLVED
Last Resolved: 3 years ago3 years ago
Resolution: --- → FIXED
(Assignee)

Updated

3 years ago
Blocks: 1170453
(Assignee)

Updated

3 years ago
Blocks: 1170456
(Assignee)

Updated

3 years ago
Blocks: 1170458
(Assignee)

Updated

3 years ago
Blocks: 1170459
(Assignee)

Updated

3 years ago
Blocks: 1170460
(Assignee)

Updated

3 years ago
Blocks: 1170463
(Assignee)

Updated

3 years ago
Blocks: 1170464
(Assignee)

Updated

3 years ago
Blocks: 1170465
You need to log in before you can comment on or make changes to this bug.