                         throw InternalError("unknown dependency product for \(dependency)")
                     }
                     for dependencyProductTarget in dependencyProduct.targets {
-                        try self.addTargetDependencyInfo(for: dependencyProductTarget, dependencyModulePathMap: &dependencyModulePathMap)
+                        try self.addTargetDependencyInfo(for: dependencyProductTarget, dependencyModuleDetailsMap: &dependencyModuleDetailsMap)
 
                     }
                 case .target:


    /// Collect a map from all target dependencies of the specified target to the build planning artifacts for said dependency,
    /// in the form of a path to a .swiftmodule file and the dependency's InterModuleDependencyGraph.
    private func collectTargetDependencyModulePaths(
        for target: ResolvedTarget,
        dependencyModulePathMap: inout SwiftDriver.ExternalTargetModulePathMap
    ) throws {
        for dependency in target.dependencies(satisfying: self.buildEnvironment) {
            switch dependency {

                    guard let dependencyTarget = dependency.target else {
                        throw InternalError("unknown dependency target for \(dependency)")
                    }
                    try self.addTargetDependencyInfo(for: dependencyTarget, dependencyModuleDetailsMap: &dependencyModuleDetailsMap)
            }
        }
    }

    private func addTargetDependencyInfo(
        for target: ResolvedTarget,
        dependencyModuleDetailsMap: inout SwiftDriver.ExternalTargetModuleDetailsMap
    ) throws {
        guard case .swift(let dependencySwiftTargetDescription) = plan.targetMap[target] else {
            return
        }
        dependencyModuleDetailsMap[ModuleDependencyId.swiftPlaceholder(target.c99name)] =
            SwiftDriver.ExternalTargetModuleDetails(path: dependencySwiftTargetDescription.moduleOutputPath, isFramework: false)
        try self.collectTargetDependencyModuleDetails(for: target, dependencyModuleDetailsMap: &dependencyModuleDetailsMap)
    }

    private func addSwiftCmdsEmitSwiftModuleSeparately(
