Re:New Diagnostic Architecture Overview
by pohl on Thursday October 17, 2019 @04:46PM
(#21286210)
Compiler errors in SwiftUI have been especially unhelpful. Is this something that this effort is intended to improve?
[ Parent
| on HN ]
Re:New Diagnostic Architecture Overview
by stirner on Thursday October 17, 2019 @10:04PM
(#21288040)
I’ve noticed that when editing the ContentView in SwiftUI, errors will sometimes be attached to a totally unrelated line (OTOH, forgetting to unwrap an optional returned by NumberFormatter.string() showed
type of expression is ambiguous without more context
on a straightforward Text() expression halfway up the file). The only way to find the actual source of the error is to undo every change until the error disappears, and coupled with sluggish compilation times this becomes a real pain. I hope they address this issue as part of their improvements.
Re:New Diagnostic Architecture Overview
by msbarnett on Thursday October 17, 2019 @10:26PM
(#21288132)
This is literally given as an example in the article. No hope required.
Oh wow, you’re right, at the very top. Skimmed right over that. Thanks for pointing it out.
I guess SwiftUI exacerbates the problem since expressions are necessarily very deeply nested.
Re:New Diagnostic Architecture Overview
by msbarnett on Saturday October 19, 2019 @02:32PM
(#21299962)
The last example in the SwiftUI section is also an “ambiguous type expression” example with a fairly complex nested view.
It seems to be a problematic diagnostic they have particularly focused on resolving.
Yes, SwiftUI diagnostics in particular are going to benefit from these changes.
Re:New Diagnostic Architecture Overview
by msbarnett on Thursday October 17, 2019 @05:00PM
(#21286321)
The article gives several examples of areas in which these changes have particularly made big improvements to common error messages one might see while working with SwiftUI
Re:New Diagnostic Architecture Overview
by bobbylarrybobby on Thursday October 17, 2019 @05:36PM
(#21286567)
Did you read the article?
"Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that.""