Issue 43709: Windows Tools\buildbot\clean.bat misses some needed pyc/pyo removal
Issue43709
Created on 2021-04-02 20:56 by db3l, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 25157 | closed | db3l, 2021-04-02 21:48 | |
| Messages (4) | |||
|---|---|---|---|
| msg390098 - (view) | Author: David Bolen (db3l) * | Date: 2021-04-02 20:56 | |
The Tools\buildbot\clean.bat script used on Windows only removes pyc/pyo files from the Lib tree, leaving some files beneath Tools (clinic and peg_generator) and Parser (asdl). This can cause failures following commits that affect those files, such as fcb55c0037baab6f98f91ee38ce84b6f874f034a (in issue #27129) leading to subsequent crashes or anomalous behavior. This appears to have been true for a while, though only the 3.10 branch ran into the issue, so any fix might also be back-ported to the other active branches. |
|||
| msg390100 - (view) | Author: David Bolen (db3l) * | Date: 2021-04-02 21:03 | |
Something like this is a quick 'n dirty minimal fix - at least it seems to solve the problem that arose in issue #27129 on the Win10 buildbot: --- a/Tools/buildbot/clean.bat +++ b/Tools/buildbot/clean.bat @@ -11,6 +11,8 @@ call "%pcbuild%\build.bat" -t Clean -k -d %* echo Deleting .pyc/.pyo files ... del /s "%root%\Lib\*.pyc" "%root%\Lib\*.pyo" +del /s "%root%\Tools\*.pyc" "%root%\Tools\*.pyo" +del /s "%root%\Parser\*.pyc" "%root%\Parser\*.pyo" echo Deleting test leftovers ... rmdir /s /q "%root%\build" but since this only covers the buildbot script, someone working within the regular VS IDE and just using the clean target of the projects could presumably run into the same issue. Or is there some other way to fully clean a working tree from within the IDE? Not sure how important that is to address in any event. |
|||
| msg390164 - (view) | Author: David Bolen (db3l) * | Date: 2021-04-04 00:51 | |
Based on further information in issue #27129 as well as issue #43719 it appears a source of the problem prompting this fix was a failure to update the magic number in the original commit for #27129. The windows clean script does still leave more artifacts than, for example, the Unix Makefile, but it shouldn't have resulted in a problem if the magic number had changed, and it's not clear it has to change after all. So this issue can probably be closed once that is corrected. |
|||
| msg390201 - (view) | Author: David Bolen (db3l) * | Date: 2021-04-04 17:16 | |
No longer needed after commit c368ce74d2c9bcbf1ec320466819c2d4768252f7 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:43 | admin | set | github: 87875 |
| 2021-04-04 17:16:58 | db3l | set | status: open -> closed resolution: out of date messages: + msg390201 stage: patch review -> resolved |
| 2021-04-04 00:51:07 | db3l | set | messages: + msg390164 |
| 2021-04-02 21:48:26 | db3l | set | keywords:
+ patch stage: patch review pull_requests: + pull_request23904 |
| 2021-04-02 21:03:02 | db3l | set | messages: + msg390100 |
| 2021-04-02 20:56:43 | db3l | create | |