Repository navigation
Let haru open on Windows again, and say why when it cannot - #5
Merged
Merged
Conversation
The last release asked wgpu for DX12 alone on Windows. eframe builds wgpu without its DX12 backend, so that left no backend at all: creating the surface failed, run_native returned an error, and main printed it to a stderr that a windows-subsystem build does not have. Double-clicking haru did nothing. Running both builds under Wine shows it: main exits with "Failed to create surface for any enabled backend", this opens the window. The backend is wgpu's own choice again (Vulkan, then OpenGL, with WGPU_BACKEND still overriding it), as it was in v0.6.5. The opaque window and vsync from the same change stay. Every way main gives up now goes through failure::report, which still prints, appends to haru.log in haru's data folder, and on Windows shows a message box through rfd. Panics are logged by a hook, and one that ends the event loop is caught around run_native and shown after the window is gone, so a crash is no longer silent either. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QJnt7JtdtiqnVCP9GYqUhK
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Re-running Release for a version whose draft already exists replaced the binaries but left the draft's target where the first run put it. A draft has no tag until Publish, which makes it from that target, so publishing a rebuilt draft would tag the commit before the change while shipping binaries built after it, and the next changelog would list the change again. The update path now sets --target to the commit being built whenever the release is still a draft. Published releases are untouched. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QJnt7JtdtiqnVCP9GYqUhK
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.
Requested by beingsuz · project thread
Before: on Windows, haru from
main(the v0.7.0 draft) does nothing when opened. No window and no error appear.After: the window opens again. If haru ever cannot open it, or crashes, a message box says why and where the details were saved (
%LOCALAPPDATA%\haru\haru.log). Re-running Release for the v0.7.0 draft now also moves the draft's tag target to the commit the new binaries were built from.The cause was my change in #3. It restricted wgpu to DX12 on Windows, but eframe builds wgpu without its DX12 backend (
cargo tree -e features -i wgpu-core --target x86_64-pc-windows-msvclists onlyvulkanandgles). That left no backend at all, so creating the surface failed andrun_nativereturned an error.mainprinted that error to stderr, which awindows_subsystem = "windows"build does not have.How:
WGPU_BACKENDstill overriding it. That is what v0.6.5 used. The opaque window and vsync from Fix the Windows port, offer the beta at install, and install WebView2 for web wallpapers #3 stay.maingives up now goes through a newfailuremodule. It still prints to stderr, appends toharu.login haru's data folder, and on Windows shows a message box throughrfd, a Windows-only dependency. haru'sunsafe_code = "forbid"stays, which rules out callingMessageBoxWdirectly.run_nativeand shown once the window is gone. Showing it from inside the hook would mean running a modal loop while winit unwinds.--target "$GITHUB_SHA"togh release edit. A draft has no tag until Publish, which makes the tag from the draft's target. Without this, publishing the rebuilt v0.7.0 would tag the pre-fix commit while shipping post-fix binaries. Published releases are untouched.How it was tested
Run under Wine 9.0 on a virtual X display, with both builds cross-compiled with mingw (
x86_64-pc-windows-gnu):mainWGPU error: Failed to create surface for any enabled backend: {}on stderr, which Windows discards. This reproduces the report.WGPU_BACKEND=dx12(forcing the old failure)haru.log.panic!in app setup (not committed)run_nativeand shows in a box as "haru crashed in thread main: panicked at …". It is also logged.Also:
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings(Linux andx86_64-pc-windows-gnu) andcargo test --workspaceare clean, with 172 tests. The release workflow parses as YAML. Its changed branch runs only on a real release run.Not tested: a real Windows machine and the MSVC release build. Wine drew through OpenGL on a software renderer, so the Vulkan path a real GPU will take was not exercised. It is the same path v0.6.5 used.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QJnt7JtdtiqnVCP9GYqUhK