Skip to content

[6.1] Mark #expect(_:throws:) and #require(_:throws:) as to-be-deprecated.#879

Merged
grynspan merged 1 commit into
release/6.1from
jgrynspan/873-undeprecate-expect-throws-overloads-6.1
Jan 2, 2025
Merged

[6.1] Mark #expect(_:throws:) and #require(_:throws:) as to-be-deprecated.#879
grynspan merged 1 commit into
release/6.1from
jgrynspan/873-undeprecate-expect-throws-overloads-6.1

Conversation

@grynspan

@grynspan grynspan commented Jan 2, 2025

Copy link
Copy Markdown
Contributor

…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 grynspan added bug 🪲 Something isn't working documentation 📚 Improvements or additions to documentation public-api Affects public API labels Jan 2, 2025
@grynspan grynspan added this to the Swift 6.1 milestone Jan 2, 2025
@grynspan grynspan self-assigned this Jan 2, 2025
@grynspan

grynspan commented Jan 2, 2025

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@grynspan grynspan merged commit a9f21aa into release/6.1 Jan 2, 2025
@grynspan grynspan deleted the jgrynspan/873-undeprecate-expect-throws-overloads-6.1 branch January 2, 2025 21:44
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 public-api Affects public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants