-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Rename ResolvedTarget
to ResolvedModule
#7459
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
Conversation
This has no impact on how these concepts are named in user-visible APIs like `PackageDescription` and `PackagePlugin`, target there can stay as "target" for as long as needed. With host/target triples separation in the SwiftPM codebase, it gets very confusing whether at a given moment "target" refers to a module, a triple, or a low level build system target.
…xd/resolved-module # Conflicts: # Sources/PackageGraph/ModulesGraph.swift
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I think it would be as important to follow-up with a PR that changes all the labels related to ResolvedModule from target
to module
as well as variables and other places where the type is used.
@@ -28,7 +28,7 @@ package final class ClangTargetBuildDescription { | |||
package let package: ResolvedPackage | |||
|
|||
/// The target described by this target. | |||
package let target: ResolvedTarget | |||
package let target: ResolvedModule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: looks like the comment needs updating as well :)
@@ -49,7 +49,7 @@ package final class ProductBuildDescription: SPMBuildCore.ProductBuildDescriptio | |||
var additionalFlags: [String] = [] | |||
|
|||
/// The list of targets that are going to be linked statically in this product. | |||
var staticTargets: [ResolvedTarget] = [] | |||
var staticTargets: [ResolvedModule] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be updated in a follow-up?
@@ -33,7 +33,7 @@ package final class SwiftTargetBuildDescription { | |||
package let package: ResolvedPackage | |||
|
|||
/// The target described by this target. | |||
package let target: ResolvedTarget | |||
package let target: ResolvedModule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Same comment issue here.
### Motivation: With host/target triples separation in the SwiftPM codebase, it gets very confusing whether at a given moment "target" refers to a module, a triple, or a low level build system target. ### Modifications: Renamed `ResolvedTarget` to `ResolvedModule`. Added a deprecated `typealias ResolvedTarget = ResolvedModule` to allow graceful migration for users of this type. ### Result: Confusion between target triples and package targets is reduced. This has no impact on how these concepts are named in user-visible APIs like `PackageDescription` and `PackagePlugin`, target there can stay as "target" for as long as needed. Remaining internal uses of "target" outside of "target triple" context, like `*TargetBuildDescription` will be renamed in future PRs.
### Motivation: With host/target triples separation in the SwiftPM codebase, it gets very confusing whether at a given moment "target" refers to a module, a triple, or a low level build system target. ### Modifications: Renamed `ResolvedTarget` to `ResolvedModule`. Added a deprecated `typealias ResolvedTarget = ResolvedModule` to allow graceful migration for users of this type. ### Result: Confusion between target triples and package targets is reduced. This has no impact on how these concepts are named in user-visible APIs like `PackageDescription` and `PackagePlugin`, target there can stay as "target" for as long as needed. Remaining internal uses of "target" outside of "target triple" context, like `*TargetBuildDescription` will be renamed in future PRs.
With host/target triples separation in the SwiftPM codebase, it gets very confusing whether at a given moment "target" refers to a module, a triple, or a low level build system target. Renamed `ResolvedTarget` to `ResolvedModule`. Added a deprecated `typealias ResolvedTarget = ResolvedModule` to allow graceful migration for users of this type. Confusion between target triples and package targets is reduced. This has no impact on how these concepts are named in user-visible APIs like `PackageDescription` and `PackagePlugin`, target there can stay as "target" for as long as needed. Remaining internal uses of "target" outside of "target triple" context, like `*TargetBuildDescription` will be renamed in future PRs. (cherry picked from commit 27996b8)
With host/target triples separation in the SwiftPM codebase, it gets very confusing whether at a given moment "target" refers to a module, a triple, or a low level build system target. Renamed `ResolvedTarget` to `ResolvedModule`. Added a deprecated `typealias ResolvedTarget = ResolvedModule` to allow graceful migration for users of this type. Confusion between target triples and package targets is reduced. This has no impact on how these concepts are named in user-visible APIs like `PackageDescription` and `PackagePlugin`, target there can stay as "target" for as long as needed. Remaining internal uses of "target" outside of "target triple" context, like `*TargetBuildDescription` will be renamed in future PRs. (cherry picked from commit 27996b8)
- Explanation: With host/target triples separation in the SwiftPM codebase, it gets very confusing whether at a given moment "target" refers to a module, a triple, or a low level build system target. Renamed `ResolvedTarget` to `ResolvedModule`. Added a deprecated `typealias ResolvedTarget = ResolvedModule` to allow graceful migration for users of this type. Confusion between target triples and package targets is reduced. This has no impact on how these concepts are named in user-visible APIs like `PackageDescription` and `PackagePlugin`, target there can stay as "target" for as long as needed. Remaining internal uses of "target" outside of "target triple" context, like `*TargetBuildDescription` will be renamed in future PRs. - Scope: NFC change - Main Branch PRs: #7459 - Risk: Very Low - Reviewed By: @bnbarham - Testing: No new tests are necessary (cherry picked from commit 27996b8) Co-authored-by: Max Desiatov <m_desiatov@apple.com>
Motivation:
With host/target triples separation in the SwiftPM codebase, it gets very confusing whether at a given moment "target" refers to a module, a triple, or a low level build system target.
Modifications:
Renamed
ResolvedTarget
toResolvedModule
. Added a deprecatedtypealias ResolvedTarget = ResolvedModule
to allow graceful migration for users of this type.Result:
Confusion between target triples and package targets is reduced.
This has no impact on how these concepts are named in user-visible APIs like
PackageDescription
andPackagePlugin
, target there can stay as "target" for as long as needed.Remaining internal uses of "target" outside of "target triple" context, like
*TargetBuildDescription
will be renamed in future PRs.