-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix WASM #846
Fix WASM #846
Conversation
# Before PR (current master branch version)
get_semantic_version('51212', False) -> '5.12.12'
get_semantic_version('600', False) -> '6.0.0'
get_semantic_version('6_7_3', False) -> None
get_semantic_version('51212', True) -> '5.1212-preview'
get_semantic_version('600', True) -> '6.0-preview'
get_semantic_version('6_7_3', True) -> None
# Before commit c4ce9f0
get_semantic_version('51212', False) -> '5.12.12'
get_semantic_version('600', False) -> '6.0.0'
get_semantic_version('6_7_3', False) -> '6.7.3'
get_semantic_version('51212', True) -> None
get_semantic_version('600', True) -> None
get_semantic_version('6_7_3', True) -> None
# Now
get_semantic_version('51212', False) -> '5.12.12'
get_semantic_version('600', False) -> '6.0.0'
get_semantic_version('6_7_3', False) -> '6.7.3'
get_semantic_version('51212', True) -> '5.1212-preview'
get_semantic_version('600', True) -> '6.0-preview'
get_semantic_version('6_7_3', True) -> '6.73-preview' |
Could you add a test case for wasm 6.7.3 and 6.8.0 in the test code? Also, could you update the CI variation? |
Is it possible to add a unit test for the
The chunk you added is not tested, on test coverage visualization on coveralls.io service. |
Please confirm the coverage of your additions also for |
From my short research, Qt LTS under the support duration is version 6.5.x and 6.8.x. It may be better to check these two on CI. |
Working on it! MaintenanceTool useful commandsFor reference, some useful commands for the MaintenanceTool binary of Qt: # List extensions for version 6.8.0 (to add to the expect json after 6.8.0 included since those are listed in the list-qt modules utility)
./MaintenanceTool search 'extensions.*.680$'
# List addons for version 6.7.3
./MaintenanceTool search '.*673.addons' Sadly this seem to not be able to install for other arch than the one running the CLI Note I wrote this scrap tool to print the qtsdkrepository repository in a tree format, very nice to list addons, builds and so on for each arch. The usage in the gist is to list extensions for each arch, but its simple and documented, so it's easy to scrap whatever with it Relative to Qt LTS6.5 LTS seems supported only for commercial users now 12 And according to a recent article from Qt3, they will extend their commercial LTS support to 5 years but will stop doing it for open source users. They will support extensions using another model (explaining the recent repo changes I guess, since they will decouple Qt version from the extensions versions). Warning It seems that Qt LTS versions will only be for commercial users from now on So maybe supporting only the latest Qt LTS commercial version (current is 6.8) is not a bad idea going forward Footnotes |
Done. The tests now install and checks Qt 6.8.1 with mprofile, I've added tests for the latests and special WASM versions (6.7.3, 6.8.1), and most importantly completely rewrote my approach. I chose to stick to the Qt team's logic rather than trying to create an impression of continuity. Since 6.7.x, Qt decided that WASM was Show console commands, the new help text, examples...kidev:~$ aqt list-qt all_os wasm --arch 6.8.1
wasm_singlethread wasm_multithread
kidev:~$ aqt list-qt all_os wasm --arch 6.7.3
wasm_singlethread wasm_multithread
kidev:~$ aqt install-qt all_os wasm 6.7.3 wasm_singlethread
INFO : aqtinstall(aqt) v0.1.dev1822 on Python 3.12.7 [CPython GCC 14.2.1 20240910]
WARNING : You are installing the Qt6-WASM version of Qt, which requires that the desktop version of Qt is also installed. You can install it with the following command:
`aqt install-qt linux desktop 6.7.3 linux_gcc_64`
INFO : Downloading qttools...
INFO : Downloading qtbase...
INFO : Downloading qtsvg...
kidev:~$ aqt list-qt -h
usage: aqt list-qt [-h] [--extension {,armv7,x86_64,wasm,x86,src_doc_examples,arm64_v8a,wasm_singlethread,wasm_multithread}] [--spec SPECIFICATION]
[--modules (VERSION | latest) ARCHITECTURE | --long-modules (VERSION | latest) ARCHITECTURE | --extensions (VERSION | latest) | --arch (VERSION | latest) | --latest-version | --archives ARCHIVES [ARCHIVES ...]]
{linux,linux_arm64,mac,windows,windows_arm64,all_os} [{desktop,winrt,android,ios,wasm}]
positional arguments:
{linux,linux_arm64,mac,windows,windows_arm64,all_os}
host os name
{desktop,winrt,android,ios,wasm}
Target SDK. When omitted, this prints all the targets available for a host OS.
options:
-h, --help show this help message and exit
--extension {,armv7,x86_64,wasm,x86,src_doc_examples,arm64_v8a,wasm_singlethread,wasm_multithread}
Deprecated since aqt v3.1.0. Use of this flag will emit a warning, but will otherwise be ignored.
--spec SPECIFICATION Filter output so that only versions that match the specification are printed. IE: `aqt list-qt windows desktop --spec "5.12"` prints all versions beginning with 5.12
--modules (VERSION | latest) ARCHITECTURE
First arg: Qt version in the format of "5.X.Y", or the keyword "latest". Second arg: an architecture, which may be printed with the "--arch" flag. When set, this prints all the modules available for either Qt
5.X.Y or the latest version of Qt.
--long-modules (VERSION | latest) ARCHITECTURE
First arg: Qt version in the format of "5.X.Y", or the keyword "latest". Second arg: an architecture, which may be printed with the "--arch" flag. When set, this prints a table that describes all the modules
available for either Qt 5.X.Y or the latest version of Qt.
--extensions (VERSION | latest)
Deprecated since v3.1.0. Prints a list of valid arguments for the '--extension' flag. Since the '--extension' flag is now deprecated, this will always print an empty list.
--arch (VERSION | latest)
Qt version in the format of "5.X.Y", or the keyword "latest". When set, this prints all architectures available for either Qt 5.X.Y or the latest version of Qt.
--latest-version print only the newest version available
--archives ARCHIVES [ARCHIVES ...]
print the archives available for Qt base or modules. If two arguments are provided, the first two arguments must be 'VERSION | latest' and 'ARCHITECTURE', and this command will print all archives associated with
the base Qt package. If more than two arguments are provided, the remaining arguments will be interpreted as modules, and this command will print all archives associated with those modules. At least two arguments
are required.
Examples:
$ aqt list-qt mac # print all targets for Mac OS
$ aqt list-qt mac desktop # print all versions of Qt 5
$ aqt list-qt mac desktop --spec "5.9" # print all versions of Qt 5.9
$ aqt list-qt mac desktop --spec "5.9" --latest-version # print latest Qt 5.9
$ aqt list-qt mac desktop --modules 5.12.0 clang_64 # print modules for 5.12.0
$ aqt list-qt mac desktop --spec 5.9 --modules latest clang_64 # print modules for latest 5.9
$ aqt list-qt mac desktop --arch 5.9.9 # print architectures for 5.9.9/mac/desktop
$ aqt list-qt mac desktop --arch latest # print architectures for the latest Qt 5
$ aqt list-qt mac desktop --archives 5.9.0 clang_64 # list archives in base Qt installation
$ aqt list-qt mac desktop --archives 5.14.0 clang_64 debug_info # list archives in debug_info module
$ aqt list-qt all_os wasm --arch 6.7.3 # print architectures for Qt WASM 6.7.3
kidev:~$ aqt install-qt -h
usage: aqt install-qt [-h] [-O [OUTPUTDIR]] [-b [BASE]] [--timeout [TIMEOUT]] [-E [EXTERNAL]] [--internal] [-k] [-d ARCHIVE_DEST] [-m [MODULES ...]] [--archives [ARCHIVES ...]] [--noarchives] [--autodesktop]
{linux,linux_arm64,mac,windows,windows_arm64,all_os} {desktop,winrt,android,ios,wasm,qt} (VERSION | SPECIFICATION) [arch]
Install Qt.
positional arguments:
{linux,linux_arm64,mac,windows,windows_arm64,all_os}
host os name
{desktop,winrt,android,ios,wasm,qt}
Target SDK
(VERSION | SPECIFICATION)
Qt version in the format of "5.X.Y" or SimpleSpec like "5.X" or "<6.X"
arch
target linux/desktop: gcc_64, wasm_32
target mac/desktop: clang_64, wasm_32
target mac/ios: ios
windows/desktop: win64_msvc2019_64, win32_msvc2019
win64_msvc2017_64, win32_msvc2017
win64_msvc2015_64, win32_msvc2015
win64_mingw81, win32_mingw81
win64_mingw73, win32_mingw73
win32_mingw53
wasm_32
windows/winrt: win64_msvc2019_winrt_x64, win64_msvc2019_winrt_x86
win64_msvc2017_winrt_x64, win64_msvc2017_winrt_x86
win64_msvc2019_winrt_armv7
win64_msvc2017_winrt_armv7
android: Qt 5.14: android (optional)
Qt 5.13 or below: android_x86_64, android_arm64_v8a
android_x86, android_armv7
target all_os/wasm: wasm_singlethread, wasm_multithread
options:
-h, --help show this help message and exit
-O [OUTPUTDIR], --outputdir [OUTPUTDIR]
Target output directory(default current directory)
-b [BASE], --base [BASE]
Specify mirror base url such as http://mirrors.ocf.berkeley.edu/qt/, where 'online' folder exist.
--timeout [TIMEOUT] Specify connection timeout for download site.(default: 5 sec)
-E [EXTERNAL], --external [EXTERNAL]
Specify external 7zip command path.
--internal Use internal extractor.
-k, --keep Keep downloaded archive when specified, otherwise remove after install
-d ARCHIVE_DEST, --archive-dest ARCHIVE_DEST
Set the destination path for downloaded archives (temp directory by default).
-m [MODULES ...], --modules [MODULES ...]
Specify extra modules to install
--archives [ARCHIVES ...]
Specify subset of archives to install. Affects the base module and the debug_info module. (Default: all archives).
--noarchives No base packages; allow mod amendment with --modules option.
--autodesktop For Qt6 android, ios, wasm, and msvc_arm64 installations, an additional desktop Qt installation is required. When enabled, this option installs the required desktop version automatically. It has no effect when the desktop installation is not required.
It is much more consistent with the current code and logic of aqt, adds much less magic branches with random versions, and uses more of the existing code architecture. It is also more explicit that Qt requires another version when using WASM. The usage of Note For the users of Install Qt, to install Qt for WASM and with the current runner OS as host: - name: Install Qt for host and WASM
uses: jurplel/[email protected]
with:
version: '6.8.1'
host: 'all_os'
target: 'wasm'
arch: 'wasm_singlethread'
modules: 'all'
extra: '--autodesktop' |
Moved to latest version as described in previous comment. I'm not very familiar with Azure CI so we'll see. Otherwise, |
@@ -435,7 +478,6 @@ def expected_windows_desktop_plus_wasm_5140(is_wasm_threaded: bool) -> Dict: | |||
("--modules 5.14.0 win64_msvc2017_64", False, ["modules_by_arch", "win64_msvc2017_64"]), | |||
("--modules 6.5.0 wasm_singlethread", True, ["modules_by_arch", "wasm_singlethread"]), | |||
("--modules 6.5.0 wasm_multithread", True, ["modules_by_arch", "wasm_multithread"]), | |||
("--arch latest", True, ["architectures"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This used to work, but now it refers to 6.8.1, where there are less archs available when going to all_os wasm: only wasm_singlethread
wasm_multithread
, and this was still excepting the other standard archs. Hence the removal. Tell me if I missed something and that it should be kept
@miurahr Please review my changes to the tests. |
for example with windows desktop 6.8.1 win64_msvc2022_arm64_cross_compiled both qtwebengine and qtpdf don't exist. Signed-off-by: Alexandre 'Kidev' Poumaroux <[email protected]>
Signed-off-by: Alexandre 'Kidev' Poumaroux <[email protected]>
Signed-off-by: Alexandre 'Kidev' Poumaroux <[email protected]>
Signed-off-by: Alexandre 'Kidev' Poumaroux <[email protected]>
Signed-off-by: Alexandre 'Kidev' Poumaroux <[email protected]>
Ok so it was not only the issue of the extensions. Looks like --autodesktop creates the wrong URL for the host: since 6.8, the version folder is doubled: |
…sktop version to download
… to prevent server spam
There was a mistake in the autodesktop logic. It's all fixed, and the output log while installing with kidev:~$ aqt install-qt all_os wasm 6.8.0 wasm_singlethread -m qtcharts qtquick3d --autodesktop
INFO : aqtinstall(aqt) v0.1.dev1895 on Python 3.12.7 [CPython GCC 14.2.1 20240910]
INFO : You are installing the Qt6-WASM version of Qt
INFO : Downloading qtsvg...
INFO : Finished installation of qtbase-Windows-Windows_10_22H2-Clang-Windows-WebAssembly-X86_64.7z in 1.47429098
INFO : Downloading qtdeclarative...
...
INFO : Finished installation of qttranslations-Windows-Windows_10_22H2-Clang-Windows-WebAssembly-X86_64.7z in 29.81369975
INFO : Patching /home/kidev/Work/perso/github/aqtinstall/6.8.0/wasm_singlethread/bin/qmake
...
INFO :
INFO : Autodesktop will now install linux desktop 6.8.0 linux_gcc_64 as required by Qt6-WASM
INFO : aqtinstall(aqt) v0.1.dev1895 on Python 3.12.7 [CPython GCC 14.2.1 20240910]
INFO : Found extension qtwebengine
INFO : Found extension qtpdf
INFO : Downloading qtsvg...
...
INFO : Finished installation of qtsvg-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z in 0.55990804
INFO : Finished installation of qtcharts-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z in 0.62825039
INFO : Finished installation of icu-linux-Rhel8.6-x86_64.7z in 0.91268714
INFO : Finished installation of qtdeclarative-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z in 7.66840250
INFO : Patching /home/kidev/Work/perso/github/aqtinstall/6.8.0/gcc_64/bin/qmake
/Work/perso/github/aqtinstall/6.8.0/gcc_64/lib/libQt6QuickWidgets.prl
...
INFO : Finished installation
INFO : Time elapsed: 9.64619071 second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requested changes made, added requested tests, all checks and tests pass
Hi @Kidev . Thanks for your work! I'm currently testing your PR. Everything is going great except I cannot figure out how to install WASM now for Qt 6.6 and lower? When I'm running the command from the doc |
Hm weird, nice catch, I'm going to check and fix that this week probably. It should still work to install it the old way though since there are tests passing on old wasm version iirc Edit: |
Dear @Kidev and @vkuznetsovgn The code quality looks good for merge, and there is also good coverage.
Actually there are three WASM related folders on download.qt.io site.
It is why main branch report three. I think it is not a problem the WASM branch, here, report only
|
There is indeed an issue with versions 6.5.x and 6.6.x not reporting wasm_* in desktop while fetching archs. I located the issue and I'm fixing it. It is indeed just an issue on the list-qt. About the fact that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed list-qt
issues for WASM on versions 6.5.x and 6.6.x, and added comment in the CI settings ini file to make it clear why it is a third party mirror that is used
I would like to merge it as squashed commit. |
Great appreciation for the hard work @Kidev !! |
Happy to help on such a nice and useful tool ! :) |
Description
install-qt
Qt WASM packages for Qt versions 6.7.0 and abovelist-qt
for Qt WASM packages for Qt versions 6.7.0 and aboveget_semantic_version
, WASM Qt 6.7.3+ and Qt 6.8.0+help
commands to match the latest versionNote
For those using jurplel/install-qt-action, until the current PR and this PR are merged, you can use my Action on the market here, and you can use my aqtinstall fork by using the following configuration directly as is:
You can check the successful deploy with Qt WASM 6.8.1 on a project of mine here that is using this config
Once the PRs are merged, you'll be able to use the official one:
Fix #779 fix #774 and more