When mach tells me that my mozconfig didn't execute correctly, it would be really useful to print out the full path to the file being executed.
Relevant code: the MozconfigLoadException in read_mozconfig in http://mxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/mozconfig.py
Created attachment 8480856 [details] [diff] [review] mach_print_mozconfig_file.patch Hello, Is this the behaviour you want? It only prints the full path of the mozconfig file used if there is an error in it.
Assignee: nobody → six.dsn
Status: NEW → ASSIGNED
Attachment #8480856 - Flags: review?(josh)
That looks good to me, but gps should probably review the change. Could you give an example of the output when there's a mozconfig error?
Hi, ok i will change the reviewer. Here is the output: MozconfigLoadException: Using /home/six/mozilla-central/.mozconfig: Evaluation of your mozconfig exited with an error. This could be triggered by a command inside your mozconfig failing. Please change your mozconfig to not error and/or to catch errors in executed commands. Maybe we could change how it's displayed to highlight the file used.
Attachment #8480856 - Flags: review?(josh) → review?(gps)
I would be tempted to use 'Evaluation of %s exited with an error' in this case.
Created attachment 8481321 [details] [diff] [review] mach_print_mozconfig_file.patch New version taking car of josh comment
Comment on attachment 8481321 [details] [diff] [review] mach_print_mozconfig_file.patch Review of attachment 8481321 [details] [diff] [review]: ----------------------------------------------------------------- We already pass the mozconfig path to the created MozconfigLoadException. I'd prefer to fix this bug by ensuring that whatever is printing the MozconfigLoadException is printing the path name, similar to what's happening at https://hg.mozilla.org/mozilla-central/file/5e9826980be5/python/mozbuild/mozbuild/base.py#l590. What mach command isn't print the mozconfig path?
Hi, This happens using './mach configure' if there is an error in the mozconfig used. actually the error is here: https://hg.mozilla.org/mozilla-central/file/5e9826980be5/python/mozbuild/mozbuild/base.py#l560 it comes from the fact that this "try" block doesn't catch MozconfigLoadException's
Created attachment 8483687 [details] [diff] [review] mach_print_mozconfig_file_v2.patch
I found that the bug number in the commit message is incorrect. It's 105871 instead of 1057871.
(In reply to Ting-Yu Lin [:TYLin] (UTC+8) from comment #11) > I found that the bug number in the commit message is incorrect. It's 105871 > instead of 1057871. no problem, backedout the comment with the wrong bugnumber and re-checked in the correct commit message in https://hg.mozilla.org/integration/mozilla-inbound/rev/64300da7c9c4
Thanks TYLin for pointing out my typo and Tomcat for fixing it :)
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.