# Windows CI build fails with "You will need to rebuild pythoncore to see the changes"

**URL:** <https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071>\
**Category:** Core Workflow\
**Created:** [March 27, 2019, 10:37am UTC](https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071 "2019-03-27T10:37:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdemeyer](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jdemeyer/32/454_2.png) [@jdemeyer](https://discuss.python.org/u/jdemeyer)\
**Post date:** [March 27, 2019, 10:37am UTC](https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071/1 "2019-03-27T10:37:37Z")

</div>

I created a PR to test the PEP 580 implementation: [https://github.com/python/cpython/pull/12582](https://github.com/python/cpython/pull/12582)

However, it’s failing Windows builds on AppVeyor and Azure with  
`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.`

It seems to me that this is a problem with the CI build system, not with my PR (but please correct me if I’m wrong).

CC @steve.dower

---

<div class="post-metadata">

**Author:** ![pitrou](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pitrou/32/28_2.png) [@pitrou](https://discuss.python.org/u/pitrou)\
**Post date:** [March 27, 2019, 10:53am UTC](https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071/2 "2019-03-27T10:53:33Z")

</div>

Those are generated files. The error probably means you didn’t commit the updated version of those files (after building them locally).

Otherwise it’s a timestamp issue? (do we rely on git timestamps?)

---

<div class="post-metadata">

**Author:** ![jdemeyer](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jdemeyer/32/454_2.png) [@jdemeyer](https://discuss.python.org/u/jdemeyer)\
**Post date:** [March 27, 2019, 11:10am UTC](https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071/3 "2019-03-27T11:10:08Z")

</div>

> [@pitrou](#):
>
> Those are generated files. The error probably means you didn’t commit the updated version of those files (after building them locally).

I totally was not aware of that. I ran `make regen-importlib` and it changed something. Let’s see if that fixes it.

In any case, the error message could be improved to mention “make regen-importlib”, I’ll make a PR for that.

---

<div class="post-metadata">

**Author:** ![jdemeyer](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jdemeyer/32/454_2.png) [@jdemeyer](https://discuss.python.org/u/jdemeyer)\
**Post date:** [March 27, 2019, 11:25am UTC](https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071/4 "2019-03-27T11:25:20Z")

</div>

Indeed, that fixed it. I was not the first one bitten by this: [https://bugs.python.org/issue29631](https://bugs.python.org/issue29631)

See [https://github.com/python/cpython/pull/12585](https://github.com/python/cpython/pull/12585) for improving that error message.

---

<div class="post-metadata">

**Author:** ![steve.dower](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/steve.dower/32/56_2.png) [@steve.dower](https://discuss.python.org/u/steve.dower)\
**Post date:** [March 27, 2019, 12:41pm UTC](https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071/5 "2019-03-27T12:41:12Z")

</div>

“make regen-all” isn’t a thing on Windows and the file is already regenerated at that point. If you want to add Linux instructions into the Windows build system, please make clear that they’re for a different platform and are probably only going to be relevant if you’re seeing the error in CI.

---

<div class="post-metadata">

**Author:** ![jdemeyer](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jdemeyer/32/454_2.png) [@jdemeyer](https://discuss.python.org/u/jdemeyer)\
**Post date:** [March 27, 2019, 1:34pm UTC](https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071/6 "2019-03-27T13:34:58Z")

</div>

Do you have a concrete wording suggestion? How about

> If you are not developing on Windows but you see this error on a continuous integration build, remember to run “make regen-all” and commit any changes this makes.

---

<div class="post-metadata">

**Author:** ![steve.dower](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/steve.dower/32/56_2.png) [@steve.dower](https://discuss.python.org/u/steve.dower)\
**Post date:** [March 27, 2019, 1:52pm UTC](https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071/7 "2019-03-27T13:52:58Z")

</div>

Let me think (and nosy me on the bpo issue). All our CI systems should have an environment variable to detect them by, so we could have an extra message when there’s a chance the developer isn’t building locally. There’s probably general improvements to be had in the message anyway, but bpo is the place and not here.

---

<div class="post-metadata">

**Author:** ![jdemeyer](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jdemeyer/32/454_2.png) [@jdemeyer](https://discuss.python.org/u/jdemeyer)\
**Post date:** [March 27, 2019, 2:05pm UTC](https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071/8 "2019-03-27T14:05:40Z")

</div>

> [@steve.dower](#):
>
> nosy me on the bpo issue

See [https://bugs.python.org/issue36448](https://bugs.python.org/issue36448) but you were already added.
