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

Update to manifest API to make it impossible to create an invalid target dependency condition. #4168

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Feb 23, 2022

motivation: reduce use of preconditions, make editing manifest safer

changes:

  • deprecate TargetDependencyCondition "when" initializor that uses a precondition
  • move TargetDependencyCondition code to a more appropriate place
  • add tests
  • update change log

…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
@tomerd tomerd force-pushed the fix/target-dependency-condition branch from a515d4d to 83bcb5c Compare February 23, 2022 18:10
@tomerd
Copy link
Contributor Author

tomerd commented Feb 23, 2022

@swift-ci please smoke test

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label 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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it will emit the availability warning and the users will need to change the code appropriately as they transition to 5.7

@abertelrud abertelrud self-requested a review February 23, 2022 23:16
@tomerd
Copy link
Contributor Author

tomerd commented Feb 24, 2022

@swift-ci please smoke test linux

3 similar comments
@tomerd
Copy link
Contributor Author

tomerd commented Feb 24, 2022

@swift-ci please smoke test linux

@tomerd
Copy link
Contributor Author

tomerd commented Feb 24, 2022

@swift-ci please smoke test linux

@tomerd
Copy link
Contributor Author

tomerd commented Feb 24, 2022

@swift-ci please smoke test linux

@tomerd
Copy link
Contributor Author

tomerd commented Feb 24, 2022

@swift-ci please smoke test Linux

@tomerd tomerd merged commit c7eef11 into swiftlang:main Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants