diff --git a/Package.resolved b/Package.resolved index cbd5b940421..36a256b8512 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "f8c61950711e5128d86d58358ee865040f1c7a5813155aaef7799e161ec9fb3a", + "originHash" : "de2c05e5b2583fd20c9ac0362c356c78df4ddffaee8430d3c04ad279851ae24c", "pins" : [ { "identity" : "aexml", @@ -51,8 +51,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tuist/FileSystem.git", "state" : { - "revision" : "0cda08ddcb9c9ac8c83891d83f26387cc1104029", - "version" : "0.5.0" + "revision" : "f4ea155e26262f340b1cabc8580ccaa445f690bc", + "version" : "0.6.0" } }, { @@ -204,8 +204,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tuist/swift-glob", "state" : { - "revision" : "a0bc22cc5e5113356d31540dbe66da0b653cd6d8", - "version" : "0.2.2" + "revision" : "a32f83e851593b4bec436ebac910d70af6d77f6a", + "version" : "0.3.4" } }, { diff --git a/Package.swift b/Package.swift index 635e3cb9776..b096a8ec080 100644 --- a/Package.swift +++ b/Package.swift @@ -512,7 +512,7 @@ let package = Package( .package( url: "https://github.com/tuist/XcodeGraph.git", .upToNextMajor(from: "0.16.0") ), - .package(url: "https://github.com/tuist/FileSystem.git", .upToNextMajor(from: "0.5.0")), + .package(url: "https://github.com/tuist/FileSystem.git", .upToNextMajor(from: "0.6.0")), .package(url: "https://github.com/tuist/Command.git", exact: "0.8.0"), ], targets: targets diff --git a/Sources/TuistAcceptanceTesting/TuistAcceptanceFixtures.swift b/Sources/TuistAcceptanceTesting/TuistAcceptanceFixtures.swift index d837c994662..30ae8d515fa 100644 --- a/Sources/TuistAcceptanceTesting/TuistAcceptanceFixtures.swift +++ b/Sources/TuistAcceptanceTesting/TuistAcceptanceFixtures.swift @@ -2,6 +2,7 @@ import Foundation public enum TuistAcceptanceFixtures { case appWithAirshipSDK + case appWithAlamofire case appWithBuildRules case appWithComposableArchitecture case appWithCustomDefaultConfiguration @@ -90,6 +91,8 @@ public enum TuistAcceptanceFixtures { switch self { case .appWithAirshipSDK: return "app_with_airship_sdk" + case .appWithAlamofire: + return "app_with_alamofire" case .appWithBuildRules: return "app_with_build_rules" case .appWithComposableArchitecture: diff --git a/Sources/TuistLoader/Loaders/RecursiveManifestLoader.swift b/Sources/TuistLoader/Loaders/RecursiveManifestLoader.swift index 672abd36a63..4388bd017eb 100644 --- a/Sources/TuistLoader/Loaders/RecursiveManifestLoader.swift +++ b/Sources/TuistLoader/Loaders/RecursiveManifestLoader.swift @@ -69,15 +69,17 @@ public struct RecursiveManifestLoader: RecursiveManifestLoading { rootDirectory: rootDirectory ) let projectSearchPaths = (loadedWorkspace?.projects ?? ["."]) - let manifestLoader = manifestLoader let projectPaths = try await projectSearchPaths.map { try generatorPaths.resolve(path: $0) }.concurrentFlatMap { - try await fileSystem.glob(directory: $0, include: [""]).collect() - }.filter { - fileHandler.isFolder($0) - }.concurrentFilter { - try await manifestLoader.manifests(at: $0).contains(.project) + try await fileSystem.glob( + directory: AbsolutePath.root, + include: [ + String($0.appending(component: Manifest.project.fileName($0)).pathString.dropFirst()), + ] + ) + .collect() + .map(\.parentDirectory) } let projects = await LoadedProjects(projects: try loadProjects(paths: projectPaths).projects) diff --git a/Sources/TuistLoader/Models+ManifestMappers/ResourceFileElement+ManifestMapper.swift b/Sources/TuistLoader/Models+ManifestMappers/ResourceFileElement+ManifestMapper.swift index 88aeef09a24..7724d4b65a8 100644 --- a/Sources/TuistLoader/Models+ManifestMappers/ResourceFileElement+ManifestMapper.swift +++ b/Sources/TuistLoader/Models+ManifestMappers/ResourceFileElement+ManifestMapper.swift @@ -23,8 +23,8 @@ extension XcodeGraph.ResourceFileElement { for path in excluding { let absolute = try AbsolutePath(validating: path) let globs = try await fileSystem.glob( - directory: AbsolutePath(validating: absolute.dirname), - include: [absolute.basename] + directory: .root, + include: [String(absolute.pathString.dropFirst())] ) .collect() excluded.formUnion(globs) diff --git a/Sources/TuistLoader/Models+ManifestMappers/Workspace+ManifestMapper.swift b/Sources/TuistLoader/Models+ManifestMappers/Workspace+ManifestMapper.swift index 9dec59164b5..ea635e4e8a2 100644 --- a/Sources/TuistLoader/Models+ManifestMappers/Workspace+ManifestMapper.swift +++ b/Sources/TuistLoader/Models+ManifestMappers/Workspace+ManifestMapper.swift @@ -15,21 +15,22 @@ extension XcodeGraph.Workspace { manifest: ProjectDescription.Workspace, path: AbsolutePath, generatorPaths: GeneratorPaths, - manifestLoader: ManifestLoading, + manifestLoader _: ManifestLoading, fileSystem: FileSysteming ) async throws -> XcodeGraph.Workspace { func globProjects(_ path: Path) async throws -> [AbsolutePath] { let resolvedPath = try generatorPaths.resolve(path: path) let projects = try await fileSystem.glob( directory: AbsolutePath.root, - include: [String(resolvedPath.pathString.dropFirst())] + include: [ + String(resolvedPath.appending(component: Manifest.package.fileName(resolvedPath)).pathString.dropFirst()), + String(resolvedPath.appending(component: Manifest.project.fileName(resolvedPath)).pathString.dropFirst()), + ] ) .collect() - .filter(FileHandler.shared.isFolder) + .map(\.parentDirectory) .filter { $0.basename != Constants.tuistDirectoryName && !$0.pathString.contains(".build/checkouts") } - .concurrentFilter { - try await manifestLoader.manifests(at: $0).contains(where: { $0 == .package || $0 == .project }) - } + .uniqued() if projects.isEmpty { // FIXME: This should be done in a linter. diff --git a/Sources/TuistLoader/Models/FileListGlob+Unfold.swift b/Sources/TuistLoader/Models/FileListGlob+Unfold.swift index 0c8cb3ac584..0f51d1dcf69 100644 --- a/Sources/TuistLoader/Models/FileListGlob+Unfold.swift +++ b/Sources/TuistLoader/Models/FileListGlob+Unfold.swift @@ -42,8 +42,8 @@ extension FileListGlob { for path in excluding { let resolved = try generatorPaths.resolve(path: path) let globs = try await fileSystem.glob( - directory: AbsolutePath(validating: resolved.dirname), - include: [resolved.basename] + directory: .root, + include: [String(resolved.pathString.dropFirst())] ) .collect() result.formUnion(globs) diff --git a/Tests/TuistDependenciesAcceptanceTests/DependenciesAcceptanceTests.swift b/Tests/TuistDependenciesAcceptanceTests/DependenciesAcceptanceTests.swift index aa00d201172..94c3d77b6c0 100644 --- a/Tests/TuistDependenciesAcceptanceTests/DependenciesAcceptanceTests.swift +++ b/Tests/TuistDependenciesAcceptanceTests/DependenciesAcceptanceTests.swift @@ -33,6 +33,15 @@ final class DependenciesAcceptanceTestAppWithSPMDependenciesWithoutInstall: Tuis } } +final class DependenciesAcceptanceTestAppAlamofire: TuistAcceptanceTestCase { + func test_app_with_alamofire() async throws { + try await setUpFixture(.appWithAlamofire) + try await run(InstallCommand.self) + try await run(GenerateCommand.self) + try await run(BuildCommand.self, "App") + } +} + final class DependenciesAcceptanceTestIosAppWithSPMDependencies: TuistAcceptanceTestCase { func test_ios_app_spm_dependencies() async throws { try await setUpFixture(.iosAppWithSpmDependencies) diff --git a/Tests/TuistLoaderTests/Loaders/ManifestModelConverterTests.swift b/Tests/TuistLoaderTests/Loaders/ManifestModelConverterTests.swift index feb45961602..68a65164c04 100644 --- a/Tests/TuistLoaderTests/Loaders/ManifestModelConverterTests.swift +++ b/Tests/TuistLoaderTests/Loaders/ManifestModelConverterTests.swift @@ -224,6 +224,7 @@ final class ManifestModelConverterTests: TuistUnitTestCase { "A", "B", ]) + try await createFiles(["A/Project.swift", "B/Project.swift"]) let manifest = WorkspaceManifest.test(name: "SomeWorkspace", projects: ["A", "B"]) let manifests = [ diff --git a/Tests/TuistLoaderTests/Loaders/RecursiveManifestLoaderTests.swift b/Tests/TuistLoaderTests/Loaders/RecursiveManifestLoaderTests.swift index 0fbfd2eafa6..c4206fb5201 100644 --- a/Tests/TuistLoaderTests/Loaders/RecursiveManifestLoaderTests.swift +++ b/Tests/TuistLoaderTests/Loaders/RecursiveManifestLoaderTests.swift @@ -57,7 +57,7 @@ final class RecursiveManifestLoaderTests: TuistUnitTestCase { func test_loadProject_loadingSingleProject() async throws { // Given let projectA = createProject(name: "ProjectA") - try stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) + try await stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) // When let manifests = try await subject.loadWorkspace(at: path.appending(try RelativePath(validating: "Some/Path/A"))) @@ -91,9 +91,9 @@ final class RecursiveManifestLoaderTests: TuistUnitTestCase { "TargetC": [], ] ) - try stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) - try stub(manifest: projectB, at: try RelativePath(validating: "Some/Path/B")) - try stub(manifest: projectC, at: try RelativePath(validating: "Some/Path/C")) + try await stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) + try await stub(manifest: projectB, at: try RelativePath(validating: "Some/Path/B")) + try await stub(manifest: projectC, at: try RelativePath(validating: "Some/Path/C")) // When let manifests = try await subject.loadWorkspace(at: path.appending(try RelativePath(validating: "Some/Path/A"))) @@ -141,11 +141,11 @@ final class RecursiveManifestLoaderTests: TuistUnitTestCase { "TargetE": [], ] ) - try stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) - try stub(manifest: projectB, at: try RelativePath(validating: "Some/Path/B")) - try stub(manifest: projectC, at: try RelativePath(validating: "Some/Path/C")) - try stub(manifest: projectD, at: try RelativePath(validating: "Some/Path/D")) - try stub(manifest: projectE, at: try RelativePath(validating: "Some/Path/E")) + try await stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) + try await stub(manifest: projectB, at: try RelativePath(validating: "Some/Path/B")) + try await stub(manifest: projectC, at: try RelativePath(validating: "Some/Path/C")) + try await stub(manifest: projectD, at: try RelativePath(validating: "Some/Path/D")) + try await stub(manifest: projectE, at: try RelativePath(validating: "Some/Path/E")) // When let manifests = try await subject.loadWorkspace(at: path.appending(try RelativePath(validating: "Some/Path/A"))) @@ -170,7 +170,7 @@ final class RecursiveManifestLoaderTests: TuistUnitTestCase { ], ] ) - try stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) + try await stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) // When / Then await XCTAssertThrowsSpecific( @@ -208,9 +208,9 @@ final class RecursiveManifestLoaderTests: TuistUnitTestCase { ] ) - try stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) - try stub(manifest: projectB, at: try RelativePath(validating: "Some/Path/B")) - try stub(manifest: projectC, at: try RelativePath(validating: "Some/Path/C")) + try await stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) + try await stub(manifest: projectB, at: try RelativePath(validating: "Some/Path/B")) + try await stub(manifest: projectC, at: try RelativePath(validating: "Some/Path/C")) try stub(manifest: workspace, at: try RelativePath(validating: "Some/Path")) // When @@ -254,9 +254,9 @@ final class RecursiveManifestLoaderTests: TuistUnitTestCase { ] ) - try stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) - try stub(manifest: projectB, at: try RelativePath(validating: "Some/Path/B")) - try stub(manifest: projectC, at: try RelativePath(validating: "Some/Path/C")) + try await stub(manifest: projectA, at: try RelativePath(validating: "Some/Path/A")) + try await stub(manifest: projectB, at: try RelativePath(validating: "Some/Path/B")) + try await stub(manifest: projectC, at: try RelativePath(validating: "Some/Path/C")) try stub(manifest: workspace, at: try RelativePath(validating: "Some/Path")) // When @@ -291,7 +291,7 @@ final class RecursiveManifestLoaderTests: TuistUnitTestCase { ] ) - try stub(manifest: projectA, at: try RelativePath(validating: "Some/Path")) + try await stub(manifest: projectA, at: try RelativePath(validating: "Some/Path")) try stub(manifest: workspace, at: try RelativePath(validating: "Some/Path")) // When @@ -371,11 +371,12 @@ final class RecursiveManifestLoaderTests: TuistUnitTestCase { private func stub( manifest: Project, at relativePath: RelativePath - ) throws { + ) async throws { let manifestPath = path .appending(relativePath) .appending(component: Manifest.project.fileName(path.appending(relativePath))) - try fileHandler.touch(manifestPath) + try await fileSystem.makeDirectory(at: manifestPath.parentDirectory) + try await fileSystem.touch(manifestPath) projectManifests[manifestPath.parentDirectory] = manifest } diff --git a/Tests/TuistLoaderTests/Models+ManifestMappers/ResourceFileElementManifestMapperTests.swift b/Tests/TuistLoaderTests/Models+ManifestMappers/ResourceFileElementManifestMapperTests.swift index a8d9782eb5a..1a5ca99e523 100644 --- a/Tests/TuistLoaderTests/Models+ManifestMappers/ResourceFileElementManifestMapperTests.swift +++ b/Tests/TuistLoaderTests/Models+ManifestMappers/ResourceFileElementManifestMapperTests.swift @@ -141,7 +141,6 @@ final class ResourceFileElementManifestMapperTests: TuistUnitTestCase { XCTAssertEqual( got, [ - .file(path: resourcesFolder, tags: []), .file(path: includedResource, tags: []), ] ) @@ -174,7 +173,6 @@ final class ResourceFileElementManifestMapperTests: TuistUnitTestCase { XCTAssertEqual( got, [ - .file(path: resourcesFolder, tags: []), .file(path: includedResource, tags: []), ] ) @@ -204,10 +202,9 @@ final class ResourceFileElementManifestMapperTests: TuistUnitTestCase { ) // Then - XCTAssertEqual( + XCTAssertBetterEqual( got, [ - .file(path: resourcesFolder, tags: []), .file(path: includedResource, tags: []), ] ) diff --git a/Tests/TuistLoaderTests/Models+ManifestMappers/Workspace+ManifestMapperTests.swift b/Tests/TuistLoaderTests/Models+ManifestMappers/Workspace+ManifestMapperTests.swift index 16c63116bb3..a55478ceee4 100644 --- a/Tests/TuistLoaderTests/Models+ManifestMappers/Workspace+ManifestMapperTests.swift +++ b/Tests/TuistLoaderTests/Models+ManifestMappers/Workspace+ManifestMapperTests.swift @@ -37,6 +37,7 @@ final class WorkspaceManifestMapperTests: TuistUnitTestCase { .locate(from: .any) .willReturn(workspacePath) + try await fileSystem.touch(workspacePath.appending(component: "Project.swift")) try fileHandler.createFolder(workspacePath.appending(components: ".build", "checkouts")) // When diff --git a/fixtures/app_with_alamofire/.gitignore b/fixtures/app_with_alamofire/.gitignore new file mode 100644 index 00000000000..24b244f9c45 --- /dev/null +++ b/fixtures/app_with_alamofire/.gitignore @@ -0,0 +1,70 @@ +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Xcode ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +/*.gcno + +### Projects ### +*.xcodeproj +*.xcworkspace + +### Tuist derived files ### +graph.dot +Derived/ + +### Tuist managed dependencies ### +Tuist/.build \ No newline at end of file diff --git a/fixtures/app_with_alamofire/.mise.toml b/fixtures/app_with_alamofire/.mise.toml new file mode 100644 index 00000000000..e0764061e43 --- /dev/null +++ b/fixtures/app_with_alamofire/.mise.toml @@ -0,0 +1,2 @@ +[tools] +tuist = "4.31.0" diff --git a/fixtures/app_with_alamofire/App/Sources/AppApp.swift b/fixtures/app_with_alamofire/App/Sources/AppApp.swift new file mode 100644 index 00000000000..7cb2ea61064 --- /dev/null +++ b/fixtures/app_with_alamofire/App/Sources/AppApp.swift @@ -0,0 +1,10 @@ +import SwiftUI + +@main +struct MyApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/fixtures/app_with_alamofire/App/Sources/ContentView.swift b/fixtures/app_with_alamofire/App/Sources/ContentView.swift new file mode 100644 index 00000000000..cc6c7d04b22 --- /dev/null +++ b/fixtures/app_with_alamofire/App/Sources/ContentView.swift @@ -0,0 +1,20 @@ +import Alamofire +import SwiftUI + +public struct ContentView: View { + public init() { + // Use Alamofire to make sure it links fine + _ = AF.download("http://www.tuist.io") + } + + public var body: some View { + Text("Hello, World!") + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/fixtures/app_with_alamofire/App/Tests/AppTests.swift b/fixtures/app_with_alamofire/App/Tests/AppTests.swift new file mode 100644 index 00000000000..70c453ba3f3 --- /dev/null +++ b/fixtures/app_with_alamofire/App/Tests/AppTests.swift @@ -0,0 +1,8 @@ +import Foundation +import XCTest + +final class AppTests: XCTestCase { + func test_twoPlusTwo_isFour() { + XCTAssertEqual(2 + 2, 4) + } +} diff --git a/fixtures/app_with_alamofire/Project.swift b/fixtures/app_with_alamofire/Project.swift new file mode 100644 index 00000000000..526d175689d --- /dev/null +++ b/fixtures/app_with_alamofire/Project.swift @@ -0,0 +1,25 @@ +import ProjectDescription + +let project = Project( + name: "App", + targets: [ + .target( + name: "App", + destinations: .iOS, + product: .app, + bundleId: "io.tuist.App", + infoPlist: .extendingDefault( + with: [ + "UILaunchScreen": [ + "UIColorName": "", + "UIImageName": "", + ], + ] + ), + sources: ["App/Sources/**"], + dependencies: [ + .external(name: "Alamofire"), + ] + ), + ] +) diff --git a/fixtures/app_with_alamofire/Tuist/Config.swift b/fixtures/app_with_alamofire/Tuist/Config.swift new file mode 100644 index 00000000000..37390c94e35 --- /dev/null +++ b/fixtures/app_with_alamofire/Tuist/Config.swift @@ -0,0 +1,9 @@ +import ProjectDescription + +let config = Config( + // Create an account with "tuist auth" and a project with "tuist project create" +// then uncomment the section below and set the project full-handle. +// * Read more: https://docs.tuist.io/guides/quick-start/gather-insights +// +// fullHandle: "{account_handle}/{project_handle}", +) diff --git a/fixtures/app_with_alamofire/Tuist/Package.resolved b/fixtures/app_with_alamofire/Tuist/Package.resolved new file mode 100644 index 00000000000..7ed14bc4828 --- /dev/null +++ b/fixtures/app_with_alamofire/Tuist/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "513521ee49ec3061a74d7ea2385bd4c841f71f7b1bc8cb2f6d6e8864cdd5eeea", + "pins" : [ + { + "identity" : "alamofire", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Alamofire/Alamofire", + "state" : { + "revision" : "e16d3481f5ed35f0472cb93350085853d754913f", + "version" : "5.10.1" + } + } + ], + "version" : 3 +} diff --git a/fixtures/app_with_alamofire/Tuist/Package.swift b/fixtures/app_with_alamofire/Tuist/Package.swift new file mode 100644 index 00000000000..af7ca183549 --- /dev/null +++ b/fixtures/app_with_alamofire/Tuist/Package.swift @@ -0,0 +1,20 @@ +// swift-tools-version: 6.0 +@preconcurrency import PackageDescription + +#if TUIST + import struct ProjectDescription.PackageSettings + + let packageSettings = PackageSettings( + // Customize the product types for specific package product + // Default is .staticFramework + // productTypes: ["Alamofire": .framework,] + productTypes: [:] + ) +#endif + +let package = Package( + name: "App", + dependencies: [ + .package(url: "https://github.com/Alamofire/Alamofire", from: "5.0.0"), + ] +) diff --git a/fixtures/app_with_spm_dependencies/App/Project.swift b/fixtures/app_with_spm_dependencies/App/Project.swift index 5ffe2d0e0a8..99fcb59f558 100644 --- a/fixtures/app_with_spm_dependencies/App/Project.swift +++ b/fixtures/app_with_spm_dependencies/App/Project.swift @@ -32,7 +32,6 @@ let project = Project( sources: "Sources/AppKit/**", dependencies: [ .sdk(name: "c++", type: .library, status: .required), - .external(name: "Alamofire"), .external(name: "ZipArchive"), .external(name: "Yams"), .external(name: "GoogleSignIn"), @@ -68,10 +67,7 @@ let project = Project( destinations: [.appleVision], product: .app, bundleId: "io.tuist.app.applevision", - sources: ["Sources/VisionOS/App/**"], - dependencies: [ - .external(name: "Alamofire"), - ] + sources: ["Sources/VisionOS/App/**"] ), .target( name: "WatchApp", @@ -93,10 +89,7 @@ let project = Project( destinations: [.appleWatch], product: .watch2Extension, bundleId: "io.tuist.app.watchapp.extension", - sources: ["Sources/Watch/Extension/**"], - dependencies: [ - .external(name: "Alamofire"), - ] + sources: ["Sources/Watch/Extension/**"] ), ], schemes: Scheme.allSchemes(for: ["App", "AppKit"], executable: "App") diff --git a/fixtures/app_with_spm_dependencies/App/Sources/AppKit/AppKit.swift b/fixtures/app_with_spm_dependencies/App/Sources/AppKit/AppKit.swift index 70d86ebe6cb..7f8189e6dba 100644 --- a/fixtures/app_with_spm_dependencies/App/Sources/AppKit/AppKit.swift +++ b/fixtures/app_with_spm_dependencies/App/Sources/AppKit/AppKit.swift @@ -1,4 +1,3 @@ -import Alamofire import AppCenter import AppCenterAnalytics import AppCenterCrashes @@ -15,9 +14,6 @@ import ZipArchive public enum AppKit { public static func start() { - // Use Alamofire to make sure it links fine - _ = AF.download("http://www.tuist.io") - // Use ZipArchive _ = SSZipArchive.createZipFile(atPath: #file + "/ss.zip", withFilesAtPaths: []) diff --git a/fixtures/app_with_spm_dependencies/Features/FeatureOne/Project.swift b/fixtures/app_with_spm_dependencies/Features/FeatureOne/Project.swift index d391680ec4e..e5e33a0eb3a 100644 --- a/fixtures/app_with_spm_dependencies/Features/FeatureOne/Project.swift +++ b/fixtures/app_with_spm_dependencies/Features/FeatureOne/Project.swift @@ -13,7 +13,6 @@ let project = Project( sources: ["Sources/*.{swift,m}"], headers: .headers(public: "Sources/*.h"), dependencies: [ - .external(name: "Alamofire"), .external(name: "UICKeyChainStore"), ], settings: .targetSettings @@ -24,9 +23,6 @@ let project = Project( product: .framework, bundleId: "io.tuist.featureOne", sources: ["Sources/**"], - dependencies: [ - .external(name: "Alamofire"), - ], settings: .targetSettings ), ], diff --git a/fixtures/app_with_spm_dependencies/Features/FeatureOne/Sources/FeatureOne.swift b/fixtures/app_with_spm_dependencies/Features/FeatureOne/Sources/FeatureOne.swift index c947075ef73..2dbcabe9e78 100644 --- a/fixtures/app_with_spm_dependencies/Features/FeatureOne/Sources/FeatureOne.swift +++ b/fixtures/app_with_spm_dependencies/Features/FeatureOne/Sources/FeatureOne.swift @@ -1,6 +1 @@ -import Alamofire - -public func start() { - // Use Alamofire to make sure it links fine - _ = AF.download("http://www.tuist.io") -} +public func start() {} diff --git a/fixtures/app_with_spm_dependencies/Tuist/Package.resolved b/fixtures/app_with_spm_dependencies/Tuist/Package.resolved index 27679134605..5934ddd73f6 100644 --- a/fixtures/app_with_spm_dependencies/Tuist/Package.resolved +++ b/fixtures/app_with_spm_dependencies/Tuist/Package.resolved @@ -1,15 +1,6 @@ { - "originHash" : "de5a39263681a457f5ae8b66c966e957674db1a5f0df7a4d6b21efe02017a4f2", + "originHash" : "9a6e24b070aa78532dbb80a41191cc4ad7642db968e619c88009323d1998c775", "pins" : [ - { - "identity" : "alamofire", - "kind" : "remoteSourceControl", - "location" : "https://github.com/Alamofire/Alamofire", - "state" : { - "revision" : "b2fa556e4e48cbf06cf8c63def138c98f4b811fa", - "version" : "5.8.0" - } - }, { "identity" : "appauth-ios", "kind" : "remoteSourceControl", diff --git a/fixtures/app_with_spm_dependencies/Tuist/Package.swift b/fixtures/app_with_spm_dependencies/Tuist/Package.swift index 5cce6d4a7de..af2df980393 100644 --- a/fixtures/app_with_spm_dependencies/Tuist/Package.swift +++ b/fixtures/app_with_spm_dependencies/Tuist/Package.swift @@ -17,7 +17,6 @@ let package = Package( name: "PackageName", dependencies: [ - .package(url: "https://github.com/Alamofire/Alamofire", exact: "5.8.0"), .package(url: "https://github.com/ZipArchive/ZipArchive", .upToNextMajor(from: "2.5.5")), .package(url: "https://github.com/jpsim/Yams", .upToNextMajor(from: "5.0.6")), .package(url: "https://github.com/google/GoogleSignIn-iOS", .upToNextMajor(from: "7.0.0")),