         }
     }
 
-    /// Private function that constructs a single Module object for the potential target.
-    private func createModule(
+    /// Private function that constructs a single Target object for the potential target.
+    private func createTarget(
         potentialModule: PotentialModule,
         moduleDependencies: [Target],
         productDeps: [(name: String, package: String?)]


    /// Build a new package following the conventions.
    public func construct() throws -> Package {
        let targets = try constructModules()
        let products = try constructProducts(targets)
        return Package(
            manifest: manifest,

            }) ?? []

            // Create the target.
            let target = try createTarget(
                potentialModule: potentialModule, moduleDependencies: deps, productDeps: productDeps)
            // Add the created target to the map or print no sources warning.
            if let createdTarget = target {
                targets[createdTarget.name] = createdTarget
            } else {
                emptyModules.insert(potentialModule.name)
                diagnostics.emit(data: PackageBuilderDiagnostics.NoSources(package: manifest.name, target: potentialModule.name))
