Conversation
Summary of ChangesHello @luadebug, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the build process and runtime compatibility for Qt applications targeting WebAssembly (WASM) using Xmake. It introduces optimizations for static plugin imports, updates Emscripten compiler flags to align with modern Qt 6.0+ requirements, and implements dynamic patching for generated HTML and JavaScript files to resolve common WASM-specific issues and enhance preload file support. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces several improvements and fixes for Qt builds, particularly for the WebAssembly (Wasm) platform. The changes include optimizing file generation to avoid unnecessary writes, adding and updating Emscripten flags for newer Qt versions, and patching generated HTML and JavaScript files to fix compatibility issues. My review focuses on improving code maintainability by reducing duplication and suggesting structural improvements. Overall, these are valuable changes for enhancing Wasm support.
…ng in load imports
|
/gemini review |
There was a problem hiding this comment.
Code Review
The pull request introduces necessary updates for Qt 6.9 WASM support, including static plugin resource initialization and essential patches for the Emscripten glue code. These changes address issues with selector handling and memory growth. I've suggested some improvements regarding the Emscripten flags and the efficiency of the file patching process.
…riting and copying only if different
…scripten JS handling
xmake/rules/qt/build_qt_wasm_app.lua
Outdated
| i = i + 1 | ||
| end | ||
| if content:sub(i, i) == ";" then i = i + 1 end | ||
| local new_func = "var findCanvasEventTarget = target => {\n" |
There was a problem hiding this comment.
I'm not sure if there will be compatibility issues with this hard-coded JS code in Qt WASM.
There was a problem hiding this comment.
我总是愿意等待,也许会有更好的选择出现。目前没有这个功能,它无法加载我在.zip 文件中提交的 QtQuick 应用。
…oved clarity and maintainability
Resolves: #7340
Resolves: #7050
Test project stuff:
wasmrun.zip
Currently my approach requires to uncomment stuff. Although it looks like that stuff should be injected by XMake itself.
❯ cat ~/wasmrun/src/main.cppAw I need really some good idea on how to fix/improve this.
After last commit we get next to expected result without JavaScript flooding errors:
But the problem is now to optimize existing PR content, so yeah... help wanted be like.