Skip to content

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

Merged
zooba merged 21 commits into
python:mainfrom
rghe:allow-large-number-of-frozen-modules-vstudio
Oct 30, 2023
Merged

gh-109515: Allow a large number of frozen modules on Windows#109516
zooba merged 21 commits into
python:mainfrom
rghe:allow-large-number-of-frozen-modules-vstudio

Conversation

@rghe

@rgherghe commented Sep 17, 2023

Copy link
Copy Markdown
Contributor

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

@ghost

ghost commented Sep 17, 2023

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app

Copy link
Copy Markdown

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
Copy Markdown

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 ownerSeptember 17, 2023 16:33
@AA-TurnerAA-Turner changed the title gh-109515 - Allow large number of frozen modules even on windowsgh-109515: Allow a large number of frozen modules on WindowsSep 21, 2023
Comment threadPCbuild/_freeze_module.vcxproj Outdated
Comment threadPCbuild/_freeze_module.vcxproj Outdated
Comment threadTools/build/deepfreeze.py Outdated
Comment threadMisc/NEWS.d/next/Build/2023-09-17-15-17-53.gh-issue-109515.zpEECA.rst Outdated
Comment threadTools/build/freeze_modules.py Outdated
@zooba

Copy link
Copy Markdown
Member

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>
Comment threadTools/build/deepfreeze.py Outdated
Comment threadTools/build/deepfreeze.py Outdated
Comment threadTools/build/deepfreeze.py Outdated
Comment threadTools/build/freeze_modules.py Outdated
rgheand 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>

@zoobazooba left a comment

Copy link
Copy Markdown
Member

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 threadPCbuild/_freeze_module.vcxproj Outdated
Comment on lines +377 to +378
<ItemGroup>
<!-- BEGIN freeze mappings -->

Copy link
Copy Markdown
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
Copy Markdown
Member

Devguide lists Guido & Kumar as deepfreeze experts.

A

Comment threadTools/build/freeze_modules.py Outdated
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@gvanrossumgvanrossum left a comment

Copy link
Copy Markdown
Member

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!

Comment threadTools/build/deepfreeze.py Outdated
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
@rghe

rghe commented Oct 28, 2023

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
Member

Thanks for the ping!

@zooba
zooba merged commit 8eaa206 into python:mainOct 30, 2023
@ericsnowcurrently

Copy link
Copy Markdown
Member

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

@rghe

rghe commented Oct 30, 2023

Copy link
Copy Markdown
ContributorAuthor

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@rghe@zooba@AA-Turner@ericsnowcurrently@gvanrossum