     private var pinsStore: PinsStore?
 
     /// The container provider used to load package containers.
-    let provider: PackageContainerProvider
+    private let provider: ContainerProvider
 
     /// The resolver's delegate.
     let delegate: DependencyResolverDelegate?

        )
    }

    // MARK: - Container Management

    /// Condition for container management structures.
    private let fetchCondition = Condition()

    /// The list of fetched containers.
    private var _fetchedContainers: [PackageReference: Basic.Result<PackageContainer, AnyError>] = [:]

    /// The set of containers requested so far.
    private var _prefetchingContainers: Set<PackageReference> = []

    /// Get the container for the given identifier, loading it if necessary.
    fileprivate func getContainer(for identifier: PackageReference) throws -> PackageContainer {
        return try fetchCondition.whileLocked {
            // Return the cached container, if available.
            if let container = _fetchedContainers[identifier] {
                return try container.dematerialize()
            }

            // If this container is being prefetched, wait for that to complete.
            while _prefetchingContainers.contains(identifier) {
                fetchCondition.wait()
            }

            // The container may now be available in our cache if it was prefetched.
            if let container = _fetchedContainers[identifier] {
                return try container.dematerialize()
            }

            // Otherwise, fetch the container synchronously.
            let container = try await { provider.getContainer(for: identifier, skipUpdate: skipUpdate, completion: $0) }
            self._fetchedContainers[identifier] = Basic.Result(container)
            return container
        }
    }

    /// Returns the best available version for a given term.
    func getBestAvailableVersion(for term: Term) throws -> Version? {
        assert(term.isPositive, "Expected term to be positive")
        let container = try getContainer(for: term.package)

        var versionSet = term.requirement



        // Add overriden packages to the result.
        for (package, boundVersion) in overriddenPackages {
            let container = try provider.getContainer(for: package)
            let identifier = try container.getUpdatedIdentifier(at: boundVersion)
            finalAssignments.append((identifier, boundVersion))
        }
