Skip to content

Conversation

@FranzBusch
Copy link
Member

@FranzBusch FranzBusch commented Dec 23, 2021

Motivation:

SPM has built in functionality to check the API of modules against a target git treeish. We can use this to simplify our check_no_api_breakages.sh script. Closes #1239

Modifications:

This PR, exchanges the direct calls to Swift's API checker with the new SPM diagnose-api-breaking-changes tool. This allows us to get rid of the manual module parsing, build invocations and result comparisons.

Result:

We are now using SPMs diagnose-api-breaking-changes to check for breaking changes.

@FranzBusch
Copy link
Member Author

@swift-server-bot test this please

1 similar comment
@FranzBusch
Copy link
Member Author

@swift-server-bot test this please

@FranzBusch FranzBusch force-pushed the feature/use-spm-api-breaking-checker branch 10 times, most recently from 779f21a to 40c7aba Compare December 27, 2021 15:49
@FranzBusch FranzBusch force-pushed the feature/use-spm-api-breaking-checker branch 5 times, most recently from d01da7c to 2bec037 Compare December 30, 2021 10:23
@FranzBusch FranzBusch linked an issue Dec 30, 2021 that may be closed by this pull request
@FranzBusch FranzBusch changed the title [WIP] Try to use the SPM API breaking checker Use SPM breaking changes checker Dec 30, 2021
@FranzBusch
Copy link
Member Author

@FranzBusch FranzBusch marked this pull request as ready for review December 30, 2021 10:24
@FranzBusch
Copy link
Member Author

@weissi @Lukasa since the diagnose-api-breaking-changes is only available in the nightly toolchains I would suggest us to move the api breakage pipeline to the docker-compose.2004.main.yaml docker setup. I also tried to use the experimental tool that is shipped with 5.5 but I ran into several errors that have been fixed on main already. What do you think about using the other docker setup for the api breaking checks?

@glbrntt
Copy link
Contributor

glbrntt commented Jan 4, 2022

@weissi @Lukasa since the diagnose-api-breaking-changes is only available in the nightly toolchains I would suggest us to move the api breakage pipeline to the docker-compose.2004.main.yaml docker setup. I also tried to use the experimental tool that is shipped with 5.5 but I ran into several errors that have been fixed on main already. What do you think about using the other docker setup for the api breaking checks?

I'd rather stick to a released version to avoid dealing with potential problems associated with nightly toolchains (compiler crashes etc.) and revisit this when the tool is no longer experimental.

@FranzBusch
Copy link
Member Author

@glbrntt I spoke with @fabianfett yesterday about this as well and we came to the same conclusion. Let's put this PR on hold until the tool lands in a released Swift version and then we can revisit it.

@FranzBusch FranzBusch force-pushed the feature/use-spm-api-breaking-checker branch from 2bec037 to cb01117 Compare March 21, 2022 10:20
@FranzBusch
Copy link
Member Author

@swift-server-bot test this please

@FranzBusch
Copy link
Member Author

@FranzBusch FranzBusch force-pushed the feature/use-spm-api-breaking-checker branch from c97a538 to cb01117 Compare March 22, 2022 13:38
@FranzBusch FranzBusch requested a review from weissi March 22, 2022 13:40
@FranzBusch FranzBusch requested a review from Lukasa March 22, 2022 13:40
Copy link
Member

@weissi weissi left a comment

Choose a reason for hiding this comment

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

This is fantastic, thank you!

### Motivation:

SPM has built in functionality to check the API of modules against a target git treeish. We can use this to simplify our `check_no_api_breakages.sh` script. Closes apple#1239

### Modifications:

This PR, exchanges the direct calls to Swift's API checker with the new SPM `diagnose-api-breaking-changes` tool. This allows us to get rid of the manual module parsing, build invocations and result comparisons.

### Result:

We are now using SPMs `diagnose-api-breaking-changes` to check for breaking changes.
@FranzBusch FranzBusch force-pushed the feature/use-spm-api-breaking-checker branch from cb01117 to bf6577a Compare March 22, 2022 14:10
@FranzBusch FranzBusch enabled auto-merge (squash) March 22, 2022 14:10
@FranzBusch FranzBusch merged commit d6e3762 into apple:main Mar 22, 2022
@FranzBusch FranzBusch deleted the feature/use-spm-api-breaking-checker branch March 22, 2022 14:41
@FranzBusch FranzBusch added the semver/none No version bump required. label Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

switch to SwiftPM's swift package experimental-api-diff

3 participants