[swift-dev] Categorization of warnings in Swift
jordan_rose at apple.com
Tue Jan 19 12:25:17 CST 2016
> On Jan 18, 2016, at 22:39 , Chris Lattner <clattner at apple.com> wrote:
>> On Jan 13, 2016, at 1:43 PM, Jordan Rose via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
>> Hi, Michael. As one of the people who's been a strong believer of "warning flags result in style dialects", I think it's important to establish a use case here. What will people actually do with warning categories? What warnings will we allow turning off? Under what contexts?
>> For the "variable never mutated" warning, you mentioned that this doesn't make sense in a rapid experimentation environment. I'd say more specifically that it doesn't make sense in code you're actively changing. But Live Issues should be able to know what code you're actively changing, and only suppress the warning there.
> Jordan, there is a class of warnings that we want to disable in Playgrounds, simply because they don’t make sense for that use case.
> You could argue that the IDE should just ignore certain errors in this case, but that leads to tight coupling and fragility, this is better managed by having there be a -Wno-playgrounds sort of flag, so we can manage it on the compiler side.
So far I haven't heard any warnings that make sense to disable globally in playgrounds. I can understand this as a stop-gap measure, but not a long-term one, and there's no real reason to expose a flag for it separate than the existing "playground mode".
Doug's point about migration warnings makes sense, though.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-dev