mach environment fails when printing mozconfig args

RESOLVED FIXED in mozilla26

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: chmanchester, Assigned: chmanchester)

Tracking

unspecified
mozilla26
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
localhost:m-c mozilla$ mach environment
platform:
	Darwin-12.4.0-x86_64-i386-64bit
python version:
	2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)]
python prefix:
	/System/Library/Frameworks/Python.framework/Versions/2.7
mach cwd:
	/Users/mozilla/m-c
os cwd:
	/Users/mozilla/m-c
mach directory:
	/Users/mozilla/m-c
state directory:
	/Users/mozilla/.mozbuild
mozconfig path:
	None
object directory:
	/Users/mozilla/m-c/obj-x86_64-apple-darwin12.4.0
mozconfig objdir:
	None
mozconfig configure args:
Error running mach:

    ['environment']

The error occurred in the implementation of the invoked mach command.

This should never occur and is likely a bug in the implementation of that
command. Consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

TypeError: 'NoneType' object is not iterable

  File "/Users/mozilla/m-c/python/mozbuild/mozbuild/mach_commands.py", line 798, in environment
    for arg in mozconfig['configure_args']:
(Assignee)

Comment 1

5 years ago
Created attachment 790867 [details] [diff] [review]
Don't try to print mozconfig attrs if not present;
Attachment #790867 - Flags: review?(gps)
(Assignee)

Updated

5 years ago
Assignee: nobody → cmanchester

Comment 2

5 years ago
Comment on attachment 790867 [details] [diff] [review]
Don't try to print mozconfig attrs if not present;

Review of attachment 790867 [details] [diff] [review]:
-----------------------------------------------------------------

Will get r+ with comments addressed.

::: python/mozbuild/mozbuild/mach_commands.py
@@ +792,5 @@
>  
>          print('object directory:\n\t%s' % mb.topobjdir)
>  
>          if mozconfig:
> +            if mozconfig.get('configure_args'):

configure_args will always be present, so you don't need .get().

Also, I kind of think it's helpful to print the label but no value. Keep in mind that the output of this command will be used to help debug a problem. I think it's better for people to be like "it says I don't have configure args defined" rather than rely on people thinking "should this list configure args? why isn't it listing configure args?"

@@ +800,2 @@
>  
> +            if mozconfig.get('make_extra'):

Ditto.

@@ +805,2 @@
>  
> +            if mozconfig.get('make_flags'):

Ditto.
Attachment #790867 - Flags: review?(gps) → feedback+
(Assignee)

Comment 3

5 years ago
Created attachment 790970 [details] [diff] [review]
Don't try to print mozconfig attrs if not present;
Attachment #790970 - Flags: review?(gps)
(Assignee)

Updated

5 years ago
Attachment #790867 - Attachment is obsolete: true

Comment 4

5 years ago
Comment on attachment 790970 [details] [diff] [review]
Don't try to print mozconfig attrs if not present;

Review of attachment 790970 [details] [diff] [review]:
-----------------------------------------------------------------

Will push for you.
Attachment #790970 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/d10a2d94e6f4
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.