Skip to content

Commit

Permalink
Migrate to tuist/path (tuist#6378)
Browse files Browse the repository at this point in the history
* Use tuist/path for paths

* Some fixes

* Force CI run

* Fix linting issues

---------

Co-authored-by: Daniele Formichelli <[email protected]>
  • Loading branch information
pepicrft and danieleformichelli authored Jun 10, 2024
1 parent 024983a commit 042a8ac
Show file tree
Hide file tree
Showing 606 changed files with 858 additions and 858 deletions.
11 changes: 10 additions & 1 deletion Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "d37db3f22e16eeca44eacdba528daf5f694b1c811b68c38e2fd77199db920165",
"originHash" : "355f9ed60b1d843fa8956e1b2c94f0be3e9c4591068b9955a571c0456e0e8a6c",
"pins" : [
{
"identity" : "aexml",
Expand Down Expand Up @@ -91,6 +91,15 @@
"version" : "1.1.3"
}
},
{
"identity" : "path",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tuist/Path.git",
"state" : {
"revision" : "4490da629937fc3994f72dd787dcc3f50d6973fe",
"version" : "0.3.0"
}
},
{
"identity" : "pathkit",
"kind" : "remoteSourceControl",
Expand Down
45 changes: 25 additions & 20 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import PackageDescription

let swiftToolsSupportDependency: Target.Dependency = .product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core")
let pathDependency: Target.Dependency = .product(name: "Path", package: "Path")
let loggingDependency: Target.Dependency = .product(name: "Logging", package: "swift-log")
let argumentParserDependency: Target.Dependency = .product(name: "ArgumentParser", package: "swift-argument-parser")
let swiftGenKitDependency: Target.Dependency = .product(name: "SwiftGenKit", package: "SwiftGen")
Expand All @@ -12,20 +13,22 @@ var targets: [Target] = [
name: "tuistbenchmark",
dependencies: [
argumentParserDependency,
pathDependency,
swiftToolsSupportDependency,
]
),
.executableTarget(
name: "tuistfixturegenerator",
dependencies: [
argumentParserDependency,
pathDependency,
swiftToolsSupportDependency,
]
),
.target(
name: "XcodeGraph",
dependencies: [
swiftToolsSupportDependency,
pathDependency,
"AnyCodable",
"TuistSupport",
"Mockable",
Expand All @@ -39,15 +42,15 @@ var targets: [Target] = [
dependencies: [
"XcodeGraph",
"TuistSupportTesting",
swiftToolsSupportDependency,
pathDependency,
"AnyCodable",
],
linkerSettings: [.linkedFramework("XCTest")]
),
.target(
name: "TuistCore",
dependencies: [
swiftToolsSupportDependency,
pathDependency,
"ProjectDescription",
"TuistSupport",
"XcodeGraph",
Expand All @@ -64,15 +67,15 @@ var targets: [Target] = [
"TuistCore",
"TuistSupportTesting",
"XcodeGraphTesting",
swiftToolsSupportDependency,
pathDependency,
],
linkerSettings: [.linkedFramework("XCTest")]
),
.target(
name: "TuistKit",
dependencies: [
"XcodeProj",
swiftToolsSupportDependency,
pathDependency,
argumentParserDependency,
"TuistSupport",
"TuistGenerator",
Expand Down Expand Up @@ -101,6 +104,7 @@ var targets: [Target] = [
"TuistKit",
"ProjectDescription",
"ProjectAutomation",
swiftToolsSupportDependency,
]
),
.target(
Expand All @@ -113,7 +117,7 @@ var targets: [Target] = [
.target(
name: "TuistSupport",
dependencies: [
swiftToolsSupportDependency,
pathDependency,
loggingDependency,
"KeychainAccess",
"ZIPFoundation",
Expand All @@ -129,7 +133,7 @@ var targets: [Target] = [
dependencies: [
"TuistSupport",
"XcodeGraph",
swiftToolsSupportDependency,
pathDependency,
"Difference",
],
linkerSettings: [.linkedFramework("XCTest")]
Expand All @@ -142,15 +146,15 @@ var targets: [Target] = [
"TuistSupport",
"TuistSupportTesting",
"XcodeProj",
swiftToolsSupportDependency,
pathDependency,
],
linkerSettings: [.linkedFramework("XCTest")]
),
.target(
name: "TuistGenerator",
dependencies: [
"XcodeProj",
swiftToolsSupportDependency,
pathDependency,
"TuistCore",
"XcodeGraph",
"TuistSupport",
Expand All @@ -167,14 +171,14 @@ var targets: [Target] = [
name: "TuistGeneratorTesting",
dependencies: [
"TuistGenerator",
swiftToolsSupportDependency,
pathDependency,
],
linkerSettings: [.linkedFramework("XCTest")]
),
.target(
name: "TuistScaffold",
dependencies: [
swiftToolsSupportDependency,
pathDependency,
"TuistCore",
"XcodeGraph",
"TuistSupport",
Expand All @@ -190,7 +194,7 @@ var targets: [Target] = [
name: "TuistAutomation",
dependencies: [
"XcodeProj",
swiftToolsSupportDependency,
pathDependency,
.product(name: "XcbeautifyLib", package: "xcbeautify"),
"TuistCore",
"XcodeGraph",
Expand All @@ -210,7 +214,7 @@ var targets: [Target] = [
"TuistSupport",
"TuistPlugin",
"Mockable",
swiftToolsSupportDependency,
pathDependency,
],
swiftSettings: [
.define("MOCKING", .when(configuration: .debug)),
Expand All @@ -224,7 +228,7 @@ var targets: [Target] = [
"TuistSupport",
"XcodeProj",
"Mockable",
swiftToolsSupportDependency,
pathDependency,
],
swiftSettings: [
.define("MOCKING", .when(configuration: .debug)),
Expand All @@ -238,7 +242,7 @@ var targets: [Target] = [
"TuistSupport",
"XcodeProj",
"Mockable",
swiftToolsSupportDependency,
pathDependency,
"Queuer",
],
swiftSettings: [
Expand All @@ -249,7 +253,7 @@ var targets: [Target] = [
name: "TuistLoader",
dependencies: [
"XcodeProj",
swiftToolsSupportDependency,
pathDependency,
"TuistCore",
"XcodeGraph",
"TuistSupport",
Expand All @@ -264,7 +268,7 @@ var targets: [Target] = [
name: "TuistLoaderTesting",
dependencies: [
"TuistLoader",
swiftToolsSupportDependency,
pathDependency,
"TuistCore",
"XcodeGraphTesting",
"ProjectDescription",
Expand All @@ -281,7 +285,7 @@ var targets: [Target] = [
"XcodeGraph",
"TuistLoader",
"Mockable",
swiftToolsSupportDependency,
pathDependency,
],
swiftSettings: [
.define("MOCKING", .when(configuration: .debug)),
Expand All @@ -295,7 +299,7 @@ var targets: [Target] = [
"TuistSupport",
"TuistScaffold",
"Mockable",
swiftToolsSupportDependency,
pathDependency,
],
swiftSettings: [
.define("MOCKING", .when(configuration: .debug)),
Expand All @@ -306,7 +310,7 @@ var targets: [Target] = [
dependencies: [
"TuistCore",
"TuistSupport",
swiftToolsSupportDependency,
pathDependency,
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
],
Expand Down Expand Up @@ -442,6 +446,7 @@ let package = Package(
.package(url: "https://github.com/Kolos65/Mockable.git", from: "0.0.2"),
.package(url: "https://github.com/tuist/swift-openapi-runtime", branch: "swift-tools-version"),
.package(url: "https://github.com/tuist/swift-openapi-urlsession", branch: "swift-tools-version"),
.package(url: "https://github.com/tuist/Path", .upToNextMajor(from: "0.3.0")),
],
targets: targets
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import TSCBasic
import Path
import TuistSupport
import XcodeProj
import XCTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// swiftlint:disable force_try
import TSCBasic
import Path
import TuistCore
@_exported import TuistKit
import XcodeGraph
Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistAnalytics/TuistAnalytics.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path
import TuistAsyncQueue
import TuistLoader
import XcodeGraph
Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistAsyncQueue/AsyncQueuePersistor.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path
import TuistCore
import TuistSupport

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path
import TuistCore
import XcodeGraph

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path
import TuistCore
import XcodeGraph

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path
import TuistCore
import TuistSupport
import XcodeGraph
Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistAutomation/Utilities/TargetBuilder.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import TSCBasic
import Path
import TSCUtility
import TuistCore
import TuistSupport
Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistAutomation/Utilities/TargetRunner.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import TSCBasic
import Path
import struct TSCUtility.Version
import TuistCore
import TuistSupport
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import TSCBasic
import Path
import TSCUtility
import TuistCore
import TuistSupport
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path
import TuistCore
import TuistSupport

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path
import TuistCore
import TuistCoreTesting
import XcodeGraph
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import TSCBasic
import Path
import TSCUtility
import TuistAutomation
import TuistCore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import TSCBasic
import Path
import struct TSCUtility.Version
import TuistAutomation
import XcodeGraph
Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistCore/Analytics/CommandEvent.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import AnyCodable
import Foundation
import TSCBasic
import Path

/// A `CommandEvent` is the analytics event to track the execution of a Tuist command
public struct CommandEvent: Codable, Equatable, AsyncQueueEvent {
Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistCore/Automation/XcodeBuildArgument.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path

/// It represents arguments that can be passed to the xcodebuild command.
public enum XcodeBuildArgument: Equatable, CustomStringConvertible {
Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistCore/Automation/XcodeBuildControlling.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path
import TuistSupport

public enum XcodeBuildDestination: Equatable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistCore/Automation/XcodeBuildSettings.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path

public struct XcodeBuildSettings {
public typealias DictionaryType = [String: String]
Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistCore/Automation/XcodeBuildTarget.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path

public enum XcodeBuildTarget: Equatable {
/// The target is an Xcode project.
Expand Down
4 changes: 2 additions & 2 deletions Sources/TuistCore/Cache/CacheDirectoriesProvider.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import Mockable
import TSCBasic
import Path
import TuistSupport
import XcodeGraph

Expand Down Expand Up @@ -36,7 +36,7 @@ public final class CacheDirectoriesProvider: CacheDirectoriesProviding {
return cacheDirectory.appending(components: ["tuist", category.directoryName])
}

public func cacheDirectory() throws -> TSCBasic.AbsolutePath {
public func cacheDirectory() throws -> Path.AbsolutePath {
if let xdgCacheHome = ProcessInfo.processInfo.environment["XDG_CACHE_HOME"] {
return try AbsolutePath(validating: xdgCacheHome)
} else {
Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistCore/Cache/FileContentHashing.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import TSCBasic
import Path

public protocol FileContentHashing {
func hash(path: AbsolutePath) throws -> String
Expand Down
Loading

0 comments on commit 042a8ac

Please sign in to comment.