python-build-standalone icon indicating copy to clipboard operation
python-build-standalone copied to clipboard

FR: remove debug symbols from Windows `install_only` builds

Open ofek opened this issue 2 years ago • 6 comments

To save space and bandwidth

ofek avatar May 31 '23 17:05 ofek

Should be as simple as removing *.pdb

ofek avatar May 31 '23 17:05 ofek

I don't think it's a good idea to not ship debug symbols.

mitsuhiko avatar Jun 20 '23 10:06 mitsuhiko

Okay, why?

ofek avatar Jun 20 '23 13:06 ofek

I believe that debug symbols should be available for any pre-built binary that is distributed. Full stop.

If debug symbols aren't available, debugging crashes becomes much harder. Lack of symbols can also hamper some forms of performance profiling. That's why I feel anyone distributing [open source] software has an obligation to make symbols available.

Since I'm not aware of an easy/cheap way to run a debug symbol server, that means making symbols available as GitHub release artifacts. Right now that occurs implicitly since we distribute unstripped binaries.

While it is possible to ship symbols as separate artifacts (the tooling for this is more polished on Windows / PDBs than it is on Linux), I'm more inclined to ship an install_only_stripped artifact variant. That way end-users can pick which variant to use without having to worry about joining the detached symbols.

Another idea that's been floating around in my head is shipping various scripts/binaries in the distributions that can post-process the distribution. One could imagine shipping an executable that is capable of stripping the binaries. Then downstream consumers could repackage stripped binaries.

Adding this to the backlog.

indygreg avatar Jul 20 '23 01:07 indygreg

@indygreg: +1 for shipping install_only_stripped artifacts because that eliminates the need for downstream postprocessing.

axel-kah avatar Aug 22 '23 20:08 axel-kah

It will be excellent to have these stripped builds. I would like to offer my assistance to various projects to start building with or migrate to PyApp but currently if one were to opt-in for the embedded Python configuration it would be impossible to come close to the current size of, for example, binaries like this: https://github.com/yt-dlp/yt-dlp/releases/tag/2023.12.30 (~13.4 MB)

ofek avatar Mar 06 '24 02:03 ofek