-
Couldn't load subscription status.
- Fork 1.4k
initial implmentation of dependencies coming from registry #3635
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 please smoke test |
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.
Thanks for digging into this, @tomerd. Just a few suggestions to get this aligned with the spec. Once we have this in, I should be able to wire up support with the registry client quickly.
6d77a3c to
713a453
Compare
|
@swift-ci please smoke test |
|
macOS self hosted uses 5.3 which does not support codable synthesis for enums with associated values. checking in with @shahmishal if we can update that to 5.4 |
|
@swift-ci please smoke test |
|
@swift-ci please smoke test |
|
@yim-lee please note this will change the output of |
|
|
||
| case fileSystem(FileSystem) | ||
| case sourceControl(SourceControl) | ||
| case registry(Registry) |
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.
@neonichu @abertelrud are you happy with these modified names? note local -> fileSystem and scm -> sourceControl
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.
The names seem good, and in general, this PR is an improvement. I'm a bit concerned about the absolute path being stored for the path, which isn't easily round-trippable when generating the source for a package manifest, but it looks as if that was already the case. That might be a bug that we have today (I think I've seen the same thing when describing a package, i.e. that the absolute path is emitted rather than the one that had been specified). Since it isn't new in this PR, that can be fixed later.
Currently the generator has minimal usage of |
I'm relying on the output of |
that sounds great! probably material for follow up PR tho? |
|
@shahmishal macOS Platform (self hosted) still on 5.3 causing this PR test failure |
Yes, definitely. Not at all a blocker for this PR or the registry feature generally. |
|
@swift-ci please smoke test |
I agree, that would be fantastic (as follow-on PR). There are some quirks to the |
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.
Thanks for these changes, this looks like good cleanup!
| @available(_PackageDescription, obsoleted: 5.2) | ||
| /// The following example instruct the Swift Package Manager to use version `1.2.3`. | ||
| /// | ||
| /// .package(identity: "scope.name", exact: "1.2.3"), |
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.
Since this is the documentation for the URL version, should the example use URL and not identity?
| @available(_PackageDescription, introduced: 5.2) | ||
| /// The following example instruct the Swift Package Manager to use version `1.2.3`. | ||
| /// | ||
| /// .package(identity: "scope.name", exact: "1.2.3"), |
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.
Same comment about URL and identity.
|
|
||
| case fileSystem(FileSystem) | ||
| case sourceControl(SourceControl) | ||
| case registry(Registry) |
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.
The names seem good, and in general, this PR is an improvement. I'm a bit concerned about the absolute path being stored for the path, which isn't easily round-trippable when generating the source for a package manifest, but it looks as if that was already the case. That might be a bug that we have today (I think I've seen the same thing when describing a package, i.e. that the absolute path is emitted rather than the one that had been specified). Since it isn't new in this PR, that can be fixed later.
motivation: with SE-0292 accepted, we can start implementing the SwiftPM side of it the scope of this work only includes basic infrastrucuture to parse dependencies coming from registry, follow up work is reauired to complete the feature changes: * add manifest support for dependencies coming from registry * add manifest parsing support for dependencies coming from registry * refactor relevant code to support new dependency type * add and adjust tests
* refactor manifet encoding and parsing to more clearly define dependency type and associated metadata * make .upToNextMajor and .upToNextMinor extensions on Range<Version> to reuse across new requirment types * adjust tests
41b4bc0 to
7e7c9ba
Compare
|
@swift-ci please smoke test |
|
@swift-ci please smoke test |
|
This seems to have regressed the Windows build: https://ci-external.swift.org/job/oss-swift-windows-toolchain-x86_64-vs2019/93/consoleText |
The C imports are important, particularly on Windows, where `HANDLE` is not available without the platform SDK (`WinSDK` is roughly synonymous to `Darwin`).
motivation: with SE-0292 accepted, we can start implementing the SwiftPM side of it
the scope of this work only includes infrastructure to parse dependencies coming from registry, significant follow up work is required to complete the feature
changes: