Bug 1568258 Comment 6 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I don't think there's any automatic clobbering mechanism. I'm not an expert on our virtualenv creation but I did a bit of digging and the reason this type of error doesn't happen all the time is:

1. Only mozbase modules are place in the `init` virtualenv, all other modules (e.g in `third_party/python`) are appended to the `PYTHONPATH` at `mach` runtime. I'm not sure why this is, probably something to do with mach or the virtualenv logic depending on mozbase.

2. On non-Windows, these mozbase modules link back to the mozbase source.

Together that means this type of issue should only happen on Windows and with changes to mozbase, which changes pretty infrequently these days. Maybe one easy thing to do would be to change `mach clobber python` to also remove the `_virtualenvs` folder (in addition to removing all `.pyc` files). That way at least we can tell people to run a simple one-liner if they run into this.
I don't think there's any automatic clobbering mechanism. I'm not an expert on our virtualenv creation but I did a bit of digging and the reason this type of error doesn't happen all the time is:

1. Only mozbase modules are placed in the `init` virtualenv, all other modules (e.g in `third_party/python`) are appended to the `PYTHONPATH` at mach runtime. I'm not sure why this is, probably something to do with mach or the virtualenv logic depending on mozbase.

2. On non-Windows, these mozbase modules link back to the mozbase source.

Together that means this type of issue should only happen on Windows and with changes to mozbase, which changes pretty infrequently these days. Maybe one easy thing to do would be to change `mach clobber python` to also remove the `_virtualenvs` folder (in addition to removing all `.pyc` files). That way at least we can tell people to run a simple one-liner if they run into this.

Back to Bug 1568258 Comment 6