uber/needle

Needle generate fails with extension on Swift 5.2 / Xcode 11.4

erikkerber opened this issue · 1 comments

The ASTUtils rely on a properties accessibility being returned from SourceKit:

https://github.com/uber/needle/blob/master/Generator/Sources/NeedleFramework/Utilities/ASTUtils.swift#L80

As of Swift 5.2 (Xcode 11.4), this does not populate for all properties. Particularly those in extensions:
apple/swift#28226

When running Needle generate via Xcode 11.4/Swift 5.2, the result can be rather stinky:

image

I'm not fluent in the nuances of SourceKit, but is there another way to get the accessibility of the property? For extensions, via its parent type perhaps?

@rudro With Swift 5.2 being released, do you see this internally at Uber?

We can fork and try to fix, but don't want to necessarily dupe any efforts.