experiment(#441): migrate floating painter to winit 0.31-beta (objc2 0.6 unification) [DO NOT MERGE] - #629
experiment(#441): migrate floating painter to winit 0.31-beta (objc2 0.6 unification) [DO NOT MERGE]#629IvanWng97 wants to merge 1 commit into
Conversation
…jc2 stack) Adopts winit 0.31.0-beta.2 + objc2-app-kit 0.3.2 so both ride ONE objc2 stack (winit-appkit 0.31 = objc2 0.6 / app-kit 0.3), collapsing the duplicate-version families #441 tracks: objc2 0.5.2 + 0.6.4 → 0.6.4 objc2-app-kit 0.2.2 + 0.3.2 → 0.3.2 objc2-foundation 0.2/0.3 → 0.3.2 core-graphics 0.23 → gone (bitflags 1.3.2 now orphaned) winit 0.31 API rework applied to floating/: - ApplicationHandler is non-generic; window creation resumed → can_create_surfaces; user_event → parameterless proxy_wake_up (the FloatingEvent enum + typed user-event loop are gone — EventLoop::builder(), proxy.wake_up()). - Window / ActiveEventLoop are traits: Rc<dyn Window>, &dyn ActiveEventLoop, create_window → Box<dyn Window> (softbuffer still works via winit's HasWindowHandle-for-dyn-Window impls). - WindowEvent renames: Resized→SurfaceResized, CursorMoved→PointerMoved, MouseInput→PointerButton{ButtonSource::Mouse}; inner_size→surface_size; MonitorHandle::position now Option, size via current_video_mode. - Per-platform attrs are structs via with_platform_attributes: WindowAttributesMacOS (verified, compiles) + WindowAttributesWindows (source-verified vs winit-win32 0.31; compiled only by windows CI). - focus/macos.rs: objc2 0.6 const rename + drop now-safe `unsafe`. Verified on macOS: builds clean (lib + all-targets, 0 warnings), 756 lib + 14 focus + 22 floating tests pass, floating_snapshot renders intact, clippy -D warnings clean. NOT MERGED — winit 0.31 is beta; land when it ships stable (this branch is the turnkey migration). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017MLTuuQChT57oxFCzEJpw1
|
Claude finished @IvanWng97's task in 1m 13s —— View job Security review — PR #629 (winit 0.30 → 0.31 migration)
Scope check: the diff touches Findings: none.
No hook shim, socket/pipe transport, |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #629 +/- ##
==========================================
- Coverage 97.14% 97.13% -0.01%
==========================================
Files 159 159
Lines 42268 42268
==========================================
- Hits 41062 41058 -4
- Misses 1206 1210 +4
🚀 New features to boost your workflow:
|
|
Closed under the open-PR cap (at most 4 open PRs; the runners take 20 jobs at once, docs.github.com/en/actions/reference/limits). The branch stays; this reopens when it is next to merge. Do not force-push the branch, or it cannot be reopened. |
|
Dropped for good in the waitlist triage against AGENTS.md's "Every mechanism earns its upkeep": it names no failure that nothing else prevents, or the need it served is met elsewhere. The branch is kept for reference. |
What this does
Migrates the floating-window painter from winit 0.30 to winit 0.31.0-beta.2,
which completes winit's own move to the objc2 0.6 stack. That collapses all
of #441's duplicate objc2 families in one shot:
objc20.5.2 — gone (only 0.6.x remains)objc2-app-kit/objc2-foundation0.2.2 — gone (0.3.x / winit's)objc2-core-graphics0.23 — gonebitflags1.3.2 — orphaned/droppedOn
mainwe pinobjc2-app-kitto winit-0.30's0.2.2and tell dependabot toignore its bumps precisely because a lone bump ahead of winit builds a second
full objc2 stack and breaks the AppKit activate API. This branch is the other
half: once winit moves, our direct
objc2-app-kitpin moves with it and thedependabot
ignoreis dropped.API migration map (winit 0.30 → 0.31)
ApplicationHandleris non-generic; window creationresumed→can_create_surfacesproxy.wake_up()(EventLoop::builder()replaceswith_user_event())Window/ActiveEventLoopare traits —Rc<dyn Window>,&dyn ActiveEventLoop,create_window→Box<dyn Window>(wrapped viaRc::from)WindowEventrenames:Resized→SurfaceResized,CursorMoved→PointerMoved{source},MouseInput→PointerButton{button: ButtonSource::Mouse(..)}inner_size()→surface_size()MonitorHandle::position()now returnsOption; size viacurrent_video_mode()?.size()WindowAttributesMacOS/WindowAttributesWindows) attached viawith_platform_attributes(Box<dyn PlatformWindowAttributes>)run_app(app)takes the app by valueNSApplicationActivateIgnoringOtherApps→ActivateIgnoringOtherApps; therunningApplicationWithProcessIdentifier/activateWithOptionsmsg-sends became safe (droppedunsafe)softbuffer 0.4.8 still works unchanged (
winitkeepsimpl HasWindowHandle for dyn Window).Verified (macOS)
just clippycleanNot yet verified
check-windows+windows-test.Refs #441.
🤖 Generated with Claude Code