Skip to content

[v2] Convert Dev project to Swift 6 #708

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

Merged
merged 11 commits into from
Jul 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/actions/run-tuist-generation/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ description: Installs and run Tuist to generate Xcode projects
runs:
using: "composite"
steps:
- uses: jdx/mise-action@v2
- name: Run Tuist
shell: bash
run: |
./scripts/install-tuist.sh
tuist generate
run: tuist generate
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Tests/TestCodeGenConfigurations/**/Podfile.lock
Tests/TestCodeGenConfigurations/**/TestMocks
Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageOne/**/*.graphql.swift
Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo
Tests/TestCodeGenConfigurations/CodegenXCFramework/CodegenXCFramework/MyAPI/**
!Tests/TestCodeGenConfigurations/**/SchemaConfiguration.swift
!Tests/TestCodeGenConfigurations/Other-CustomTarget/AnimalKingdomAPI/AnimalKingdomAPI.h
!Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/PackageTwo.swift
Expand Down
2 changes: 2 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
tuist = "4.55.6"
1 change: 0 additions & 1 deletion .tuist-version

This file was deleted.

1 change: 0 additions & 1 deletion Configuration/Shared/Project-Release.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

COPY_PHASE_STRIP = YES
DEPLOYMENT_POSTPROCESSING = YES
STRIP_INSTALLED_PRODUCT = YES
9 changes: 5 additions & 4 deletions Configuration/Shared/Workspace-Deployment-Targets.xcconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Base Deployment Targets
IPHONEOS_DEPLOYMENT_TARGET = 12.0
MACOSX_DEPLOYMENT_TARGET = 10.14.6
TVOS_DEPLOYMENT_TARGET = 12.0
WATCHOS_DEPLOYMENT_TARGET = 5.0
IPHONEOS_DEPLOYMENT_TARGET = 15.0
MACOSX_DEPLOYMENT_TARGET = 12.0
TVOS_DEPLOYMENT_TARGET = 15.0
WATCHOS_DEPLOYMENT_TARGET = 8.0
XROS_DEPLOYMENT_TARGET = 1.0

WARNING_CFLAGS[sdk=iphone*] = $(inherited) -DAPI_TO_BE_DEPRECATED=12_0
WARNING_CFLAGS[sdk=macosx*] = $(inherited) -DAPI_TO_BE_DEPRECATED=10_14
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Shared/Workspace-Language.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES
ENABLE_STRICT_OBJC_MSGSEND = YES

