This repository was archived by the owner on Feb 26, 2026. It is now read-only.
feat: Add Target.validatedSources to filter the sources that are invalid#153
Merged
feat: Add Target.validatedSources to filter the sources that are invalid#153
Target.validatedSources to filter the sources that are invalid#153Conversation
fortmarek
reviewed
Mar 17, 2025
Comment on lines
+221
to
+224
| /// This function validates the sources against other target metadata returning which sources from the list | ||
| /// are valid and invalid. | ||
| /// - Returns: A list of valid and invalid sources. | ||
| public func validatedSources() -> (valid: [SourceFile], invalid: [SourceFile]) { |
Member
There was a problem hiding this comment.
wdyt about moving this to tuist/tuist instead? I don't see this as high value having in XcodeGraph and any convenience function we end up having here means we need to keep backwards compatible.
Contributor
Author
There was a problem hiding this comment.
Good idea. I removed it from here and marked the existing supportsSources as deprecated.
fortmarek
approved these changes
Mar 18, 2025
af21ee5 to
c285443
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tuist was previously using
Target.supportsSourcesto check whether a target supports or not sources, but it turns out it's not just a binary decision based on the product. For instance,.metalfiles can be added as sources to bundle targets.This PR deprecates
Target.supportsSourcesin favor of a more flexible alternative,Target.validatedSources.