Last modified: 2014-04-02 13:08:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64490, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62490 - Deploy repo has two invalid json files
Deploy repo has two invalid json files
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Low normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks: 58279
  Show dependency treegraph
 
Reported: 2014-03-10 16:22 UTC by Antoine "hashar" Musso (WMF)
Modified: 2014-04-02 13:08 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2014-03-10 16:22:35 UTC
I wrote a quick PHP based json linter which detects error in the mediawiki/service/parsoid/deploy repository:

 ./node_modules/es6-shim/bower.json: Syntax error
 ./node_modules/es6-shim/component.json: Syntax error

There are missing comma in a dictionaries.


The lint script is in integration/jenkins.git bin/json-lint.php  which you can fetch with:

curl 'http://git.wikimedia.org/raw/integration%2Fjenkins.git/master/bin%2Fjson-lint.php '> /tmp/json-lint.php

Usage:

 json-lint.php .


Would be nice to have them fixed either locally or upstream.
Comment 1 Antoine "hashar" Musso (WMF) 2014-03-10 16:28:18 UTC
I would like to have Jenkins to lint json starting next Monday March 17th.
Comment 2 Gabriel Wicke 2014-03-10 17:56:44 UTC
@Antoine: Is there an easy way to tell Jenkins to ignore node_modules? Those are all third party libraries for which Jenkins testing is less useful.
Comment 3 Antoine "hashar" Musso (WMF) 2014-03-10 20:24:56 UTC
Well both files were broken and fixed by upstream fairly recently.

bower.js by: https://github.com/paulmillr/es6-shim/commit/0b931c2b78a844e9349f18756e7f72cf0409eae4#diff-0a08a7565aba4405282251491979bb6b

component.js by: https://github.com/paulmillr/es6-shim/commit/644944e47fcfb4b42833016083e125e2a62bcf62


Both apparently got introduced with 0.10.0 of es6-shim.

-------------------------


The json-lint.php script I wrote does not support ignore list like jshint does.  One can probably implement such a system by hacking the file in integration/jenkins.git, though I see little point in accepting invalid json even from third parties.
Comment 4 Gabriel Wicke 2014-03-10 20:45:26 UTC
(In reply to Antoine "hashar" Musso from comment #3)
> The json-lint.php script I wrote does not support ignore list like jshint
> does.  One can probably implement such a system by hacking the file in
> integration/jenkins.git, though I see little point in accepting invalid json
> even from third parties.

Those json files might not be used, are not edited by us etc. So if there is no way to ignore node_modules then at least this pass should be non-voting to avoid holding up our work.

Could you just add a special case to ignore node_modules?
Comment 5 Arlo Breault 2014-03-14 04:54:41 UTC
There's now a new release of es6-shim (v0.10.1) which should address this issue ... or at least until the next node_module breaks it.
Comment 6 Gerrit Notification Bot 2014-03-14 21:11:04 UTC
Change 118762 had a related patch set uploaded by Hashar:
Update to es6-shim 0.10.1.

https://gerrit.wikimedia.org/r/118762
Comment 7 Gerrit Notification Bot 2014-03-14 21:58:17 UTC
Change 118762 merged by jenkins-bot:
Update to es6-shim 0.10.1.

https://gerrit.wikimedia.org/r/118762
Comment 8 Antoine "hashar" Musso (WMF) 2014-04-02 13:08:27 UTC
Got fixed by updating the upstream node module.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links