// Swift
SWIFT_VERSION = 5.0
SWIFT_VERSION = 6.0
SWIFT_PRECOMPILE_BRIDGING_HEADER = YES
SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(CONFIGURATION:upper)
SWIFT_SWIFT3_OBJC_INFERENCE = Off
2 changes: 0 additions & 2 deletions Configuration/Shared/Workspace-Packaging.xcconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
PRODUCT_NAME = $(TARGET_NAME)
PRODUCT_BUNDLE_IDENTIFIER = com.apollographql.$(TARGET_NAME:rfc1034identifier).$(PLATFORM_NAME)

ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
2 changes: 1 addition & 1 deletion Configuration/Shared/Workspace-Target-Codegen.xcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SDKROOT = macosx
SUPPORTED_PLATFORMS = macosx
MACOSX_DEPLOYMENT_TARGET = 10.15
MACOSX_DEPLOYMENT_TARGET = 12.0
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -1339,9 +1339,9 @@ public struct AllAnimalsDeferQuery: GraphQLQuery {

public static var responseFormat: ResponseFormat = IncrementalDeferredResponseFormat(
deferredFragments: [
DeferredFragmentIdentifiers.deferredPetAnimal: Data.AllAnimal.AsPet.DeferredPetAnimal.self,
DeferredFragmentIdentifiers.deferredCat: Data.AllAnimal.AsCat.DeferredCat.self,
DeferredFragmentIdentifiers.deferredDog: Data.AllAnimal.AsDog.DeferredDog.self,
DeferredFragmentIdentifiers.deferredPetAnimal: Data.AllAnimal.AsPet.DeferredPetAnimal.self,
DeferredFragmentIdentifiers.deferredCat: Data.AllAnimal.AsCat.DeferredCat.self,
DeferredFragmentIdentifiers.deferredDog: Data.AllAnimal.AsDog.DeferredDog.self,
]
)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public class Bird: MockObject {
public static let objectType: ApolloAPI.Object = AnimalKingdomAPI.Objects.Bird
Expand All @@ -26,17 +26,17 @@ public class Bird: MockObject {

public extension Mock where O == Bird {
convenience init(
bodyTemperature: Int? = nil,
favoriteToy: String? = nil,
height: Mock<Height>? = nil,
bodyTemperature: Int = 0,
favoriteToy: String = "",
height: Mock<Height> = Mock<Height>(),
humanName: String? = nil,
id: AnimalKingdomAPI.ID? = nil,
laysEggs: Bool? = nil,
id: AnimalKingdomAPI.ID = "",
laysEggs: Bool = false,
owner: Mock<Human>? = nil,
predators: [(any AnyMock)]? = nil,
predators: [(any AnyMock)] = [],
skinCovering: GraphQLEnum<AnimalKingdomAPI.SkinCovering>? = nil,
species: String? = nil,
wingspan: Double? = nil
species: String = "",
wingspan: Double = 0.0
) {
self.init()
_setScalar(bodyTemperature, for: \.bodyTemperature)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public class Cat: MockObject {
public static let objectType: ApolloAPI.Object = AnimalKingdomAPI.Objects.Cat
Expand All @@ -26,17 +26,17 @@ public class Cat: MockObject {

public extension Mock where O == Cat {
convenience init(
bodyTemperature: Int? = nil,
favoriteToy: String? = nil,
height: Mock<Height>? = nil,
bodyTemperature: Int = 0,
favoriteToy: String = "",
height: Mock<Height> = Mock<Height>(),
humanName: String? = nil,
id: AnimalKingdomAPI.ID? = nil,
isJellicle: Bool? = nil,
laysEggs: Bool? = nil,
id: AnimalKingdomAPI.ID = "",
isJellicle: Bool = false,
laysEggs: Bool = false,
owner: Mock<Human>? = nil,
predators: [(any AnyMock)]? = nil,
predators: [(any AnyMock)] = [],
skinCovering: GraphQLEnum<AnimalKingdomAPI.SkinCovering>? = nil,
species: String? = nil
species: String = ""
) {
self.init()
_setScalar(bodyTemperature, for: \.bodyTemperature)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public class Crocodile: MockObject {
public static let objectType: ApolloAPI.Object = AnimalKingdomAPI.Objects.Crocodile
Expand All @@ -22,12 +22,12 @@ public class Crocodile: MockObject {

public extension Mock where O == Crocodile {
convenience init(
age: Int? = nil,
height: Mock<Height>? = nil,
id: AnimalKingdomAPI.ID? = nil,
predators: [(any AnyMock)]? = nil,
age: Int = 0,
height: Mock<Height> = Mock<Height>(),
id: AnimalKingdomAPI.ID = "",
predators: [(any AnyMock)] = [],
skinCovering: GraphQLEnum<AnimalKingdomAPI.SkinCovering>? = nil,
species: String? = nil,
species: String = "",
tag: String? = nil
) {
self.init()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public class Dog: MockObject {
public static let objectType: ApolloAPI.Object = AnimalKingdomAPI.Objects.Dog
Expand All @@ -28,17 +28,17 @@ public class Dog: MockObject {
public extension Mock where O == Dog {
convenience init(
birthdate: AnimalKingdomAPI.CustomDate? = nil,
bodyTemperature: Int? = nil,
favoriteToy: String? = nil,
height: Mock<Height>? = nil,
bodyTemperature: Int = 0,
favoriteToy: String = "",
height: Mock<Height> = Mock<Height>(),
houseDetails: AnimalKingdomAPI.Object? = nil,
humanName: String? = nil,
id: AnimalKingdomAPI.ID? = nil,
laysEggs: Bool? = nil,
id: AnimalKingdomAPI.ID = "",
laysEggs: Bool = false,
owner: Mock<Human>? = nil,
predators: [(any AnyMock)]? = nil,
predators: [(any AnyMock)] = [],
skinCovering: GraphQLEnum<AnimalKingdomAPI.SkinCovering>? = nil,
species: String? = nil
species: String = ""
) {
self.init()
_setScalar(birthdate, for: \.birthdate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public class Fish: MockObject {
public static let objectType: ApolloAPI.Object = AnimalKingdomAPI.Objects.Fish
Expand All @@ -23,14 +23,14 @@ public class Fish: MockObject {

public extension Mock where O == Fish {
convenience init(
favoriteToy: String? = nil,
height: Mock<Height>? = nil,
favoriteToy: String = "",
height: Mock<Height> = Mock<Height>(),
humanName: String? = nil,
id: AnimalKingdomAPI.ID? = nil,
id: AnimalKingdomAPI.ID = "",
owner: Mock<Human>? = nil,
predators: [(any AnyMock)]? = nil,
predators: [(any AnyMock)] = [],
skinCovering: GraphQLEnum<AnimalKingdomAPI.SkinCovering>? = nil,
species: String? = nil
species: String = ""
) {
self.init()
_setScalar(favoriteToy, for: \.favoriteToy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public class Height: MockObject {
public static let objectType: ApolloAPI.Object = AnimalKingdomAPI.Objects.Height
Expand All @@ -20,11 +20,11 @@ public class Height: MockObject {

public extension Mock where O == Height {
convenience init(
centimeters: Double? = nil,
feet: Int? = nil,
centimeters: Double = 0.0,
feet: Int = 0,
inches: Int? = nil,
meters: Int? = nil,
relativeSize: GraphQLEnum<AnimalKingdomAPI.RelativeSize>? = nil
meters: Int = 0,
relativeSize: GraphQLEnum<AnimalKingdomAPI.RelativeSize> = .case(.large)
) {
self.init()
_setScalar(centimeters, for: \.centimeters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public class Human: MockObject {
public static let objectType: ApolloAPI.Object = AnimalKingdomAPI.Objects.Human
Expand All @@ -23,14 +23,14 @@ public class Human: MockObject {

public extension Mock where O == Human {
convenience init(
bodyTemperature: Int? = nil,
firstName: String? = nil,
height: Mock<Height>? = nil,
id: AnimalKingdomAPI.ID? = nil,
laysEggs: Bool? = nil,
predators: [(any AnyMock)]? = nil,
bodyTemperature: Int = 0,
firstName: String = "",
height: Mock<Height> = Mock<Height>(),
id: AnimalKingdomAPI.ID = "",
laysEggs: Bool = false,
predators: [(any AnyMock)] = [],
skinCovering: GraphQLEnum<AnimalKingdomAPI.SkinCovering>? = nil,
species: String? = nil
species: String = ""
) {
self.init()
_setScalar(bodyTemperature, for: \.bodyTemperature)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public extension MockObject {
typealias Animal = Interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public extension MockObject {
typealias ClassroomPet = Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public class Mutation: MockObject {
public static let objectType: ApolloAPI.Object = AnimalKingdomAPI.Objects.Mutation
Expand All @@ -16,7 +16,7 @@ public class Mutation: MockObject {

public extension Mock where O == Mutation {
convenience init(
adoptPet: (any AnyMock)? = nil
adoptPet: (any AnyMock) = Mock<Cat>()
) {
self.init()
_setEntity(adoptPet, for: \.adoptPet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public class PetRock: MockObject {
public static let objectType: ApolloAPI.Object = AnimalKingdomAPI.Objects.PetRock
Expand All @@ -19,9 +19,9 @@ public class PetRock: MockObject {

public extension Mock where O == PetRock {
convenience init(
favoriteToy: String? = nil,
favoriteToy: String = "",
humanName: String? = nil,
id: AnimalKingdomAPI.ID? = nil,
id: AnimalKingdomAPI.ID = "",
owner: Mock<Human>? = nil
) {
self.init()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was automatically generated and should not be edited.

import ApolloTestSupport
import AnimalKingdomAPI
@testable import AnimalKingdomAPI

public class Query: MockObject {
public static let objectType: ApolloAPI.Object = AnimalKingdomAPI.Objects.Query
Expand All @@ -19,10 +19,10 @@ public class Query: MockObject {

public extension Mock where O == Query {
convenience init(
allAnimals: [(any AnyMock)]? = nil,
allAnimals: [(any AnyMock)] = [],
classroomPets: [(any AnyMock)?]? = nil,
findPet: [(any AnyMock)]? = nil,
pets: [(any AnyMock)]? = nil
findPet: [(any AnyMock)] = [],
pets: [(any AnyMock)] = []
) {
self.init()
_setList(allAnimals, for: \.allAnimals)
Expand Down
Loading
Loading