-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Destinations: use UniversalArchiver in install command
#6392
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
Conversation
|
@swift-ci smoke test |
1 similar comment
|
@swift-ci smoke test |
|
@swift-ci test windows |
| /// Unlike ``AbsolutePath//extension``, this property returns all characters after the first `.` character in a | ||
| /// `````. If no dot character is present in the filename or first dot is the last character, `nil` is returned. | ||
| var allExtensions: String? { | ||
| var allExtensions: [Substring]? { |
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.
I think String is more appropriate here. we can cast.
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.
I thought that holding on to Substring is fine since the original string is present as a property of AbsolutePath anyway, but I don't mind changing to String, which was done in the latest commit
| destinationsDirectory: destinationsDirectory, | ||
| self.fileSystem, | ||
| ZipArchiver(fileSystem: self.fileSystem), | ||
| UniversalArchiver(self.fileSystem, Cancellator(observabilityScope: observabilityScope)), |
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.
ideally you pass an existing cancelator, eg from swiftTool
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.
We don't use SwiftTool in experimental-destination as that pulls in a lot of dependencies that aren't needed in these subcommands, so I hope an ad-hoc executor is fine here?
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.
how do you handle cancelling? swift tool has a signal handling routine that then calls the cancellator. ie what happens when users ctrl+c during an install / download sequence?
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.
ah, I thought Cancellator supported it out of the box. Will have a closer look
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.
|
@swift-ci smoke test |
|
@swift-ci test windows |
|
@swift-ci smoke test macos |
1ae861c to
e33a167
Compare
|
@swift-ci smoke test |
|
@swift-ci test windows |
1 similar comment
|
@swift-ci test windows |
|
@swift-ci smoke test |
|
@swift-ci test windows |
1 similar comment
|
@swift-ci test windows |
|
@swift-ci smoke test |
|
@swift-ci test windows |
1 similar comment
|
@swift-ci test windows |
|
@swift-ci smoke test macos |
Fixes
.tar.gzarchives support inexperimental-destination installsubcommand.Tweaks multi-component extensions calculation so that at most last 2 components are taken into consideration. This fixes an issue with bundle names that have dots. For example, for
5.7.3-RELEASE_ubuntu_22.04_aarch64.tar.gzpreviouslyallExtensionsreturned7.3-RELEASE_ubuntu_22.04_aarch64.tar.gz, and that didn't match any of the archivers, even though the actual extension was valid.rdar://107485048