classification
Title: Message "You will need to rebuild pythoncore to see the changes" should mention "make regen-all"
Type: compile error Stage: resolved
Components: Windows Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jdemeyer, paul.moore, steve.dower, tim.golden, xtreak, zach.ware
Priority: normal Keywords: patch

Created on 2019-03-27 11:21 by jdemeyer, last changed 2019-03-29 18:38 by steve.dower. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12585 merged jdemeyer, 2019-03-27 11:22
Messages (7)
msg338952 - (view) Author: Jeroen Demeyer (jdemeyer) * (Python triager) Date: 2019-03-27 11:21
On Windows builds, one may get the message

C:\projects\cpython\PCbuild\_freeze_importlib.vcxproj(130,5): error : importlib.h, importlib_external.h, importlib_zipimport.h updated. You will need to rebuild pythoncore to see the changes.

See for example https://bugs.python.org/issue29631 and https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071

The fix is simply running "make regen-all". It would be good to mention this in that error message.
msg338983 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-03-27 20:40
So an important aspect of the "fix" is that this message only appears after the fix has been applied. Anyone running into this locally has already updated those files, and just needs to "git add -u" to include them in their next commit. (Unfortunately, MSBuild has no reasonable way to retrigger a build it has already completed, since that introduces cycles into its dependency resolution.)

The problem here is that when a non-Windows developer sees this error in CI, it's not clear what *they* should do about it.

The current text is: "@(_Updated->'%(Filename)%(Extension)',', ') updated. You will need to rebuild pythoncore to see the changes."

The PR adds: "You may also need to run 'make regen-all'."

I'd propose adding "%0D%0A%0D%0AIf you are developing on another platform, try make regen-all and commit the updated files"

(The %0D%0A's at the start add newlines to the output for readability.)

As an aside, I thought we had a merge hook to check this on Travis? Why didn't that trigger? There's no reason why any of our CI platforms should let you build with out-of-date frozens, so it's a bit of a shame to blame the Windows build for doing its job properly :)
msg338988 - (view) Author: Jeroen Demeyer (jdemeyer) * (Python triager) Date: 2019-03-27 21:38
> As an aside, I thought we had a merge hook to check this on Travis?

For some reason, the Travis CI build on https://github.com/python/cpython/pull/12582 isn't actually starting. It says "Waiting for status to be reported" but I pushed 10 hours ago...
msg338998 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python triager) Date: 2019-03-27 23:54
> For some reason, the Travis CI build on https://github.com/python/cpython/pull/12582 isn't actually starting. It says "Waiting for status to be reported" but I pushed 10 hours ago.

Travis CI had some problem with linux builds

https://www.traviscistatus.com
msg339122 - (view) Author: Jeroen Demeyer (jdemeyer) * (Python triager) Date: 2019-03-29 15:53
> I'd propose adding "%0D%0A%0D%0AIf you are developing on another platform, try make regen-all and commit the updated files"

I updated the PR with wording similar to that. I don't want to bikeshed too much about the precise wording. If you disagree with my variant, I'll use your proposal verbatim.
msg339127 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-03-29 18:37
New changeset 3396d1e0ca858065c5bb7e5a9737be6ffc4028f7 by Steve Dower (Jeroen Demeyer) in branch 'master':
bpo-36448: mention 'make regen-all' in error message (GH-12585)
https://github.com/python/cpython/commit/3396d1e0ca858065c5bb7e5a9737be6ffc4028f7
msg339129 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-03-29 18:38
Merged. It doesn't need a backport - the target audience is CI users who will see this on master first.
History
Date User Action Args
2019-03-29 18:38:23steve.dowersetstatus: open -> closed
versions: - Python 3.7
type: compile error
messages: + msg339129

resolution: fixed
stage: patch review -> resolved
2019-03-29 18:37:41steve.dowersetmessages: + msg339127
2019-03-29 15:53:13jdemeyersetmessages: + msg339122
2019-03-27 23:54:54xtreaksetnosy: + xtreak
messages: + msg338998
2019-03-27 21:38:04jdemeyersetmessages: + msg338988
2019-03-27 20:40:40steve.dowersetmessages: + msg338983
versions: + Python 3.7, Python 3.8, Python 3.9
2019-03-27 11:22:54jdemeyersetkeywords: + patch
stage: patch review
pull_requests: + pull_request12527
2019-03-27 11:21:01jdemeyercreate