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 31 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
81 changes: 63 additions & 18 deletions aqt/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ def run_install_qt(self, args: InstallArgParser):
self.show_aqt_version()
target: str = args.target
os_name: str = args.host
effective_os_name: str = Cli._get_effective_os_name(os_name)
qt_version_or_spec: str = getattr(args, "qt_version", getattr(args, "qt_version_spec", ""))
arch: str = self._set_arch(args.arch, os_name, target, qt_version_or_spec)
keep: bool = args.keep or Settings.always_keep_archives
Expand Down Expand Up @@ -366,7 +367,14 @@ def run_install_qt(self, args: InstallArgParser):

def get_auto_desktop_archives() -> List[QtPackage]:
def to_archives(baseurl: str) -> QtArchives:
return QtArchives(os_name, "desktop", qt_version, cast(str, autodesk_arch), base=baseurl, timeout=timeout)
return QtArchives(
effective_os_name,
"desktop",
qt_version,
cast(str, autodesk_arch),
base=baseurl,
timeout=timeout,
)

if autodesk_arch is not None:
return cast(QtArchives, retry_on_bad_connection(to_archives, base)).archives
Expand Down Expand Up @@ -394,14 +402,15 @@ def to_archives(baseurl: str) -> QtArchives:
)
qt_archives.archives.extend(auto_desktop_archives)
target_config = qt_archives.get_target_config()
target_config.os_name = effective_os_name
with TemporaryDirectory() as temp_dir:
_archive_dest = Cli.choose_archive_dest(archive_dest, keep, temp_dir)
run_installer(qt_archives.get_packages(), base_dir, sevenzip, keep, _archive_dest)

if not nopatch:
Updater.update(target_config, base_path, expect_desktop_archdir)
if autodesk_arch is not None:
d_target_config = TargetConfig(str(_version), "desktop", autodesk_arch, os_name)
d_target_config = TargetConfig(str(_version), "desktop", autodesk_arch, effective_os_name)
Updater.update(d_target_config, base_path, expect_desktop_archdir)
self.logger.info("Finished installation")
self.logger.info("Time elapsed: {time:.8f} second".format(time=time.perf_counter() - start_time))
Expand Down Expand Up @@ -647,8 +656,17 @@ def show_aqt_version(self, args=None):

