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

Undeprecate the various throws: expectation/requirements #873

Closed
glbrntt opened this issue Dec 20, 2024 · 2 comments · Fixed by #875
Closed

Undeprecate the various throws: expectation/requirements #873

glbrntt opened this issue Dec 20, 2024 · 2 comments · Fixed by #875
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation issue-handling Related to Issue handling within the testing library public-api Affects public API
Milestone

Comments

@glbrntt
Copy link

glbrntt commented Dec 20, 2024

Description

Various methods were deprecated in #780. We maintain a number of libraries, usually for the last three Swift versions, so having test methods deprecated is a little tedious as we either need to live with the deprecation warnings or use #if compiler(...) in our tests to use the most appropriate API. It'd be great if the deprecated APIs weren't actually deprecated and lived for few more Swift versions.

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

No response

swift-testing version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

No response

@glbrntt glbrntt added the bug Something isn't working label Dec 20, 2024
@grynspan
Copy link
Contributor

Should have been specified as deprecated: 100000 (API_TO_BE_DEPRECATED). My bad.

@grynspan grynspan added documentation Improvements or additions to documentation public-api Affects public API issue-handling Related to Issue handling within the testing library labels Dec 20, 2024
@grynspan grynspan added this to the Swift 6.x milestone Dec 20, 2024
@grynspan
Copy link
Contributor

Will need cherry-pick to 6.1.

@grynspan grynspan self-assigned this Dec 20, 2024
grynspan added a commit that referenced this issue Dec 21, 2024
These symbols should go through a transition period where they are documented as
to-be-deprecated rather than being deprecated outright. My mistake.

There is a bug in the DocC compiler that emits a diagnostic of the form:

> ⚠️ 'require(_:sourceLocation:performing:throws:)' isn't unconditionally deprecated

This issue is being tracked already with rdar://141785948.

Resolves #873.
grynspan added a commit that referenced this issue Dec 21, 2024
These symbols should go through a transition period where they are documented as
to-be-deprecated rather than being deprecated outright. My mistake.

With this change applied, Xcode treats these macros as deprecated (deemphasizing them in
autocomplete, for instance) and DocC marks them as deprecated in an unspecified Swift
version, but no warning is emitted if they are used. This is consistent with API marked
`API_TO_BE_DEPRECATED` or `deprecated: 100000.0` in Apple's SDKs.

> [!NOTE] There is a bug in the DocC compiler that emits a diagnostic of the form:
>
> > ⚠️ 'require(_:sourceLocation:performing:throws:)' isn't unconditionally deprecated
>
> This issue is being tracked already with rdar://141785948.

Resolves #873.
grynspan added a commit that referenced this issue Jan 2, 2025
…ed. (#875)

These symbols should go through a transition period where they are
documented as to-be-deprecated rather than being deprecated outright. My
mistake.

With this change applied, Xcode treats these macros as deprecated
(deemphasizing them in autocomplete, for instance) and DocC marks them
as deprecated in an unspecified Swift version, but no warning is emitted
if they are used. This is consistent with API marked
`API_TO_BE_DEPRECATED` or `deprecated: 100000.0` in Apple's SDKs.

> [!NOTE]
> There is a bug in the DocC compiler that emits a diagnostic of the
form:
>
> > ⚠️ 'require(_:sourceLocation:performing:throws:)' isn't
unconditionally deprecated
>
> This issue is being tracked already with rdar://141785948.

Resolves #873.

- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
grynspan added a commit that referenced this issue Jan 2, 2025
…precated. (#879)

- **Explanation**: We should have marked these changes as
to-be-deprecated, not hard-deprecated yet.
  - **Scope**: Swift 6.1, anybody using `#expect(throws:)`.
  - **Issues**: #873
- **Original PRs**: #875
  - **Risk**: Low, this is mostly just documentation changes.
  - **Testing**: Automated testing.
- **Reviewers**: @briancroom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation issue-handling Related to Issue handling within the testing library public-api Affects public API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants