Module
Module.swift:18class Module
class Module
import PackageModel
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
static let testModuleNameSuffix: String
Suffix that’s expected for test targets.
class var typeDescription: String { get }
Description of the module type used in swift package describe
output. Preserved for backwards compatibility.
let buildSettings: BuildSettings.AssignmentTable
The build settings assignments of this module.
let buildSettingsDescription: [TargetBuildSettingDescription.Setting]
var bundleName: String? { get }
The bundle name, if one is being generated.
var c99name: String { get }
The language-level module name.
let dependencies: [Dependency]
The dependencies of this module.
var description: String { get }
var directRefAliases: [String : [String]]? { get }
Used to store aliases that should be referenced directly in source code
let ignored: [AbsolutePath]
Files in the target that were marked as ignored.
var isEmbeddedSwiftTarget: Bool { get }
var moduleAliases: [String : String]? { get }
Module aliases needed to build this module. The key is an original name of a dependent module and the value is a new unique name mapped to the name of its .swiftmodule binary.
var name: String { get }
The name of the module.
let others: [AbsolutePath]
Other kinds of files in the module.
let packageAccess: Bool
If true, access to package declarations from other modules is allowed.
let path: AbsolutePath
The path of the module.
let pluginUsages: [PluginUsage]
The usages of package plugins by this module.
let potentialBundleName: String?
var prechainModuleAliases: [String : String]? { get }
Used to store pre-chained / pre-overriden module aliases
let resources: [Resource]
The resource files in the module.
let sources: Sources
The sources for the module.
let type: Kind
The kind of module.
let usesUnsafeFlags: Bool
Whether or not this target uses any custom unsafe flags.
static func == (lhs: Module, rhs: Module) -> Bool
func addDirectRefAliases(for name: String, as aliases: [String])
func addModuleAlias(for name: String, as alias: String)
Add module aliases (if applicable) for dependencies of this module.
func addPrechainModuleAlias(for name: String, as alias: String)
@discardableResult func applyAlias() -> Bool
func hash(into hasher: inout Hasher)
func removeModuleAlias(for name: String)
enum Dependency
A module dependency to a module or product.
enum Group
A group a module belongs to that allows customizing access boundaries. A module is treated as a client outside of the package if excluded
, inside the package boundary if package
.
enum Kind
The module kind.
struct ProductReference
A reference to a product from a module dependency.
typealias PluginUsage = Dependency
A usage of a plugin module or product. Implemented as a dependency for now and added to the dependencies
array, since they currently have exactly the same characteristics and to avoid duplicating the implementation for now.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
final class BinaryModule
final class ClangModule
final class PluginModule
final class SwiftModule
final class SystemLibraryModule