Update to manifest API to make it impossible to create an invalid target dependency condition.#4168
Merged
Conversation
…get dependency condition. motivation: reduce use of preconditions, make editing manifest safer changes: * deprecate TargetDependencyCondition "when" initializor that uses a precondition * move TargetDependencyCondition code to a more approprate place * add tests * update change log
a515d4d to
83bcb5c
Compare
Contributor
Author
|
@swift-ci please smoke test |
abertelrud
reviewed
Feb 23, 2022
| /// - Parameters: | ||
| /// - platforms: The applicable platforms for this target dependency condition. | ||
| @_disfavoredOverload | ||
| @available(_PackageDescription, obsoleted: 5.7, message: "using .when with nil platforms is obsolete") |
Contributor
There was a problem hiding this comment.
Will this warning also trigger if my manifest assigns the platform to a variable of type [Platform]?? I'm not sure how interesting that case is, but I could see a manifest doing that if it somehow conditionalized whether there are conditions.
Contributor
Author
There was a problem hiding this comment.
yes it will emit the availability warning and the users will need to change the code appropriately as they transition to 5.7
abertelrud
approved these changes
Feb 23, 2022
Contributor
Author
|
@swift-ci please smoke test linux |
3 similar comments
Contributor
Author
|
@swift-ci please smoke test linux |
Contributor
Author
|
@swift-ci please smoke test linux |
Contributor
Author
|
@swift-ci please smoke test linux |
Contributor
Author
|
@swift-ci please smoke test Linux |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
motivation: reduce use of preconditions, make editing manifest safer
changes: