-
Notifications
You must be signed in to change notification settings - Fork 129
Move Triple
to TSCUtility
#117
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
We need to use `Triple` in SwiftPM's `ManifestLoader` as part of some upcoming changes and that requires moving it here.
@swift-ci please test |
|
||
public enum OS: String, Encodable, CaseIterable { | ||
case darwin | ||
case macOS = "macosx" |
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.
ಠ_ಠ
return self.tripleString + version | ||
} | ||
|
||
public static let macOS = try! Triple("x86_64-apple-macosx") |
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.
This is just being moved over from SwiftPM, right? Eventually we'll need to fix this. If it's new code, then we should fix it from the start.
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.
Yah, it's just being moved over. Fix it in what sense?
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.
I meant to not include the hardcoded architecture.
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.
Right, that's only being used for this fallback case anyway: https://github.com/apple/swift-package-manager/blob/master/Sources/SPMBuildCore/Triple.swift#L147-L150
I think we can probably remove that at this point and this static member with it, but I'd like to be conservative for now since this will need to end up in a 5.3.x release.
I seem to be seeing this after this change:
Is there supposed to be an associated s-p-m change? |
Remove `Triple.swift` as tools-support-core now has this defined. This repairs the CMake based build.
swiftlang/swift-package-manager#2885 should hopefully address it |
Remove Triple.swift as tools-support-core now has this defined. ``` /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/Build/BuildPlan.swift:1896:23: error: 'Triple' is ambiguous for type lookup in this context fileprivate extension Triple.OS { ^~~~~~ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/.build/checkouts/swift-tools-support-core/Sources/TSCUtility/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/SPMBuildCore/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ ```
Remove Triple.swift as tools-support-core now has this defined. ``` /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/Build/BuildPlan.swift:1896:23: error: 'Triple' is ambiguous for type lookup in this context fileprivate extension Triple.OS { ^~~~~~ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/.build/checkouts/swift-tools-support-core/Sources/TSCUtility/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/SPMBuildCore/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ ```
Remove Triple.swift as tools-support-core now has this defined. ``` /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/Build/BuildPlan.swift:1896:23: error: 'Triple' is ambiguous for type lookup in this context fileprivate extension Triple.OS { ^~~~~~ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/.build/checkouts/swift-tools-support-core/Sources/TSCUtility/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/SPMBuildCore/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ ```
Remove Triple.swift as tools-support-core now has this defined. ``` /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/Build/BuildPlan.swift:1896:23: error: 'Triple' is ambiguous for type lookup in this context fileprivate extension Triple.OS { ^~~~~~ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/.build/checkouts/swift-tools-support-core/Sources/TSCUtility/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/SPMBuildCore/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ ```
Remove Triple.swift as tools-support-core now has this defined. ``` /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/Build/BuildPlan.swift:1896:23: error: 'Triple' is ambiguous for type lookup in this context fileprivate extension Triple.OS { ^~~~~~ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/.build/checkouts/swift-tools-support-core/Sources/TSCUtility/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/SPMBuildCore/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ ```
Remove Triple.swift as tools-support-core now has this defined. ``` /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/Build/BuildPlan.swift:1896:23: error: 'Triple' is ambiguous for type lookup in this context fileprivate extension Triple.OS { ^~~~~~ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/.build/checkouts/swift-tools-support-core/Sources/TSCUtility/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ /Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-master/swiftpm/Sources/SPMBuildCore/Triple.swift:21:15: note: found this candidate public struct Triple: Encodable, Equatable { ^ ```
We need to use
Triple
in SwiftPM'sManifestLoader
as part of some upcoming changes and that requires moving it here.