Skip to content

TypeCheckType: Unconditionally warn about missing existential any until a future language mode #78459

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 3 commits into from
Feb 14, 2025

Conversation

AnthonyLatsis
Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis commented Jan 7, 2025

#72659 turned out to have some source compatibility fallout that we need to fix. Instead of introducing yet another brittle compatibility hack, stop emitting errors about a missing any altogether until a future language mode.

Besides resolving the compatibility issue, this will encourage developers to adopt any sooner and grant us ample time to gracefully address any remaining bugs before the source compatibility burden resurfaces.

Users can still escalate these warnings to errors with -Werror ExistentialAny.

@AnthonyLatsis AnthonyLatsis changed the title TypeCheckType: Do not error about missing existential any until Swift 7 TypeCheckType: Warn, not error, about missing existential any until Swift 7 Jan 7, 2025
@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

…ntil Swift 7

swiftlang#72659 turned out to have some
source compatibility fallout that we need to fix. Instead of introducing
yet another brittle compatibility hack, stop emitting errors about a
missing `any` altogether until a future language mode.

Besides resolving the compatibility issue, this will encourage
developers to adopt any sooner and grant us ample time to gracefully
address any remaining bugs before the source compatibility burden
resurfaces.

A subsequent commit adds a diagnostic group that will allow users to
escalate these warnings to errors with `-Werror ExistentialAny`.
@AnthonyLatsis AnthonyLatsis changed the title TypeCheckType: Warn, not error, about missing existential any until Swift 7 TypeCheckType: Unconditionally warn about missing existential any until Swift 7 Feb 12, 2025
Allow users to escalate `any` syntax warnings to errors with
`-Werror ExistentialAny`.
@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please test source compatibility release

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test Windows

@AnthonyLatsis
Copy link
Collaborator Author

penny-bot failure unrelated.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test Linux

@AnthonyLatsis AnthonyLatsis merged commit e8b3934 into swiftlang:main Feb 14, 2025
3 of 4 checks passed
@AnthonyLatsis AnthonyLatsis deleted the tuber-magnatum-2 branch February 14, 2025 19:12
@AnthonyLatsis AnthonyLatsis changed the title TypeCheckType: Unconditionally warn about missing existential any until Swift 7 TypeCheckType: Unconditionally warn about missing existential any until a future language mode Feb 17, 2025
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.

2 participants