@@ -204,7 +204,11 @@ public struct Target: Equatable, Hashable, Comparable, Codable, Sendable {
204
204
}
205
205
}
206
206
207
- @available ( * , deprecated, renamed: " validatedSources() " )
207
+ @available ( * , deprecated, message: """
208
+ Whether a target supports sources or not is not as binary decision as we originally assumed and codified in this getter.
209
+ Because it's something that depends on other variables, we decided to pull this logic out of tuist/XcodeGraph into tuist/tuist.
210
+ If you are interested in having a similar logic in your XcodeGraph-dependent project, you might want to check out tuist/tuist.
211
+ """ )
208
212
/// Returns true if the target supports having sources.
209
213
public var supportsSources : Bool {
210
214
switch product {
@@ -218,27 +222,6 @@ public struct Target: Equatable, Hashable, Comparable, Codable, Sendable {
218
222
}
219
223
}
220
224
221
- /// This function validates the sources against other target metadata returning which sources from the list
222
- /// are valid and invalid.
223
- /// - Returns: A list of valid and invalid sources.
224
- public func validatedSources( ) -> ( valid: [ SourceFile ] , invalid: [ SourceFile ] ) {
225
- switch product {
226
- case . stickerPackExtension, . watch2App:
227
- return ( valid: [ ] , invalid: sources)
228
- case . bundle:
229
- if isExclusiveTo ( . macOS) {
230
- return ( valid: sources, invalid: [ ] )
231
- } else {
232
- return (
233
- valid: sources. filter { $0. path. extension == " metal " } ,
234
- invalid: [ ]
235
- )
236
- }
237
- default :
238
- return ( valid: sources, invalid: [ ] )
239
- }
240
- }
241
-
242
225
/// Returns true if the target deploys to more then one platform
243
226
public var isMultiplatform : Bool {
244
227
supportedPlatforms. count > 1
0 commit comments