Closed Bug 1457255 Opened 7 years ago Closed 7 years ago

Kotlin warnings/errors are not parsed by Treeherder

Categories

(GeckoView :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(3 files)

Kotlin emits warnings and errors as "w: ..." and "e: ...", which is not picked up by Treeherder.
Part 2 and 3 are not related to this bug but I thought they'd be nice to have while I'm at it.
Comment on attachment 8971382 [details] Bug 1457255 - 1. Translate kotlin warning/error messages for treeherder; https://reviewboard.mozilla.org/r/240138/#review245952 ::: mobile/android/geckoview/build.gradle:156 (Diff revision 1) > +tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) { > + // Translate Kotlin messages like "w: ..." and "e: ..." into > + // "...: warning: ..." and "...: error: ...", to make Treeherder understand. > + def listener = { > + if (it.startsWith('w: ') || it.startsWith('e: ')) { > + def (_, type, file, line, column, message) = What does this do if we don't match exactly this format? It would be irritating to break the build entirely when testing, say, upgraded tools, just because the format changed. In general the Gradle folks are careful to swallow exceptions in callbacks and listeners of this sort, but I'd still like to know it doesn't prevent us producing logs in that situation.
Attachment #8971382 - Flags: review?(nalexander) → review+
Comment on attachment 8971384 [details] Bug 1457255 - 3. Turn Java warnings into errors; https://reviewboard.mozilla.org/r/240142/#review245956 ::: commit-message-23ee2:1 (Diff revision 1) > +Bug 1457255 - 3. Make Java unchecked usages fail; r?nalexander Please note in the commit header line that this is for GV only. How far are we from -Werror globally? (Or at least in app/?)
Attachment #8971384 - Flags: review?(nalexander) → review+
Comment on attachment 8971382 [details] Bug 1457255 - 1. Translate kotlin warning/error messages for treeherder; https://reviewboard.mozilla.org/r/240138/#review245952 > What does this do if we don't match exactly this format? It would be irritating to break the build entirely when testing, say, upgraded tools, just because the format changed. > > In general the Gradle folks are careful to swallow exceptions in callbacks and listeners of this sort, but I'd still like to know it doesn't prevent us producing logs in that situation. Looks like an exception is thrown when the format doesn't match. Did you mean we should silently ignore that exception?
Comment on attachment 8971384 [details] Bug 1457255 - 3. Turn Java warnings into errors; https://reviewboard.mozilla.org/r/240142/#review245956 > Please note in the commit header line that this is for GV only. How far are we from -Werror globally? (Or at least in app/?) Turns out it's not too much work to turn on `-Werror` globally (except for the thirdparty project), so the updated patch does that.
Comment on attachment 8971382 [details] Bug 1457255 - 1. Translate kotlin warning/error messages for treeherder; https://reviewboard.mozilla.org/r/240138/#review245952 > Looks like an exception is thrown when the format doesn't match. Did you mean we should silently ignore that exception? Well, we should do _somethihng_. Since the line will still be logged, yes -- I think we should ignore that exception. What I don't want to happen is: 1) bump Gradle/kotlin/something 2) errors change 3) builds fail without producing useful artifacts on disk because we abort too aggressively 4) have to push try builds that fix the logging before fixing the problem
Turns out it's not too much work to turn on -Werror globally, so I went ahead and did that.
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f179720d3440 1. Translate kotlin warning/error messages for treeherder; r=nalexander https://hg.mozilla.org/integration/autoland/rev/ed06c8833608 2. Fix Java warnings; r=nalexander https://hg.mozilla.org/integration/autoland/rev/d486c0db4626 3. Turn Java warnings into errors; r=nalexander
Backed out 3 changesets (bug 1457255) for bustage on Android builds on a CLOSED TREE Backout link: https://hg.mozilla.org/integration/autoland/rev/076e2b91083973a1fb8c8a79bc36b7c5f3cc4bca Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=d486c0db4626d70c909bbc57a9dc013b222a7163 Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=176269519&repo=autoland&lineNumber=34838 Log snippet: [task 2018-04-30T13:20:58.834Z] 13:20:58 INFO - Processing annotations... [task 2018-04-30T13:20:59.514Z] 13:20:59 INFO - Annotation processing complete in 680ms [task 2018-04-30T13:20:59.534Z] 13:20:59 INFO - :geckoview:mergeOfficialWithGeckoBinariesNoMinApiReleaseShaders [task 2018-04-30T13:20:59.535Z] 13:20:59 INFO - :geckoview:compileOfficialWithGeckoBinariesNoMinApiReleaseShaders [task 2018-04-30T13:20:59.838Z] 13:20:59 INFO - :geckoview:syncAssetsFromDistDirForOfficialWithGeckoBinariesNoMinApiRelease [task 2018-04-30T13:20:59.848Z] 13:20:59 INFO - :geckoview:syncLibsFromDistDirForOfficialWithGeckoBinariesNoMinApiRelease [task 2018-04-30T13:20:59.879Z] 13:20:59 INFO - :geckoview:syncOmnijarFromDistDirForOfficialWithGeckoBinariesNoMinApiRelease [task 2018-04-30T13:20:59.880Z] 13:20:59 INFO - :geckoview:generateOfficialWithGeckoBinariesNoMinApiReleaseAssets [task 2018-04-30T13:21:00.173Z] 13:21:00 INFO - :geckoview:mergeOfficialWithGeckoBinariesNoMinApiReleaseAssets [task 2018-04-30T13:21:00.183Z] 13:21:00 INFO - :geckoview:mergeOfficialWithGeckoBinariesNoMinApiReleaseConsumerProguardFiles [task 2018-04-30T13:21:00.184Z] 13:21:00 INFO - :geckoview:packageOfficialWithGeckoBinariesNoMinApiReleaseRenderscript NO-SOURCE [task 2018-04-30T13:21:00.214Z] 13:21:00 INFO - :geckoview:transformResourcesWithMergeJavaResForOfficialWithGeckoBinariesNoMinApiRelease [task 2018-04-30T13:21:00.387Z] 13:21:00 INFO - :geckoview:transformClassesAndResourcesWithSyncLibJarsForOfficialWithGeckoBinariesNoMinApiRelease [task 2018-04-30T13:21:00.397Z] 13:21:00 INFO - :geckoview:mergeOfficialWithGeckoBinariesNoMinApiReleaseJniLibFolders [task 2018-04-30T13:21:00.407Z] 13:21:00 INFO - :geckoview:transformNativeLibsWithMergeJniLibsForOfficialWithGeckoBinariesNoMinApiRelease [task 2018-04-30T13:21:00.417Z] 13:21:00 INFO - :geckoview:transformNativeLibsWithSyncJniLibsForOfficialWithGeckoBinariesNoMinApiRelease [task 2018-04-30T13:21:03.995Z] 13:21:03 INFO - :geckoview:bundleOfficialWithGeckoBinariesNoMinApiRelease [task 2018-04-30T13:21:04.644Z] 13:21:04 INFO - :geckoview:javadocOfficialWithGeckoBinariesNoMinApiReleasePicked up JAVA_TOOL_OPTIONS: -Dfile.encoding=utf-8 [task 2018-04-30T13:21:07.705Z] 13:21:07 INFO - :geckoview:javadocJarOfficialWithGeckoBinariesNoMinApiRelease [task 2018-04-30T13:21:07.888Z] 13:21:07 INFO - :geckoview:sourcesJarOfficialWithGeckoBinariesNoMinApiRelease [task 2018-04-30T13:21:08.802Z] 13:21:08 INFO - :geckoview:uploadArchivesCould not find metadata org.mozilla:geckoview-default-armeabi-v7a/maven-metadata.xml in remote (file:///builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven) [task 2018-04-30T13:21:08.823Z] 13:21:08 INFO - FAILURE: Build failed with an exception. [task 2018-04-30T13:21:08.824Z] 13:21:08 INFO - * What went wrong: [task 2018-04-30T13:21:08.824Z] 13:21:08 INFO - Execution failed for task ':geckoview_example:compileOfficialWithGeckoBinariesNoMinApiDebugAndroidTestJavaWithJavac'. [task 2018-04-30T13:21:08.825Z] 13:21:08 INFO - > Compilation failed; see the compiler error output for details. [task 2018-04-30T13:21:08.825Z] 13:21:08 INFO - * Try: [task 2018-04-30T13:21:08.825Z] 13:21:08 INFO - Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. [task 2018-04-30T13:21:08.825Z] 13:21:08 INFO - * Get more help at https://help.gradle.org [task 2018-04-30T13:21:08.825Z] 13:21:08 INFO - BUILD FAILED in 1m 2s [task 2018-04-30T13:21:08.825Z] 13:21:08 INFO - 125 actionable tasks: 112 executed, 13 up-to-date [task 2018-04-30T13:21:09.724Z] 13:21:09 ERROR - Return code: 1 [task 2018-04-30T13:21:09.725Z] 13:21:09 ERROR - 1 not in success codes: [0] [task 2018-04-30T13:21:09.725Z] 13:21:09 WARNING - setting return code to 2 [task 2018-04-30T13:21:09.725Z] 13:21:09 FATAL - Halting on failure while running ['/usr/bin/python2.7', 'mach', '--log-no-times', 'android', 'archive-geckoview'] [task 2018-04-30T13:21:09.726Z] 13:21:09 FATAL - Running post_fatal callback... [task 2018-04-30T13:21:09.726Z] 13:21:09 FATAL - Exiting 2 [task 2018-04-30T13:21:09.726Z] 13:21:09 INFO - [mozharness: 2018-04-30 13:21:09.726766Z] Finished build step (failed) [task 2018-04-30T13:21:09.727Z] 13:21:09 INFO - Running post-run listener: _summarize [task 2018-04-30T13:21:09.727Z] 13:21:09 ERROR - # TBPL FAILURE # [task 2018-04-30T13:21:09.727Z] 13:21:09 INFO - [mozharness: 2018-04-30 13:21:09.727543Z] FxDesktopBuild summary: [task 2018-04-30T13:21:09.727Z] 13:21:09 ERROR - # TBPL FAILURE #
Flags: needinfo?(nchen)
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4eccde5dfbef 1. Translate kotlin warning/error messages for treeherder; r=nalexander https://hg.mozilla.org/integration/mozilla-inbound/rev/a49833bfd519 2. Fix Java warnings; r=me https://hg.mozilla.org/integration/mozilla-inbound/rev/524a0f9fb978 3. Turn Java warnings into errors; r=nalexander
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/9c42ce50a911 4. Fix remaining Java warnings; r=me on CLOSED TREE
Flags: needinfo?(nchen)
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/0809a8ffff81 1. Translate kotlin warning/error messages for treeherder; r=nalexander https://hg.mozilla.org/integration/mozilla-inbound/rev/d8eab86052b6 2. Fix Java warnings; r=me https://hg.mozilla.org/integration/mozilla-inbound/rev/1d986592d690 3. Turn Java warnings into errors; r=nalexander
Flags: needinfo?(nchen)
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 61 → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: