Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-109515: Allow a large number of frozen modules on Windows #109516

Merged
merged 21 commits into from
Oct 30, 2023

Conversation

rghe
Copy link
Contributor

@rghe rghe commented Sep 17, 2023

This PR changes freezing modules compilation on windows by writing freezing module paths into a file instead of the command line.
Non-windows builds are unchanged

@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Sep 17, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Sep 17, 2023

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@bedevere-app
Copy link

bedevere-app bot commented Sep 17, 2023

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@rghe rghe requested a review from a team as a code owner September 17, 2023 16:33
@AA-Turner AA-Turner changed the title gh-109515 - Allow large number of frozen modules even on windows gh-109515: Allow a large number of frozen modules on Windows Sep 21, 2023
@zooba
Copy link
Member

zooba commented Sep 26, 2023

We always squash merge PRs and rewrite the commit messages, don't worry about the change history.

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
rghe and others added 4 commits September 26, 2023 19:28
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Copy link
Member

@zooba zooba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with this, but I'm not the maintainer of this code. Not sure who cares about it most, but they can merge it (or I'll get it in a couple of weeks if nobody cares)

Comment on lines 377 to 378
<ItemGroup>
<!-- BEGIN freeze mappings -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to fix the indentation on these lines. I don't see where it is though.

Otherwise anyone who edits this file manually is likely to fix it and trigger regeneration.

@AA-Turner
Copy link
Member

Devguide lists Guido & Kumar as deepfreeze experts.

A

@@ -659,8 +662,7 @@ def regen_pcbuild(modules):
filterlines.append(f' <None Include="..\\{pyfile}">')
filterlines.append(' <Filter>Python Files</Filter>')
filterlines.append(' </None>')
deepfreezerules.append(f'\t\t "$(PySourcePath){header}:{src.frozenid}" ^')
deepfreezerules.append('\t\t "-o" "$(PySourcePath)Python\\deepfreeze\\deepfreeze.c"\'/>' )
deepfreezemappings.append(f' <FrozenModule Include="$(PySourcePath)\\{header}" FrozenId="{src.frozenid}" />\n')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would solve Steve's point re indentation

Suggested change
deepfreezemappings.append(f' <FrozenModule Include="$(PySourcePath)\\{header}" FrozenId="{src.frozenid}" />\n')
deepfreezemappings.append(f' <FrozenModule Include="$(PySourcePath)\\{header}" FrozenId="{src.frozenid}" />\n')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reformatted the vcxproj, now everything seems aligned

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to deepfreeze.py LGTM (one nit for the help message). I'll leave the rest to Steve and Adam!

Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
@rghe
Copy link
Contributor Author

rghe commented Oct 28, 2023

I'm okay with this, but I'm not the maintainer of this code. Not sure who cares about it most, but they can merge it (or I'll get it in a couple of weeks if nobody cares)

ahem, ping?

@zooba
Copy link
Member

zooba commented Oct 30, 2023

Thanks for the ping!

@zooba zooba merged commit 8eaa206 into python:main Oct 30, 2023
@ericsnowcurrently
Copy link
Member

There are a bunch of buildbot failures, but they may be due to gh-110764.

@rghe
Copy link
Contributor Author

rghe commented Oct 30, 2023

There are a bunch of buildbot failures, but they may be due to gh-110764.

well, I don´t think it's due to this change, since it affects only the pre-build frozen module generator on windows builds and all error messages seem to be "define _Py_ThreadId for this platform"

@rghe rghe deleted the allow-large-number-of-frozen-modules-vstudio branch October 30, 2023 17:42
FullteaR pushed a commit to FullteaR/cpython that referenced this pull request Nov 3, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants