Repository navigation
fix(packaging): make onefile fork diagnostics opt-in - #28
Merged
Designerspr merged 1 commit intoNov 25, 2026
Merged
Designerspr merged 1 commit into
Designerspr merged 1 commit into
Conversation
Every onefile launch printed the fork target to stderr. Launchers such as MeteorMasterAI surface any child stderr as a warning, so users got a bogus warning on every run even though the patch resolved the logical path to itself (no MSIX redirection in a plain Win32 install). Gate the line behind METDETPY_ONEFILE_VERBOSE instead of printing it unconditionally: values starting with 1/y/t enable it, everything else (including unset) keeps production and Store builds silent. The marker string stays in the compiled bootstrap, so the post-build artifact check and the loud-by-choice troubleshooting path both keep working. Also verify in patch_bootstrap that the env var name still appears in CREATE_CODE, document the switch, and add a regression test.
Designerspr
approved these changes
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every onefile launch writes the fork target to stderr:
Launchers that treat any child stderr as a warning (e.g. MeteorMasterAI) show a bogus warning on every run, even on a plain Win32 install where
logicalandfinalare identical and no MSIX redirection happens. The line is printed unconditionally today.Change
METDETPY_ONEFILE_VERBOSE=1(any value starting with1/y/t) prints it; everything else, including unset, keeps production and Store builds silent.verify_msix_onefile_patch()and the UPX search path keep working unchanged.patch_bootstrap()now also asserts thatVERBOSE_ENV_VARappears inCREATE_CODE, so the C literal and the Python constant cannot drift apart.Verification
python -m pytest tests/test_nuitka_patch.py→ 22 passed.cl /W3 /TC, MSVC 2022 x64, Nuitka 4.0.5 anchors): no warnings, no errors.METDETPY_ONEFILE_VERBOSE=1, andMETDETPY_MSIX_ONEFILE_PATCH_ACTIVEis still present in the binary.Branched from
mainbecause the patch moved toMetLib/packaging/nuitka_patches/in 871aba5, which is not indevyet.