Closed mgrebenets closed 5 years ago
watch os are not supported but must be skipped the expected error thrown by IBDecodable https://github.com/IBDecodable/IBDecodable/blob/e9b642b6e8e1dc77ae9f139286197cd5bde754f0/Sources/Parsers/InterfaceBuilderParser.swift#L74
I see, so all IBLinter users should ignore WatchKit storyboards then...
Just curious, instead of crashing, could IBLinter display a warning saying "WatchKit storyboards are not supported" or just skip them silently? I guess any kind of warning would be better than the crash.
I've spend some time digging into our WatchKit storyboard trying to understand where exactly it is broken.
the issue is for any malformed xml as I see (like empty one from test)
We receive a not converted/catched IndexingError from XML decoding library XML Element Error: Incorrect key ["archive"]
error thrown by https://github.com/IBDecodable/IBDecodable/blob/e9b642b6e8e1dc77ae9f139286197cd5bde754f0/Sources/Parsers/InterfaceBuilderParser.swift#L67
solution: Upgrade IBDecodable dependencies, update to swift 5 Add a new error case Error.indexingError(IndexingError), manage it catch IndexingError at previous mentioned line to create Error.indexingError
The XML in question is WatchKit storyboard. I couldn’t paste the full version. Will try to create fresh WatchKit storyboard instead and see if it still causes same issue.
Other than that the XML that I have renders properly in interface builder and lints fine with xmllint tool.
I make I think the necessary change in IBDecodable project
A violation must be created from Error.xmlError
and no more fatalError
when new version of IBDecodable will be integrated here
Tested just now, I get the warning now
... warning: Parse XML error XML Element Error: Incorrect key ["archive"]
Which is much better than a crash from before đź‘Ť
Hi there
We've got one WatchKit app storyboard, that seems to cause trouble for IBLinter and causes it to crash.
The error is this:
The storyboard renders in Xcode properly, I've checked it with
xmllint
and it reported no errors. I can't even find a key called "archived" inside storyboard XML file 🤔not sure what's the root cause.
Out of curiosity, I've removed everything from the storyboard and only this was left:
still causes the same crash.