mach clobber fails with AttributeError: 'function' object has no attribute 'get'
Categories
(Firefox Build System :: Mach Core, defect)
Tracking
(firefox-esr78 unaffected, firefox88 unaffected, firefox89 unaffected, firefox90 fixed)
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox88 | --- | unaffected |
firefox89 | --- | unaffected |
firefox90 | --- | fixed |
People
(Reporter: jdescottes, Assigned: mhentges)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
On latest central, running ./mach clobber
fails for me with the following log:
Error running mach:
['clobber']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file clobber| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
AttributeError: 'function' object has no attribute 'get'
File "/Users/jdescottes/Development/hg/fx-team-artifact/python/mozbuild/mozbuild/mach_commands.py", line 292, in clobber
if conditions.is_hg(self):
File "/Users/jdescottes/Development/hg/fx-team-artifact/python/mozbuild/mozbuild/base.py", line 1109, in is_hg
return isinstance(cls.repository, HgRepository)
File "/Users/jdescottes/Development/hg/fx-team-artifact/python/mozbuild/mozbuild/util.py", line 1069, in __get__
setattr(instance, name, self.func(instance))
File "/Users/jdescottes/Development/hg/fx-team-artifact/python/mozbuild/mozbuild/base.py", line 450, in repository
return get_repository_from_build_config(self)
File "/Users/jdescottes/Development/hg/fx-team-artifact/python/mozversioncontrol/mozversioncontrol/__init__.py", line 706, in get_repository_from_build_config
flavor = config.substs.get("VCS_CHECKOUT_TYPE")
Running hg bisect, this seems to have been regressed by Bug 1696251 (in particular https://hg.mozilla.org/mozilla-central/rev/eddb5c40cd92)
Updated•3 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
It seems that turning substs
to a method in mach_commands.py is leading to a bunch of errors.
Many other files still seem to expect substs to be a property?
Eg https://searchfox.org/mozilla-central/rev/2b372b94ce057097a6ef8eb725f209faa9d1dc4d/python/mozversioncontrol/mozversioncontrol/__init__.py#706
Assignee | ||
Comment 2•3 years ago
|
||
Thanks for the report! I'll take a look :)
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
A clobber must be able to run, even if substs
(configure output)
is not available.
However, when this behaviour was implemented, it was set up to replace
all usages.
Since we're trying to make mach commands no longer objects, this
kind of overriding won't be possible in the future. Fortunately, it's
not needed: only Clobberer
needs a fallible substs, the other
consumers don't!
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/065831baad2d Don't override "substs" to fetch it fallibly r=ahal
Comment 5•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•