@@ -204,7 +204,11 @@ public struct Target: Equatable, Hashable, Comparable, Codable, Sendable {
204204 }
205205 }
206206
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+ """ )
208212 /// Returns true if the target supports having sources.
209213 public var supportsSources : Bool {
210214 switch product {
@@ -218,27 +222,6 @@ public struct Target: Equatable, Hashable, Comparable, Codable, Sendable {
218222 }
219223 }
220224
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-
242225 /// Returns true if the target deploys to more then one platform
243226 public var isMultiplatform : Bool {
244227 supportedPlatforms. count > 1
0 commit comments