Skip to content

Conversation

@tomerd
Copy link
Contributor

@tomerd tomerd commented Feb 7, 2023

motivation: progress on registry publishing implementationn

changes:

  • implement compression using ZipArchiver
  • implement code flow to archive package for publishing per spec
  • add tests
motivation: progress on registry publishing implementationn changes: * implement compression using ZipArchiver * implement code flow to archive package for publishing per spec * add tests
find_package(dispatch QUIET)
find_package(Foundation QUIET)
find_package(SQLite3 REQUIRED)
find_package(libzip REQUIRED)
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 from zlib, right? I was thinking since we already depend on zlib and have plans to add it to update-checkout-config.json to always build it with the toolchain, maybe we could rely on that one? That's assuming it provides all of the necessary functionality.

}
}

struct Compressor: Cancellable {
Copy link
Contributor

Choose a reason for hiding this comment

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

As it stores references to FileSystem and ThreadSafeBox, this probably has reference semantics and should be a final class.

}
}

struct Validator {
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto for reference semantics

import TSCTestSupport
import XCTest

class ArchiverTests: XCTestCase {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
class ArchiverTests: XCTestCase {
final class ArchiverTests: XCTestCase {
import TSCTestSupport
import XCTest

class LibzipArchiverTests: XCTestCase {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
class LibzipArchiverTests: XCTestCase {
final class LibzipArchiverTests: XCTestCase {
Comment on lines 179 to +180
.systemLibrary(name: "SPMSQLite3", pkgConfig: "sqlite3"),
.systemLibrary(name: "SPMLibzip", pkgConfig: "libzip"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Naming nit: looks like SwiftPM is already an established abbreviation in our codebase and documentation, maybe this could be named SwiftPMLibzip for consistency?

Copy link
Contributor

Choose a reason for hiding this comment

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

There's a lot of "SPM" as well, especially in type names, but I agree that we should clean that up at some point.

@tomerd tomerd self-assigned this Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants