@@ -1158,7 +1158,7 @@ extension Workspace {
1158
1158
1159
1159
// Remove the existing checkout.
1160
1160
do {
1161
- let oldCheckoutPath = self . location. repositoriesCheckoutsDirectory . appending ( dependency. subpath )
1161
+ let oldCheckoutPath = self . location. repositoriesCheckoutSubdirectory ( for : dependency)
1162
1162
try fileSystem. chmod ( . userWritable, path: oldCheckoutPath, options: [ . recursive, . onlyFiles] )
1163
1163
try fileSystem. removeFileTree ( oldCheckoutPath)
1164
1164
}
@@ -1196,7 +1196,7 @@ extension Workspace {
1196
1196
}
1197
1197
1198
1198
// Form the edit working repo path.
1199
- let path = self . location. editsDirectory . appending ( dependency. subpath )
1199
+ let path = self . location. editsSubdirectory ( for : dependency)
1200
1200
// Check for uncommited and unpushed changes if force removal is off.
1201
1201
if !forceRemove {
1202
1202
let workingCopy = try repositoryManager. openWorkingCopy ( at: path)
@@ -1314,7 +1314,7 @@ extension Workspace {
1314
1314
/// Returns all manifests contained in DependencyManifests.
1315
1315
public func allDependencyManifests( ) -> OrderedDictionary < PackageIdentity , Manifest > {
1316
1316
return self . dependencies. reduce ( into: OrderedDictionary < PackageIdentity , Manifest > ( ) ) { partial, item in
1317
- partial [ item. dependency. packageIdentity ] = item. manifest
1317
+ partial [ item. dependency. packageRef . identity ] = item. manifest
1318
1318
}
1319
1319
}
1320
1320
@@ -1350,7 +1350,7 @@ extension Workspace {
1350
1350
func computePackageURLs( ) -> ( required: Set < PackageReference > , missing: Set < PackageReference > ) {
1351
1351
let manifestsMap : [ PackageIdentity : Manifest ] = Dictionary ( uniqueKeysWithValues:
1352
1352
self . root. packages. map { ( $0. key, $0. value. manifest) } +
1353
- self . dependencies. map { ( $0. dependency. packageIdentity , $0. manifest) }
1353
+ self . dependencies. map { ( $0. dependency. packageRef . identity , $0. manifest) }
1354
1354
)
1355
1355
1356
1356
var inputIdentities : Set < PackageReference > = [ ]
@@ -1486,9 +1486,9 @@ extension Workspace {
1486
1486
public func path( to dependency: Workspace . ManagedDependency ) -> AbsolutePath {
1487
1487
switch dependency. state {
1488
1488
case . checkout:
1489
- return self . location. repositoriesCheckoutsDirectory . appending ( dependency. subpath )
1489
+ return self . location. repositoriesCheckoutSubdirectory ( for : dependency)
1490
1490
case . edited( _, let path) :
1491
- return path ?? self . location. editsDirectory . appending ( dependency. subpath )
1491
+ return path ?? self . location. editsSubdirectory ( for : dependency)
1492
1492
case . local:
1493
1493
return AbsolutePath ( dependency. packageRef. location)
1494
1494
}
@@ -3046,7 +3046,7 @@ extension Workspace {
3046
3046
/// Removes the clone and checkout of the provided specifier.
3047
3047
fileprivate func removeRepository( dependency: ManagedDependency ) throws {
3048
3048
// Remove the checkout.
3049
- let dependencyPath = self . location. repositoriesCheckoutsDirectory . appending ( dependency. subpath )
3049
+ let dependencyPath = self . location. repositoriesCheckoutSubdirectory ( for : dependency)
3050
3050
let workingCopy = try self . repositoryManager. openWorkingCopy ( at: dependencyPath)
3051
3051
guard !workingCopy. hasUncommittedChanges ( ) else {
3052
3052
throw WorkspaceDiagnostics . UncommitedChanges ( repositoryPath: dependencyPath)
0 commit comments