Skip to content

Conditional target dependencies manifest api #2425

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

Conversation

hartbit
Copy link
Contributor

@hartbit hartbit commented Nov 27, 2019

Manifest API changes to support a future conditional target dependencies evolution proposal.

  • I reused the BuildSettingsCondition in PackageDescription.
  • I created a ManifestConditionDescription type to hold conditions in the manifest Target.Dependency cases.
  • I reused BuildSettingsCondition and renamed it to ManifestCondition to reflect its new status. Similarly, I moved PlatformsCondition and ConfigurationCondition into the global scope.

I also took the opportunity to make small improvements to the code:

  • I created a new BuildEnvironment type to name the platform + config tuple.
  • I added a satisfies(_:) requirement to the ManifestCondition protocol to move the verification logic into each conforming type.

Question: I wasn't sure if I could rename BuildSettingsCondition in PackageDescription without breaking backwards compatibility, so I left it as-is for now.

This PR is based on #2422, so it needs to be merged before this one.

@hartbit hartbit requested a review from aciidgh as a code owner November 27, 2019 18:02
@hartbit hartbit changed the title Conditional target dependencies manifest api WIP: Conditional target dependencies manifest api Nov 27, 2019
@hartbit hartbit force-pushed the conditional-target-dependencies-manifest-api branch 3 times, most recently from 037ad7c to cdda7de Compare December 6, 2019 10:32
@hartbit hartbit changed the title WIP: Conditional target dependencies manifest api Conditional target dependencies manifest api Dec 11, 2019
@hartbit hartbit force-pushed the conditional-target-dependencies-manifest-api branch 3 times, most recently from 13c666e to dcd72d4 Compare December 11, 2019 08:13
@hartbit hartbit force-pushed the conditional-target-dependencies-manifest-api branch from dcd72d4 to b426d12 Compare December 11, 2019 08:15
@hartbit
Copy link
Contributor Author

hartbit commented Dec 11, 2019

Closing to have only one PR -> #2428

@hartbit hartbit closed this Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant