|Submitter||Diff||Changes||Open Issues||Last Updated|
|Error loading review requests:|
59 bytes, text/x-review-board-request
|Details | Review|
Note, all the code mentioned here resides in `tools/mach_commands.py`. When running `mach clang-format` two attempts are made to fetch/locate the clang format binaries. One of these looks to be redundant and can be removed. When fetching/locating the binaries fails the code looks like it intends to early return, however due to the return values of `locate_or_fetch` the early return is not hit, so we get a nasty error later. The return values can be altered so we get the graceful failure behaviour that is intended.
Derp. Realised the fetches happening are actually fetching 2 different files, so it's only the graceful failure code which is not being hit correctly and needs fixing.
Summary: clang-format march command attempts to fetch/locate binaries twice and does not gracefully handle failure to do so → clang-format march command does not gracefully handle failure to fetch/locate binaries
Thanks! Is there an easy way to reproduce the bug that you are fixing?
Yeah! If you run `./mach clang-format` and accept the default of N/no to the download prompt, you will receive "download aborted" but also a mach error and a stack trace. With the change, you will just see "download aborted" and a clean exit.
Comment on attachment 8821330 [details] Bug 1325481 - Update clang-format fetch/locate codepath to gracefully fail. https://reviewboard.mozilla.org/r/100644/#review127894
Attachment #8821330 - Flags: review?(sledru) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/a03d0d06a809 Update clang-format fetch/locate codepath to gracefully fail. r=sylvestre
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.