Fix deprecated syntax failure in publish check#6
Fix deprecated syntax failure in publish check#6peter-jerry-ye wants to merge 2 commits intomoonbit-community:masterfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b10861f1f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/main/main.mbt
Outdated
| window.show() | ||
| let exit_code = QApplication::exec() | ||
| drop([window, app, exit_code]) | ||
| ignore(QApplication::exec()) |
There was a problem hiding this comment.
Preserve Qt object lifetimes during event loop
This change removes the only post-exec() use of app and window, so those Ref objects are now eligible to become unreachable before QApplication::exec() returns; in this codebase, Ref<T> uses a finalizer that runs ~T() when collected, so a GC/RC cycle during the event loop can destroy the live QApplication/Window and cause crashes or lost callbacks while the UI is running. Keeping explicit references alive until after exec() returns is required for correctness.
Useful? React with 👍 / 👎.
Summary
drop([window, app, exit_code])insrc/main/main.mbtmoon check --deny-warnQApplication::exec()Why
publish-packagefailed in upstream run duedeprecated_syntaxerrors from implicitDropimplementation when callingdrop(...).Validation
moon check --target native --deny-warn --package-path src/qpaintermoon check (native)now passesmoon publishfails because token is empty on fork (SECRETnot set), expected.