def _set_install_qt_parser(self, install_qt_parser):
install_qt_parser.set_defaults(func=self.run_install_qt)
self._set_common_arguments(install_qt_parser)
self._set_common_options(install_qt_parser)
install_qt_parser.add_argument(
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64", "all_os"], help="host os name"
)
install_qt_parser.add_argument(
"target", choices=["desktop", "winrt", "android", "ios", "wasm", "qt"], help="Target SDK"
)
install_qt_parser.add_argument(
"qt_version_spec",
metavar="(VERSION | SPECIFICATION)",
help='Qt version in the format of "5.X.Y" or SimpleSpec like "5.X" or "<6.X"',
)
install_qt_parser.add_argument(
"arch",
nargs="?",
Expand All @@ -668,8 +686,10 @@ def _set_install_qt_parser(self, install_qt_parser):
"\n win64_msvc2017_winrt_armv7"
"\nandroid: Qt 5.14: android (optional)"
"\n Qt 5.13 or below: android_x86_64, android_arm64_v8a"
"\n android_x86, android_armv7",
"\n android_x86, android_armv7"
"\nall_os/wasm: wasm_singlethread, wasm_multithread",
)
self._set_common_options(install_qt_parser)
self._set_module_options(install_qt_parser)
self._set_archive_options(install_qt_parser)
install_qt_parser.add_argument(
Expand All @@ -688,12 +708,12 @@ def _set_install_qt_parser(self, install_qt_parser):
def _set_install_tool_parser(self, install_tool_parser):
install_tool_parser.set_defaults(func=self.run_install_tool)
install_tool_parser.add_argument(
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name"
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64", "all_os"], help="host os name"
)
install_tool_parser.add_argument(
"target",
default=None,
choices=["desktop", "winrt", "android", "ios"],
choices=["desktop", "winrt", "android", "ios", "wasm", "qt"],
help="Target SDK.",
)
install_tool_parser.add_argument("tool_name", help="Name of tool such as tools_ifw, tools_mingw")
Expand Down Expand Up @@ -741,7 +761,7 @@ def make_parser_sde(cmd: str, desc: str, action, is_add_kde: bool, is_add_module
def make_parser_list_sde(cmd: str, desc: str, cmd_type: str):
parser = subparsers.add_parser(cmd, description=desc)
parser.add_argument(
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name"
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64", "all_os"], help="host os name"
)
parser.add_argument(
"qt_version_spec",
Expand Down Expand Up @@ -782,16 +802,17 @@ def _make_list_qt_parser(self, subparsers: argparse._SubParsersAction):
"$ aqt list-qt mac desktop --arch 5.9.9 # print architectures for 5.9.9/mac/desktop\n"
"$ aqt list-qt mac desktop --arch latest # print architectures for the latest Qt 5\n"
"$ aqt list-qt mac desktop --archives 5.9.0 clang_64 # list archives in base Qt installation\n"
"$ aqt list-qt mac desktop --archives 5.14.0 clang_64 debug_info # list archives in debug_info module\n",
"$ aqt list-qt mac desktop --archives 5.14.0 clang_64 debug_info # list archives in debug_info module\n"
"$ aqt list-qt all_os wasm --arch 6.8.1 # print architectures for Qt WASM 6.8.1\n",
)
list_parser.add_argument(
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name"
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64", "all_os"], help="host os name"
)
list_parser.add_argument(
"target",
nargs="?",
default=None,
choices=["desktop", "winrt", "android", "ios"],
choices=["desktop", "winrt", "android", "ios", "wasm", "qt"],
help="Target SDK. When omitted, this prints all the targets available for a host OS.",
)
list_parser.add_argument(
Expand Down Expand Up @@ -871,13 +892,13 @@ def _make_list_tool_parser(self, subparsers: argparse._SubParsersAction):
"$ aqt list-tool mac desktop ifw --long # print tool variant names with metadata for QtIFW\n",
)
list_parser.add_argument(
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name"
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64", "all_os"], help="host os name"
)
list_parser.add_argument(
"target",
nargs="?",
default=None,
choices=["desktop", "winrt", "android", "ios"],
choices=["desktop", "winrt", "android", "ios", "wasm", "qt"],
help="Target SDK. When omitted, this prints all the targets available for a host OS.",
)
list_parser.add_argument(
Expand Down Expand Up @@ -956,18 +977,18 @@ def _set_common_arguments(self, subparser, *, is_target_deprecated: bool = False
install-src/doc/example commands do not require a "target" argument anymore, as of 11/22/2021
"""
subparser.add_argument(
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name"
"host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64", "all_os"], help="host os name"
)
if is_target_deprecated:
subparser.add_argument(
"target",
choices=["desktop", "winrt", "android", "ios"],
choices=["desktop", "winrt", "android", "ios", "wasm", "qt"],
nargs="?",
help="Ignored. This parameter is deprecated and marked for removal in a future release. "
"It is present here for backwards compatibility.",
)
else:
subparser.add_argument("target", choices=["desktop", "winrt", "android", "ios"], help="target sdk")
subparser.add_argument("target", choices=["desktop", "winrt", "android", "ios", "wasm", "qt"], help="target sdk")
subparser.add_argument(
"qt_version_spec",
metavar="(VERSION | SPECIFICATION)",
Expand Down Expand Up @@ -1026,18 +1047,30 @@ def _get_autodesktop_dir_and_arch(
host == "windows" and target == "desktop" and is_msvc and arch.endswith(("arm64", "arm64_cross_compiled"))
)
if version < Version("6.0.0") or (
target not in ["ios", "android"] and not is_wasm and not is_win_desktop_msvc_arm64
target not in ["ios", "android", "wasm"] and not is_wasm and not is_win_desktop_msvc_arm64
):
# We only need to worry about the desktop directory for Qt6 mobile or wasm installs.
return None, None

# For WASM installations on all_os, we need to choose a default desktop host
host = Cli._get_effective_os_name(host)

installed_desktop_arch_dir = QtRepoProperty.find_installed_desktop_qt_dir(host, base_path, version, is_msvc=is_msvc)
if installed_desktop_arch_dir:
# An acceptable desktop Qt is already installed, so don't do anything.
self.logger.info(f"Found installed {host}-desktop Qt at {installed_desktop_arch_dir}")
return installed_desktop_arch_dir.name, None

default_desktop_arch = MetadataFactory(ArchiveId("qt", host, "desktop")).fetch_default_desktop_arch(version, is_msvc)
try:
default_desktop_arch = MetadataFactory(ArchiveId("qt", host, "desktop")).fetch_default_desktop_arch(
version, is_msvc
)
except ValueError as e:
if "Target 'desktop' is invalid" in str(e):
# Special case for all_os host which doesn't support desktop target
return None, None
raise

desktop_arch_dir = QtRepoProperty.get_arch_dir_name(host, default_desktop_arch, version)
expected_desktop_arch_path = base_path / dir_for_version(version) / desktop_arch_dir

Expand All @@ -1047,6 +1080,7 @@ def _get_autodesktop_dir_and_arch(
qt_type = "Qt6-WASM"
else:
qt_type = target

if should_autoinstall:
# No desktop Qt is installed, but the user has requested installation. Find out what to install.
self.logger.info(
Expand All @@ -1062,6 +1096,17 @@ def _get_autodesktop_dir_and_arch(
)
return expected_desktop_arch_path.name, None

@staticmethod
def _get_effective_os_name(host: str) -> str:
if host != "all_os":
return host
elif sys.platform.startswith("linux"):
return "linux"
elif sys.platform == "darwin":
return "mac"
else:
return "windows"


def is_64bit() -> bool:
"""check if running platform is 64bit python."""
Expand Down
100 changes: 78 additions & 22 deletions aqt/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,22 +185,58 @@ def get_semantic_version(qt_ver: str, is_preview: bool) -> Optional[Version]:
and patch gets all the rest.
As of May 2021, the version strings at https://download.qt.io/online/qtsdkrepository
conform to this pattern; they are not guaranteed to do so in the future.
As of December 2024, it can handle version strings like 6_7_3 as well.
"""
if not qt_ver or any(not ch.isdigit() for ch in qt_ver):
if not qt_ver:
return None

# Handle versions with underscores (new format)
if "_" in qt_ver:
parts = qt_ver.split("_")
if not (2 <= len(parts) <= 3):
return None

try:
version_parts = [int(p) for p in parts]
except ValueError:
return None

major, minor = version_parts[:2]
patch = version_parts[2] if len(version_parts) > 2 else 0

if is_preview:
minor_patch_combined = int(f"{minor}{patch}") if patch > 0 else minor
return Version(
major=major,
minor=minor_patch_combined,
patch=0,
prerelease=("preview",),
)

return Version(
major=major,
minor=minor,
patch=patch,
)

# Handle traditional format (continuous digits)
if not qt_ver.isdigit():
return None

if is_preview:
return Version(
major=int(qt_ver[:1]),
major=int(qt_ver[0]),
minor=int(qt_ver[1:]),
patch=0,
prerelease=("preview",),
)
elif len(qt_ver) >= 4:
return Version(major=int(qt_ver[:1]), minor=int(qt_ver[1:3]), patch=int(qt_ver[3:]))
return Version(major=int(qt_ver[0]), minor=int(qt_ver[1:3]), patch=int(qt_ver[3:]))
elif len(qt_ver) == 3:
return Version(major=int(qt_ver[:1]), minor=int(qt_ver[1:2]), patch=int(qt_ver[2:]))
return Version(major=int(qt_ver[0]), minor=int(qt_ver[1]), patch=int(qt_ver[2]))
elif len(qt_ver) == 2:
return Version(major=int(qt_ver[:1]), minor=int(qt_ver[1:2]), patch=0)
return Version(major=int(qt_ver[0]), minor=int(qt_ver[1]), patch=0)

Copy link
Contributor Author

@Kidev Kidev Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes of lines 234-238 are purely clarity related. They are equivalent but easier to read. For the line 236, it may appear that qt_ver[2:] is not equal to qt_ver[2], but it is since in this branch we know that len(qt_ver) == 3.

raise ValueError("Invalid version string '{}'".format(qt_ver))


Expand All @@ -213,10 +249,15 @@ class ArchiveId:
"mac": ["android", "desktop", "ios"],
"linux": ["android", "desktop"],
"linux_arm64": ["desktop"],
"all_os": ["qt"],
"all_os": ["wasm", "qt"],
}
EXTENSIONS_REQUIRED_ANDROID_QT6 = {"x86_64", "x86", "armv7", "arm64_v8a"}
ALL_EXTENSIONS = {"", "wasm", "src_doc_examples", *EXTENSIONS_REQUIRED_ANDROID_QT6}
ALL_EXTENSIONS = {
"",
"wasm",
"src_doc_examples",
*EXTENSIONS_REQUIRED_ANDROID_QT6,
}

def __init__(self, category: str, host: str, target: str):
if category not in ArchiveId.CATEGORIES:
Expand All @@ -239,6 +280,8 @@ def is_tools(self) -> bool:
return self.category == "tools"

def to_os_arch(self) -> str:
if self.host == "all_os":
return "all_os"
return "{os}{arch}".format(
os=self.host,
arch=(
Expand All @@ -256,6 +299,7 @@ def to_extension_folder(self, module, version, arch) -> str:
extarch = "x86_64"
elif self.host == "linux_arm64":
extarch = "arm64"

return "online/qtsdkrepository/{osarch}/extensions/{ext}/{ver}/{extarch}/".format(
osarch=self.to_os_arch(),
ext=module,
Expand All @@ -276,25 +320,33 @@ def to_url(self) -> str:

def to_folder(self, version: Version, qt_version_no_dots: str, extension: Optional[str] = None) -> str:
if version >= Version("6.8.0"):
return "{category}{major}_{ver}/{category}{major}_{ver}{ext}".format(
category=self.category,
major=qt_version_no_dots[0],
ver=qt_version_no_dots,
ext="_" + extension if extension else "",
)
else:
return "{category}{major}_{ver}{ext}".format(
category=self.category,
major=qt_version_no_dots[0],
ver=qt_version_no_dots,
ext="_" + extension if extension else "",
)
if self.target == "wasm":
# Qt 6.8+ WASM uses a split folder structure
folder = f"qt{version.major}_{qt_version_no_dots}"
if extension:
folder = f"{folder}/{folder}_{extension}"
return folder
else:
base = f"qt{version.major}_{qt_version_no_dots}"
return f"{base}/{base}"
Comment on lines +338 to +340
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is different than previous code. Your code

  1. doesn't use category
  2. doesn't use extension
    I can't find any instance in the sdk repo where something other than "qt" would work for category. I am not as confident about extension, but I can't cite an example of this causing a failure.
    In any event this bit will have to change to get src/doc/examples working (as in fix source/doc/examples with qstkdrepo changes. #857)

elif version >= Version("6.5.0") and self.target == "wasm":
# Qt 6.5-6.7 WASM uses direct wasm_[single|multi]thread folder
if extension:
return f"qt{version.major}_{qt_version_no_dots}_{extension}"
return f"qt{version.major}_{qt_version_no_dots}"
# Pre-6.8 structure for non-WASM or pre-6.5 structure
return "{category}{major}_{ver}{ext}".format(
category=self.category,
Comment on lines +348 to +349
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The category handling is a bit different for >= 6.8.0 non-wasm, category is now assumed to be qt in that case. category is either tools or qt. Is there any case where the directory component is tools{major}_{ver}{ext}, either before or after 6.8.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This return is there for the legacy versions. For Qt 6.8 non-WASM, this is returned:

base = f"qt{version.major}_{qt_version_no_dots}"
return f"{base}/{base}"

All tests pass with this to_folder, older and newer versions of Qt, WASM of not

major=qt_version_no_dots[0],
ver=qt_version_no_dots,
ext="_" + extension if extension else "",
)

def all_extensions(self, version: Version) -> List[str]:
if self.target == "desktop" and QtRepoProperty.is_in_wasm_range(self.host, version):
return ["", "wasm"]
elif self.target == "desktop" and QtRepoProperty.is_in_wasm_threaded_range(version):
return ["", "wasm_singlethread", "wasm_multithread"]
elif self.target == "wasm" and QtRepoProperty.is_in_wasm_threaded_range(version):
return ["wasm_singlethread", "wasm_multithread"]
elif self.target == "android" and version >= Version("6.0.0"):
return list(ArchiveId.EXTENSIONS_REQUIRED_ANDROID_QT6)
else:
Expand Down Expand Up @@ -419,6 +471,10 @@ def dir_for_version(ver: Version) -> str:

@staticmethod
def get_arch_dir_name(host: str, arch: str, version: Version) -> str:
"""
Determines the architecture directory name based on host, architecture and version.
Special handling is done for mingw, MSVC and various platform-specific cases.
"""
if arch.startswith("win64_mingw"):
return arch[6:] + "_64"
elif arch.startswith("win64_llvm"):
Expand Down
2 changes: 1 addition & 1 deletion aqt/settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ retry_backoff: 0.1
max_retries_on_checksum_error: 5
max_retries_to_retrieve_hash: 5
hash_algorithm: sha256
INSECURE_NOT_FOR_PRODUCTION_ignore_hash: False
INSECURE_NOT_FOR_PRODUCTION_ignore_hash: True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kidev You accidentally changed this in 7a2a41b. Also maybe worth cleaning up the commits from earlier so it doesn't clutter the history. Let me show you something, maybe it's obvious, but I didn't know GitHub Desktop had a "Reorder Commit" feature until just recently. I find it quite powerful because it's kind of an alternate way to interactive rebase, when used in combination with squash. To be honest I've never figured out how to do a real interactive rebase, I used to get so annoyed with it I would just hard reset back to some point and then cherry-pick back in and amend stuff as I go 🤣. I was amazed when I figured out the reorder/squash trick.

Screen.Recording.2024-12-19.at.11.11.58.PM.mov

Copy link
Contributor Author

@Kidev Kidev Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually don't squash in PR because I either squash merge, so it's squashed later and the branch keeps all history during the PR which is always nice, or I merge without rebase, so the history of main is not cluttered either. And I reset when I want to trash the latest commits quickly and I'm alone on the branch

I do everything using the CLI though, I'm used to it. git rebase -i is much easier than it looks:
output

You even have all the commands to use when you enter the interactive mode:

# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup [-C | -c] <commit> = like "squash" but keep only the previous
#                    commit's log message, unless -C is used, in which case
#                    keep only this commit's message; -c is same as -C but
#                    opens the editor
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
#         create a merge commit using the original merge commit's
#         message (or the oneline, if no original merge commit was
#         specified); use -c <commit> to reword the commit message
# u, update-ref <ref> = track a placeholder for the <ref> to be updated
#                       to this position in the new commits. The <ref> is
#                       updated at the end of the rebase
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#

You can do everything you want with that. Change the order of commits, change past commits...


[mirrors]
trusted_mirrors:
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- job: Windows
dependsOn: MatricesGenerator
pool:
vmImage: 'windows-2019'
vmImage: 'windows-2022'
strategy:
matrix: $[ dependencies.MatricesGenerator.outputs['mtrx.windows'] ]
variables:
Expand Down
Loading