@@ -220,6 +220,12 @@ Link: <https://github.com/mona/LinkedList>; rel="canonical",
220
220
Swift Package Manager uses this information
221
221
to reconcile the URL-based dependency declaration with
222
222
the package identifier ` @mona/LinkedList ` .
223
+ Link relation URLs may also be normalized to mitigate insignificant variations.
224
+ For example,
225
+ a package with an [ "scp-style" URL] [ scp-url ] like
226
+ ` [email protected] :mona/LinkedList.git`
227
+ is determined to be equivalent to a URL with an explicit scheme like
228
+ ` ssh:///[email protected] /mona/LinkedList ` .
223
229
224
230
A package identifier serves as the package name
225
231
in target-based dependency declarations —
@@ -237,7 +243,7 @@ that is, the `package` parameter in `.product(name:package)` method calls.
237
243
```
238
244
239
245
Any path-based dependency declaration
240
- or URL-based declaration without a associated package identifier
246
+ or URL-based declaration without an associated package identifier
241
247
will continue to synthesize its identity from
242
248
the last path component of its location.
243
249
@@ -441,7 +447,7 @@ OPTIONS:
441
447
Running this subcommand in the root directory of a package
442
448
creates or updates the ` .swiftpm/config/registries.json ` file
443
449
with a new top-level ` registries ` key
444
- that's associated with an array containing the specified registry URLs.
450
+ that's associated with an object containing the specified registry URLs.
445
451
446
452
For example,
447
453
a build server that doesn't allow external network connections
@@ -906,20 +912,6 @@ of authenticity and non-repudiation beyond what's possible with checksums alone.
906
912
Defining a standard interface for package registries
907
913
lays the groundwork for several useful features.
908
914
909
- ### Package dependency URL normalization
910
-
911
- As described in [ "Module name collision resolution"] ( #module-name-collision-resolution )
912
- Swift Package Manager cannot build a project
913
- if two or more packages in the project
914
- are located by URLs with the same (case-insensitive) last path component.
915
- Swift Package Manager may improve support URL-based dependencies
916
- by normalizing package URLs to mitigate insignificant variations.
917
- For example,
918
- a package with an [ "scp-style" URL] [ scp-url ] like
919
- ` [email protected] :mona/LinkedList.git`
920
- may be determined to be equivalent to a package with an HTTPS scheme like
921
- ` https:///github.com/mona/LinkedList ` .
922
-
923
915
### Local offline cache
924
916
925
917
Swift Package Manager could implement an [ offline cache]
@@ -928,6 +920,21 @@ While this is technically possible today,
928
920
a package registry makes for a simpler and more secure implementation
929
921
than would otherwise be possible with Git repositories alone.
930
922
923
+ ### Package manifest dependency migration
924
+
925
+ Swift Package Manager could add tooling
926
+ to help package maintainers adopt registry-supported identifiers
927
+ in their projects.
928
+
929
+ ``` terminal
930
+ $ swift package-registry migrate
931
+ ```
932
+
933
+ ``` diff
934
+ - .package(url: "https://github.com/mona/LinkedList", .exact("1.2.0"))
935
+ + .package(id: "@mona/LinkedList", .exact("1.2.0"))
936
+ ```
937
+
931
938
### Package publishing
932
939
933
940
A package registry is responsible for determining
0 commit comments