Skip to content
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

fix: Local cache mutation build error in Swift 6 #417

Merged
merged 7 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
334 changes: 0 additions & 334 deletions .github/workflows/ci-tests-xcode-beta.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,6 @@ class SelectionSetTemplate_LocalCacheMutationTests: XCTestCase {
public var animalDetails: AnimalDetails {
get { _toFragment() }
_modify { var f = animalDetails; yield &f; __data = f.__data }
@available(*, unavailable, message: "mutate properties of the fragment instead.")
set { preconditionFailure() }
}
"""

Expand Down Expand Up @@ -381,8 +379,6 @@ class SelectionSetTemplate_LocalCacheMutationTests: XCTestCase {
public var animalDetails: AnimalDetails? {
get { _toFragment() }
_modify { var f = animalDetails; yield &f; if let newData = f?.__data { __data = newData } }
@available(*, unavailable, message: "mutate properties of the fragment instead.")
set { preconditionFailure() }
}
"""

Expand Down
4 changes: 0 additions & 4 deletions Tests/ApolloTests/Cache/ReadWriteFromStoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,6 @@ class ReadWriteFromStoreTests: XCTestCase, CacheDependentTesting, StoreLoading {
var givenFragment: GivenFragment {
get { _toFragment() }
_modify { var f = givenFragment; yield &f; __data = f.__data }
@available(*, unavailable, message: "mutate properties of the fragment instead.")
set { preconditionFailure() }
}
}
}
Expand Down Expand Up @@ -1204,8 +1202,6 @@ class ReadWriteFromStoreTests: XCTestCase, CacheDependentTesting, StoreLoading {
var givenFragment: GivenFragment? {
get { _toFragment() }
_modify { var f = givenFragment; yield &f; if let newData = f?.__data { __data = newData } }
@available(*, unavailable, message: "mutate properties of the fragment instead.")
set { preconditionFailure() }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,6 @@ struct SelectionSetTemplate {
"if let newData = f?.__data { __data = newData }",
else: "__data = f.__data"
) }
@available(*, unavailable, message: "mutate properties of the fragment instead.")
set { preconditionFailure() }
}
""",
else: " _toFragment() }"
Expand Down
2 changes: 0 additions & 2 deletions apollo-ios/Sources/ApolloAPI/LocalCacheMutation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ public extension MutableSelectionSet where Fragments: FragmentContainer {
yield &f
self.__data._data = f.__data._data
}
@available(*, unavailable, message: "mutate properties of the fragment instead.")
set { preconditionFailure("") }
}
}

Expand Down
Loading