Skip to content

Commit 1731e61

Browse files
[Caching] Remove the error for creating multiple CAS at same location
Remove the CASError that prevents creating two different CAS at the same CAS path. This allows build system to create compatible CAS at the same location even the configuration is slightly different.
1 parent 6deb6fc commit 1731e61

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyOracle.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,6 @@ public class InterModuleDependencyOracle {
189189
if let cas = createdCASMap[casOpt] {
190190
return cas
191191
}
192-
if let path = onDiskPath {
193-
guard !seenCASPath.contains(path) else {
194-
throw DependencyScanningError.casError("Cannot create two different CAS at the same OnDiskPath")
195-
}
196-
seenCASPath.insert(path)
197-
}
198192
let cas = try swiftScan.createCAS(pluginPath: pluginPath?.pathString, onDiskPath: onDiskPath?.pathString, pluginOptions: pluginOptions)
199193
createdCASMap[casOpt] = cas
200194
return cas
@@ -234,7 +228,5 @@ public class InterModuleDependencyOracle {
234228

235229
/// Storing the CAS created via CASConfig.
236230
internal var createdCASMap: [CASConfig: SwiftScanCAS] = [:]
237-
/// The on disk path seen by CAS creation function.
238-
internal var seenCASPath: Set<AbsolutePath> = []
239231
}
240232

0 commit comments

Comments
 (0)