Skip to content
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

Merged
merged 55 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
de06f45
Rewrite WASM support
Kidev Dec 15, 2024
7ec6970
Add WASM tests to CI, update CI to test more the latest versions, add…
Kidev Dec 15, 2024
1df829a
Fix some mistakes, typos, moved emsdk version function into BuildJob
Kidev Dec 15, 2024
cacabe8
Fix issue related to extensions interfering with wasm on 6.8+
Kidev Dec 15, 2024
11470f9
Fix tests
Kidev Dec 16, 2024
73bc8ad
Remove dep on Version in CI
Kidev Dec 16, 2024
77dff51
Remove safety before patch
Kidev Dec 16, 2024
5d80b7c
handle cases where extensions don't exist.
tsteven4 Dec 14, 2024
001bbc8
for --long-modules assume extension doesn't exist on download error.
tsteven4 Dec 15, 2024
4408ba6
for --modules assume extension doesn't exist for download failures.
tsteven4 Dec 15, 2024
c6955a6
reformat with black
tsteven4 Dec 15, 2024
dfc1d97
fix flake8 regression that doesn't occur locally.
tsteven4 Dec 15, 2024
c8ec8b8
Merge branch 'master_upstream' into wasm
Kidev Dec 16, 2024
44c7762
Fix autodesktop by also updating the OS when searching for a valid de…
Kidev Dec 16, 2024
c40af54
Fix extension issue, reduce the possible retry for getting extensions…
Kidev Dec 17, 2024
0008f42
Fix CI asking for msvc2019 on 6.8+ but its no longer supported
Kidev Dec 17, 2024
592f875
Make CI use C++20 and MSVC2022
Kidev Dec 17, 2024
3f108bc
Fix linux build
Kidev Dec 17, 2024
1aa5216
Update runners to windows-2022
jdpurcell Dec 17, 2024
6e785f0
Fix patching
jdpurcell Dec 18, 2024
356a2b8
Add back the semantic version changes to prevent crashes, add tests f…
Kidev Dec 18, 2024
bbaa833
Update checks
Kidev Dec 19, 2024
29358b1
Cast 'https://mirrors.ustc.edu.cn' to the shadow realm
Kidev Dec 19, 2024
1a52e5f
Again
Kidev Dec 19, 2024
7f695c4
Update settings.ini
Kidev Dec 19, 2024
07ff4ce
Update settings.ini
Kidev Dec 19, 2024
b92d40f
Update settings.ini
Kidev Dec 19, 2024
2c7ba14
Remove one_rep on silent
Kidev Dec 19, 2024
b734cdd
Update settings.ini
Kidev Dec 19, 2024
7a2a41b
Restore master settings, remove hash check
Kidev Dec 19, 2024
2288b1d
ci: Use specific mirror
jdpurcell Dec 19, 2024
3568115
Re enable hash checking
Kidev Dec 20, 2024
7cde90d
Treat read timeout error during download as connection error
jdpurcell Dec 20, 2024
de6e325
Merge branch 'master' into wasm
Kidev Dec 21, 2024
bbd31a9
Add test for modules in WASM with autodesktop
Kidev Dec 20, 2024
2e8abc2
Fix format
Kidev Dec 20, 2024
f014c69
Fix test
Kidev Dec 20, 2024
06a5098
Make '--autodesktop' trigger its own install process, and test it
Kidev Dec 21, 2024
aad5871
Fix older autodesktop tests
Kidev Dec 21, 2024
37ae2fa
Add mock update files for 680 wasm, add test for wasm 680 autodesktop
Kidev Dec 21, 2024
44f1a90
Passes the additional tests
Kidev Dec 21, 2024
84fad94
Fix format
Kidev Dec 21, 2024
f9f1417
Improve coverage, fix format
Kidev Dec 22, 2024
93f05d0
Fix tests and improve logging or install
Kidev Dec 24, 2024
b14f120
Fix format
Kidev Dec 24, 2024
0cd24a0
Merge branch 'master' into wasm
Kidev Dec 24, 2024
c9451c3
Fix regression in other tests
Kidev Dec 24, 2024
4dbb72f
Use flavor
Kidev Dec 24, 2024
eca7ef6
Fix line len
Kidev Dec 25, 2024
a46f3a7
Fix codeql
Kidev Dec 25, 2024
9078341
Fix list-qt for WASM arch on 6.5.x and 6.6.x, restore to original dow…
Kidev Jan 5, 2025
0343d61
Merge branch 'master' into wasm
Kidev Jan 5, 2025
a5a075b
Fix test error
Kidev Jan 5, 2025
08328f2
Revert ci settings URL as it is never used by clients, only in CI
Kidev Jan 5, 2025
3987df3
Add comment for clarity in ci/settings.ini
Kidev Jan 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 19 additions & 21 deletions aqt/archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,7 @@ def _get_list(self, item: Optional[Element]) -> Iterable[str]:
return []

