-
Notifications
You must be signed in to change notification settings - Fork 311
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
SwiftPM: Implement support for local
dependencies
#8267
base: main
Are you sure you want to change the base?
Conversation
Reduce the diff of a following change (which will re-generate the lockfile as well). Signed-off-by: Frank Viernau <[email protected]>
Prepare for adding a `local` dependency, which requires tooling version 5.7. As that tooling version starts to fail with an error when library projects contain `main.swift` files, simpliy rename these files. Signed-off-by: Frank Viernau <[email protected]>
Add a synthetic package with one dependency and make it a `local` dependency of the `project-with-localfile`. SwiftPM does not add an entry for the local dependency to the lockfile, which is why the functions which map from `PinV2` to ORT's model are not updated. Signed-off-by: Frank Viernau <[email protected]>
local
dependencies
@@ -0,0 +1,20 @@ | |||
// swift-tools-version:5.7 |
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.
Commit message: project-with-localfile
-> project-with-lockfile
?
@@ -78,8 +78,8 @@ | |||
"repositoryURL": "https://github.com/apple/swift-collections.git", | |||
"state": { | |||
"branch": null, | |||
"revision": "d029d9d39c87bed85b1c50adee7c41795261a192", | |||
"version": "1.0.6" | |||
"revision": "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb", |
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.
Hmm. This doesn't really reduce the diff with Package.resolved
from the last commit, as that also seems to "unnested" the whole structure.
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.
It does reduce the diff with the expected output file, which was the intention of this commit.
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 unnesting should have been probably part of the middle commit. I'll check that.
@@ -57,6 +57,9 @@ project: | |||
- id: "Swift::github.com/apple/swift-atomics:1.2.0" | |||
- id: "Swift::github.com/apple/swift-collections:1.1.0" | |||
- id: "Swift::github.com/apple/swift-system:1.2.1" | |||
- id: "Swift::github.com/oss-review-toolkit/ort:690a5087534c202b395d65f3262f52c98251c647" |
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.
Is this a Git commit SHA1 that needs to be "templatized"?
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.
Similar below.
] | ||
}, | ||
"version": 1 | ||
"pins" : [ |
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.
See my comment on the first commit, the diff is still large due to the "unnesting" of "object"
(and different order of pins).
@@ -17,6 +17,8 @@ | |||
* License-Filename: LICENSE | |||
*/ | |||
|
|||
@file:Suppress("TooManyFunctions") |
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.
Nit: Maybe start to move out extension functions to a separate file in a follow-up commit?
See individual commits.
Fixes #8194.