-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Better reporting of why files are included. #1120
base: main
Are you sure you want to change the base?
Conversation
…_exe to cause report to be printed.
Hi Ian. When I see you working on such a big code I get happy and worried. It's very difficult for me to follow your code, test it, see if it's not breaking other things.
Furthermore, I am implementing the use of pathlib.Path as a default, because the code when it comes to path/file is hard to read and those normpath/normcase seem like a nightmare. |
Hi Marcelo. Sorry for the scary PR. It's still in progress, and I've been too busy at work to look at it for the last month or so, but plan to get back to it when I have a chance. Let me try to explain what is going on, since I think the changes (particularly in freezer.py) are probably less scary then they look at first sight, and I think it should be relatively easy to confirm that the changes do not break the rest of the freeze process. The key changes are in freezer.py. Those changes are:
(freezer.py also has some changes to variable names and to the import statements, which are only there to make things clearer and stop my IDE from reporting warnings--I could put those changes into a separate PR if you want.) The FileTracker object just collects information and prints a report, so does not have any effect on the rest of the freeze process. darwintools2.py is a simplified version of darwintools.py for use in the FileTracker object, so it also does not affect anything else in the freeze process. (It is not actually necessary to have darwintools2.py at this point, so I could leave it out of this PR for now, and include it in a subsequent PR with some Darwin-specific fixes.) FYI, my longer-term goal (not in this PR) is to use the FileTracker to resolve dynamically linked libraries on Darwin, which I think would solve some of the issues that have been coming up. |
Allow better reporting of why files are being included in the frozen application. Still work in progress. Ultimately this code should also allow dynamic links to be handled better on Darwin, and avoid including multiple copies of certain files.
(Having darwintools.py and darwintools2.py is temporary -- when this is all done, we should be able to get rid of the original darwintools.py.)
Adds a "--why-report" option to build_exe command that prints a report of why each file has been included.