Skip to content

[Caching] Remove the error for creating multiple CAS at same location #1586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,6 @@ public class InterModuleDependencyOracle {
if let cas = createdCASMap[casOpt] {
return cas
}
if let path = onDiskPath {
guard !seenCASPath.contains(path) else {
throw DependencyScanningError.casError("Cannot create two different CAS at the same OnDiskPath")
}
seenCASPath.insert(path)
}
let cas = try swiftScan.createCAS(pluginPath: pluginPath?.pathString, onDiskPath: onDiskPath?.pathString, pluginOptions: pluginOptions)
createdCASMap[casOpt] = cas
return cas
Expand Down Expand Up @@ -234,7 +228,5 @@ public class InterModuleDependencyOracle {

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