Closed
Bug 1575659
Opened 4 years ago
Closed 4 years ago
`./mach static-analysis` doesn't work
Categories
(Firefox Build System :: Mach Core, defect)
Firefox Build System
Mach Core
Tracking
(firefox70 fixed)
RESOLVED
FIXED
mozilla70
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: tjr, Assigned: andi)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Specifically this is about the command ./mach static-analysis
and not about the entire featureset of ./mach static-analysis [subcommand]
./mach static-analysis
tries to be more friendly than all the other mach commands by printing it's help if you call it without arguments. This is commendable, as no other command does this, and it really would be nice if they did.
However, it doesn't work.
AttributeError: 'CommandContext' object has no attribute 'topdir'
File "/home/tom/Documents/moz/mozilla-unified-2/python/mach/mach/main.py", line 360, in run
return self._run(argv)
File "/home/tom/Documents/moz/mozilla-unified-2/python/mach/mach/main.py", line 402, in _run
if self.populate_context_handler:
File "/home/tom/Documents/moz/mozilla-unified-2/python/mach/mach/registrar.py", line 61, in register_conditional_names
instance = MachRegistrar._instance(handler, context)
File "/home/tom/Documents/moz/mozilla-unified-2/python/mach/mach/registrar.py", line 99, in _instance
instance = cls(context)
File "/home/tom/Documents/moz/mozilla-unified-2/python/mozbuild/mozbuild/base.py", line 858, in __init__
topsrcdir = context.topdir
My guess is that https://searchfox.org/mozilla-central/source/mach sets up the mach object in a way that simply creating a mach object does not.
While it would be easy to remove this code and revert mach static-analysis back to the unfriendly format of all other commands - it would be way better to make this work, and have all commands do it by default...
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Assignee: nobody → bpostelnicu
Pushed by bpostelnicu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b17808d15bde Fixed crashing of `mach static-analisys` when no arguments where passed. r=bastien
Comment 3•4 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox70:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in
before you can comment on or make changes to this bug.
Description
•