mach clobber should probably clobber both objdir and python by default



2 years ago
a year ago


(Reporter: mconley, Unassigned)


50 Branch

Firefox Tracking Flags

(Not tracked)


I just checked out an old revision (about 2 months old) and did a clobber build, and when I tried to run a test on it, I got an error about "ImportError: No module named errors".

It turns out I needed to clobber some python stuff (maybe some .pyc files?)

| ./mach clobber python | does that, and it got me working.

But I think that ./mach clobber should probably, by default, clobber both the objdir and the Python stuff. Up until now, I've assumed (and I suspect I'm not alone), that ./mach clobber is a full nuke of my non-srcdir stuff. The fact that some Python stuff was left over was kinda surprising.

Comment 1

2 years ago
ahal points out that I can do this for myself via my ~/.mozbuild/marchrc file by adding "clobber = clobber objdir python" under [alias].

That's great for me, but it might be worth just altering the default for everybody.
The main reason we don't do the full clobber by default is it requires walking the source directory to find VCS ignored files and this can be quite expensive - possibly more expensive than blindly deleting a directory tree. And it would blow away IDE files.

The correct solution is for the CLOBBER file/mechanism to denote which type of clobber is needed and have `mach clobber` honor that. I'm pretty sure there's an old bug on that somewhere. The even more correct solution is to never require clobbers at all :)
Component: mach → Build Config
That said, bug 1188224 should work around these .pyc issues, and a mach clobber python shouldn't be necessary. It would be good to know why that doesn't work in this case.
We have mach clobber --full... which should probably do mach clobber python too (it doesn't)


a year ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.