Skip to content

[WIP] registry publish api with libzip #6125

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
@@ -59,6 +59,7 @@ endif()
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants