@@ -1158,7 +1158,7 @@ extension Workspace {
11581158
11591159 // Remove the existing checkout.
11601160 do {
1161- let oldCheckoutPath = self . location. repositoriesCheckoutsDirectory . appending ( dependency. subpath )
1161+ let oldCheckoutPath = self . location. repositoriesCheckoutSubdirectory ( for : dependency)
11621162 try fileSystem. chmod ( . userWritable, path: oldCheckoutPath, options: [ . recursive, . onlyFiles] )
11631163 try fileSystem. removeFileTree ( oldCheckoutPath)
11641164 }
@@ -1196,7 +1196,7 @@ extension Workspace {
11961196 }
11971197
11981198 // Form the edit working repo path.
1199- let path = self . location. editsDirectory . appending ( dependency. subpath )
1199+ let path = self . location. editsSubdirectory ( for : dependency)
12001200 // Check for uncommited and unpushed changes if force removal is off.
12011201 if !forceRemove {
12021202 let workingCopy = try repositoryManager. openWorkingCopy ( at: path)
@@ -1314,7 +1314,7 @@ extension Workspace {
13141314 /// Returns all manifests contained in DependencyManifests.
13151315 public func allDependencyManifests( ) -> OrderedDictionary < PackageIdentity , Manifest > {
13161316 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
13181318 }
13191319 }
13201320
@@ -1350,7 +1350,7 @@ extension Workspace {
13501350 func computePackageURLs( ) -> ( required: Set < PackageReference > , missing: Set < PackageReference > ) {
13511351 let manifestsMap : [ PackageIdentity : Manifest ] = Dictionary ( uniqueKeysWithValues:
13521352 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) }
13541354 )
13551355
13561356 var inputIdentities : Set < PackageReference > = [ ]
@@ -1486,9 +1486,9 @@ extension Workspace {
14861486 public func path( to dependency: Workspace . ManagedDependency ) -> AbsolutePath {
14871487 switch dependency. state {
14881488 case . checkout:
1489- return self . location. repositoriesCheckoutsDirectory . appending ( dependency. subpath )
1489+ return self . location. repositoriesCheckoutSubdirectory ( for : dependency)
14901490 case . edited( _, let path) :
1491- return path ?? self . location. editsDirectory . appending ( dependency. subpath )
1491+ return path ?? self . location. editsSubdirectory ( for : dependency)
14921492 case . local:
14931493 return AbsolutePath ( dependency. packageRef. location)
14941494 }
@@ -3046,7 +3046,7 @@ extension Workspace {
30463046 /// Removes the clone and checkout of the provided specifier.
30473047 fileprivate func removeRepository( dependency: ManagedDependency ) throws {
30483048 // Remove the checkout.
3049- let dependencyPath = self . location. repositoriesCheckoutsDirectory . appending ( dependency. subpath )
3049+ let dependencyPath = self . location. repositoriesCheckoutSubdirectory ( for : dependency)
30503050 let workingCopy = try self . repositoryManager. openWorkingCopy ( at: dependencyPath)
30513051 guard !workingCopy. hasUncommittedChanges ( ) else {
30523052 throw WorkspaceDiagnostics . UncommitedChanges ( repositoryPath: dependencyPath)
0 commit comments