`./mach lint -l android-api-lint` produces python error
Categories
(GeckoView :: General, task, P1)
Tracking
(firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: kats, Assigned: agi)
References
Details
(Whiteboard: [geckoview:m77])
Attachments
(1 file)
I made some changes that involved deleting stuff from the geckoview api.txt file. I was told that running ./mach lint -l android-api-lint
would let me know of any problems. Instead I get this:
Traceback (most recent call last):
File "/home/kats/zspace/gecko-misc/python/mozlint/mozlint/roller.py", line 60, in _run_worker
res = func(paths, config, **lintargs) or []
File "/home/kats/zspace/gecko-misc/python/mozlint/mozlint/types.py", line 54, in __call__
return self._lint(paths, config, **lintargs)
File "/home/kats/zspace/gecko-misc/python/mozlint/mozlint/types.py", line 159, in _lint
return func(config, **lintargs)
File "/home/kats/zspace/gecko-misc/tools/lint/android/lints.py", line 88, in api_lint
issues = json.load(f)
File "/usr/lib/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
A failure occurred in the android-api-lint linter.
✖ 1 problem (0 errors, 0 warnings, 1 failure)
Reporter | ||
Comment 1•4 years ago
|
||
As far as I can tell this is trying to read an apilint-result.json
file from my objdir. There's only one such file, and it's empty. So attempting to json.load
it produces an error.
Reporter | ||
Comment 2•4 years ago
|
||
And the error is showing up on try pushes, too: https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=78e4e7bebf8d24f45edf35b33d1a84dd2becaeaa
The apilint-result.json artifact on the lint job has this:
{
"reason": "file-missing-on-worker",
"message": "Artifact \"public/android/geckoview/apilint-result.json\" not found at \"/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/classes/withGeckoBinaries/debug/apilint-result.json\""
}
Comment 3•4 years ago
|
||
Hey Nick, any idea why this file might be empty/missing?
Reporter | ||
Comment 4•4 years ago
|
||
Subsequent try push with slightly modified code (fixed the dangling import
statements in java code, etc.) now seem to be killing gradle: https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=7ed7bc72c4c0bcc31ab60ddba291ba602a85afc1
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 5•4 years ago
|
||
I ran the lint command with --verbose
which emitted a gradle command it was running under the hood. Running that manually pointed to an error in my changes to api.txt. Fixing that (and subsequently bumping the API version in a changelog.md file) fixed my linting errors.
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
This version includes the following commits:
d89245f Update com.gradle.plugin-publish to 0.11.0.
17bc5ea Closes #77: Don't fail when the map index is out of range.
Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fcb4c961bba7 Update apilint to 0.2.7. r=snorp
Comment 9•4 years ago
|
||
bugherder |
Description
•