Skip to content

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

Merged
tomerd merged 1 commit into
swiftlang:mainfrom
tomerd:fix/target-dependency-condition
Feb 24, 2022
Merged

Update to manifest API to make it impossible to create an invalid target dependency condition.#4168
tomerd merged 1 commit into
swiftlang:mainfrom
tomerd:fix/target-dependency-condition

Conversation

@tomerd

@tomerd tomerd commented Feb 23, 2022

Copy link
Copy Markdown
Contributor

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

tomerd commented Feb 23, 2022

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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
Copy Markdown
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

tomerd commented Feb 24, 2022

Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test linux

3 similar comments
@tomerd

tomerd commented Feb 24, 2022

Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test linux

@tomerd

tomerd commented Feb 24, 2022

Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test linux

@tomerd

tomerd commented Feb 24, 2022

Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test linux

@tomerd

tomerd commented Feb 24, 2022

Copy link
Copy Markdown
Contributor Author

@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