[swift-evolution] [Pitch] #warning

Callionica (Swift) swift-callionica at callionica.com
Mon May 30 10:22:04 CDT 2016


I've used custom warnings and errors in other languages and find them both
useful.

Forgive my ignorance, but does Swift have warning levels, warning IDs and
pragmas/build settings to disable specific warnings? If so, it would be
good to specify exactly how this feature interact with those.

For example, when viewing compiler messages produced by #warning/#error I
would expect there to be an indication (separate from the message produced)
that tells me what warning or error this is (in other words, an ID). The ID
is useful not just for humans reading or writing tools to parse build logs,
but also for connecting to external documentation describing the
warning/error in more detail, and for selectively disabling particular
warnings. If Swift has IDs for warnings and errors (surely?) then this
feature should too.

-- Callionica
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160530/30c0945e/attachment.html>


More information about the swift-evolution mailing list