-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Re-enable APIDiff tests #8196
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
Merged
Merged
Re-enable APIDiff tests #8196
Conversation
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
The tests rely on Swift compiler version later than 5.5, but the guard condition didn't age well: the tests are skipped on 6.0.2 and 6.2-dev nightly. The change updates the skipping guard to explicitly check for version 6.0-or-later.
The two modified tests started failing after implementation change of the underlying tool. Imports stopped being considered breaking changes by itself in swiftlang/swift#63554.
Since swiftlang#3697 the APIDiff tests were opt-in which set expectation that the tests should skip by default. This change makes the APIDiff tests to run by default so then we could rely on CI status and assurance of test coverage.
@swift-ci test |
plemarquand
reviewed
Jan 6, 2025
plemarquand
approved these changes
Jan 6, 2025
bkhouri
reviewed
Jan 7, 2025
bkhouri
reviewed
Jan 7, 2025
diagnose-api-breaking-changes output errors like: ``` 1 breaking change detected in Baz: 💔 API breakage: enumelement Baz.b has been added as a new enum case ``` The change switches from asserting that `Baz` was present to asserting that pattern matches `N breaking changes detected in Baz`. Negative asserts (XCTAssertNoMatch) remains as permissive as possible, to allow more room for detecting a failure.
bkhouri
approved these changes
Jan 8, 2025
@swift-ci please test |
bkhouri
pushed a commit
that referenced
this pull request
Jan 23, 2025
- Description: Fix build error for `diagnose-api-breaking-changes` command when C code is in non-standard location - Scope: Package - Risk: Low - Testing: New test for this specific scenario. However, the test suite is deactivated in 6.1 unless [#8196](#8196) is cherry-picked too. - Issue: #8073 - Cherry-picked from: #8209 - Author: @yyvch - Reviewers: @plemarquand @jakepetroules
bripeticca
pushed a commit
to bripeticca/swift-package-manager
that referenced
this pull request
Feb 28, 2025
Re-enable APIDiff tests. ### Motivation: I noticed that APIDiff tests are skipped when using most recent Swift (confirmed on 6.0.2 on MacOS, 6.0.3 on Linux and 6.2-dev nightly on Linux). Upon enabling I noticed that 2 tests are failing. ### Modifications: - Enable the test suite by modifying condition from implicit versioning to explicit versioning - Update the test suite to be run by default - Adjust asserts to be less brittle for `testFilters` and `testCheckVendedModulesOnly` ### Result: - Tests are run by default - All tests pass (verified on 6.0.2 on MacOS, 6.0.3 on Linux and 6.2-dev-2024-12-22-a nightly on Linux)
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.
Re-enable APIDiff tests.
Motivation:
I noticed that APIDiff tests are skipped when using most recent Swift (confirmed on 6.0.2 on MacOS, 6.0.3 on Linux and 6.2-dev nightly on Linux). Upon enabling I noticed that 2 tests are failing.
Modifications:
testFilters
andtestCheckVendedModulesOnly
Result: