-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(swiftpm): Support lockfile format version 3
The lockfile format version 2 and 3 are quite similar, so that the same parsing logic can be used. Note that the updated `Package.resolved` files have been manually created, as XCode wasn't available. Signed-off-by: Frank Viernau <[email protected]>
- Loading branch information
Showing
6 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,34 @@ project: | |
revision: "<REPLACE_REVISION>" | ||
path: "<REPLACE_PATH>" | ||
homepage_url: "" | ||
scopes: [] | ||
packages: [] | ||
issues: | ||
- timestamp: "1970-01-01T00:00:00Z" | ||
source: "SwiftPM" | ||
message: "Could not parse lockfile '<REPLACE_ABSOLUTE_DEFINITION_FILE_PATH>'.\ | ||
\ Unknown file format version '3'." | ||
severity: "ERROR" | ||
scopes: | ||
- name: "dependencies" | ||
dependencies: | ||
- id: "Swift::github.com/alamofire/alamofire:5.4.4" | ||
packages: | ||
- id: "Swift::github.com/alamofire/alamofire:5.4.4" | ||
purl: "pkg:swift/github.com%2Falamofire%[email protected]" | ||
declared_licenses: [] | ||
declared_licenses_processed: {} | ||
description: "" | ||
homepage_url: "" | ||
binary_artifact: | ||
url: "" | ||
hash: | ||
value: "" | ||
algorithm: "" | ||
source_artifact: | ||
url: "" | ||
hash: | ||
value: "" | ||
algorithm: "" | ||
vcs: | ||
type: "Git" | ||
url: "https://github.com/Alamofire/Alamofire.git" | ||
revision: "d120af1e8638c7da36c8481fd61a66c0c08dc4fc" | ||
path: "" | ||
vcs_processed: | ||
type: "Git" | ||
url: "https://github.com/Alamofire/Alamofire.git" | ||
revision: "d120af1e8638c7da36c8481fd61a66c0c08dc4fc" | ||
path: "" |
25 changes: 25 additions & 0 deletions
25
...nagers/swiftpm/src/funTest/assets/projects/synthetic/expected-output-only-lockfile-v4.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
project: | ||
id: "SwiftPM::src/funTest/assets/projects/synthetic/only-lockfile-v4/Package.resolved:<REPLACE_REVISION>" | ||
definition_file_path: "<REPLACE_DEFINITION_FILE_PATH>" | ||
declared_licenses: [] | ||
declared_licenses_processed: {} | ||
vcs: | ||
type: "" | ||
url: "" | ||
revision: "" | ||
path: "" | ||
vcs_processed: | ||
type: "Git" | ||
url: "<REPLACE_URL_PROCESSED>" | ||
revision: "<REPLACE_REVISION>" | ||
path: "<REPLACE_PATH>" | ||
homepage_url: "" | ||
scopes: [] | ||
packages: [] | ||
issues: | ||
- timestamp: "1970-01-01T00:00:00Z" | ||
source: "SwiftPM" | ||
message: "Could not parse lockfile '<REPLACE_ABSOLUTE_DEFINITION_FILE_PATH>'.\ | ||
\ Unknown file format version '4'." | ||
severity: "ERROR" |
15 changes: 13 additions & 2 deletions
15
...-managers/swiftpm/src/funTest/assets/projects/synthetic/only-lockfile-v3/Package.resolved
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
{ | ||
"version": 3 | ||
} | ||
"pins" : [ | ||
{ | ||
"identity" : "alamofire", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/Alamofire/Alamofire.git", | ||
"state" : { | ||
"revision" : "d120af1e8638c7da36c8481fd61a66c0c08dc4fc", | ||
"version" : "5.4.4" | ||
} | ||
} | ||
], | ||
"version" : 3 | ||
} |
3 changes: 3 additions & 0 deletions
3
...-managers/swiftpm/src/funTest/assets/projects/synthetic/only-lockfile-v4/Package.resolved
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"version" : 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters