make_game --pick: on macOS, the folder dialog is osascript's choose folder, so it needs no Tkinter (MAKE-GAME-PICK-MACOS) #2185
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2185
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/make-game-pick-macos-osascript"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed in the coordination issue as: MAKE-GAME-PICK-MACOS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7181407725)
What and why
make_game.py --pickopens its folder dialog through Tk on macOS. Homebrew's Python ships without Tkinter (it's a separatepython-tk@3.Nformula), so on a Mac with Homebrew's Python--pickstops:osascriptis on every Mac, and itschoose folderis the system folder dialog.native_picker()now returns it on macOS, the way kdialog and zenity are the native tools on Linux:native_ask:choose folder with prompt … default location …. The prompt and the start folder are passed asargv, not pasted into the script, so a path with quotes needs no escaping. Cancel is AppleScript error -128, whichosascriptexits 1 with, the codenative_askalready treats as cancelled.native_warn:display dialog … with icon caution, also with the message passed asargv.osascriptfails to run, it falls back to Tk as before.Tested
Apple M3, macOS 26.5.1:
osacompile. The warning dialog showed a message with quotes, a backslash and a newline, passed asargv(run withgiving up after 1). Thechoose folderdialog opened on the home folder. Cancel (error number -128) exits 1.tests/test_make_game_pick.py: 17 tests OK on Python 3.12 and 3.15. New tests cover macOS picking osascript (and nothing when it's missing), the arguments of the ask and the warning, and cancel. The old "None on macOS" case now only covers Windows. Alltests/test_make_game*.pyare OK.AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.🤖 Generated with Claude Code
Red checks: from
main, not this changeThe failing jobs (
check,macos-python,stdlib-tests-linux,linux-gpu-tools,macos,windows) fail the same way onmaind48a957bb(MEASURED on macOS for the Python tests, 1 run, with the same assertion text; GPU tests READ from this PR's CI logs). The open pull requests that fix them:maintest_docs_cli_flagstest_make_game_preflight,test_progress_dashboard(repository URL)test_docs_repo_pathsmain, a merge is onTauwni:fix/2552-merge-main, correction)test_tool_stdout_encodingTauwni:fix/stdout-replace-two-new-scripts(no PR, open PR limit)test_windows_boot_journal_seedtest_docs_python_depstest_build_runtime_fallbackvk_bindless_dimensions(macOS)test_docs_env_varstest_make_game_pipelines,test_sampler_source_census,test_spirv_metal_set0_cli_errors,test_spirv_metal_set0_extra,tests/semantic/test_valu_cvt_f16_int16_mods.py,ps_exp_f32_denorm_rt(macOS)Tauwni/leonida, no PR (finding)cs_imgatomic_ext(macOS, linux-gpu-tools)vk_xdxr_postbuild_readback(Windows)main: mergemainNot checked by a second agent or human yet.
Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU; no macOS here, so the osascript path itself is only covered by the mocked tests). Merges cleanly. With this PR, python -I tests/test_make_game_pick.py: 17 tests OK. The PR's test file against main's make_game.py: 2 failures, so the new tests fail on main and pass with the change. compileall clean.
AI-assisted: yes (Claude Code)
Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.
(AI-assisted triage.)
Now ready for review and
MERGEABLE. Clean-room verified: usingosascript'schoose folderon macOS inmake_game.py:641-686with unit coverage intests/test_make_game_pick.pyis clean and avoids requiring Tkinter on macOS.Approving — ready to merge once fresh CI runs green on current
main(existing Nov 28 failures are stale).(AI-assisted review.)