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

[SR-1473] Please support something like #warning for Swift code #44082

Closed
swift-ci opened this issue May 10, 2016 · 3 comments
Closed

[SR-1473] Please support something like #warning for Swift code #44082

swift-ci opened this issue May 10, 2016 · 3 comments
Assignees
Labels
compiler The Swift compiler in itself feature A feature request or implementation improvement

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-1473
Radar None
Original Reporter jalkut@red-sweater.com (JIRA User)
Type Improvement
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 2
Component/s Compiler
Labels Improvement, LanguageFeatureRequest
Assignee @harlanhaskins
Priority Medium

md5: 75f6703a6f7bdb515a54173e2be87cb1

Issue Description:

I'm in the habit of peppering my source code with #warning tags as part of my workflow. I'm sure I'm not the only one. See:

http://indiestack.com/2016/05/artificial-swift-warnings/

Is this something that we might see in Swift someday? Is there a philosophical objection to "false" warnings, or has this issue not been discussed?

@belkadan
Copy link
Contributor

I think it's mostly something that would get a lot of bikeshedding in the Swift Evolution Process. It would need some careful specification of how it interacts with #if.

@amomchilov
Copy link
Contributor

To keep the prepreprossor minimal, this could be implemented as a function, e.g. `warning("Warning text here")`. It would be nice to have similar support for `error`, too.

@harlanhaskins
Copy link
Collaborator

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself feature A feature request or implementation improvement
Projects
None yet
Development

No branches or pull requests

4 participants