def _get_boolean(self, item) -> bool:
if "true" == item:
return True
else:
return False
return bool("true" == item)


class QtArchives:
Expand Down Expand Up @@ -368,20 +365,33 @@ def _module_name_suffix(self, module: str) -> str:
return f"{module}.{self.arch}"

def _target_packages(self) -> ModuleToPackage:
"""Build mapping between module names and their possible package names"""
if self.all_extra:
return ModuleToPackage({})

base_package = {self._base_module_name(): list(self._base_package_names())}
target_packages = ModuleToPackage(base_package if self.is_include_base_package else {})

for module in self.mod_list:
suffix = self._module_name_suffix(module)
prefix = "qt.qt{}.{}.".format(self.version.major, self._version_str())
basic_prefix = "qt.{}.".format(self._version_str())

# All possible package name formats
package_names = [
f"qt.qt{self.version.major}.{self._version_str()}.{suffix}",
f"qt.{self._version_str()}.{suffix}",
f"{prefix}{suffix}",
f"{basic_prefix}{suffix}",
f"{prefix}addons.{suffix}",
f"{basic_prefix}addons.{suffix}",
f"extensions.{module}.{self._version_str()}.{self.arch}",
f"{prefix}{module}.{self.arch}", # Qt6.8+ format
f"{basic_prefix}{module}.{self.arch}", # Qt6.8+ format
f"{prefix}addons.{module}.{self.arch}", # Qt6.8+ addons format
f"{basic_prefix}addons.{module}.{self.arch}", # Qt6.8+ addons format
]
if not module.startswith("addons."):
package_names.append(f"qt.qt{self.version.major}.{self._version_str()}.addons.{suffix}")
target_packages.add(module, package_names)

target_packages.add(module, list(set(package_names))) # Remove duplicates

return target_packages

def _get_archives(self):
Expand All @@ -394,18 +404,6 @@ def _get_archives(self):
name = f"qt{self.version.major}_{self._version_str()}{self._arch_ext()}"
self._get_archives_base(name, self._target_packages())

def _append_depends_tool(self, arch, tool_name):
os_target_folder = posixpath.join(
"online/qtsdkrepository",
self.os_name + ("_x86" if self.os_name == "windows" else ("" if self.os_name == "linux_arm64" else "_x64")),
self.target,
tool_name,
)
update_xml_url = posixpath.join(os_target_folder, "Updates.xml")
update_xml_text = self._download_update_xml(update_xml_url)
update_xml = Updates.fromstring(self.base, update_xml_text)
self._append_tool_update(os_target_folder, update_xml, arch, None)

def _get_archives_base(self, name, target_packages):
os_name = self.os_name
if self.target == "android" and self.version >= Version("6.7.0"):
Expand Down
2 changes: 2 additions & 0 deletions aqt/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def downloadBinaryFile(url: str, out: Path, hash_algo: str, exp: Optional[bytes]
fd.write(chunk)
hash.update(chunk)
fd.flush()
except requests.exceptions.ReadTimeout as e:
raise ArchiveConnectionError(f"Read timeout: {e.args}") from e
except Exception as e:
raise ArchiveDownloadError(f"Download of {filename} has error: {e}") from e
if exp is not None and hash.digest() != exp:
Expand Down
Loading
Loading