Swifter
Swifter copied to clipboard
'Swifter' used both as module name and class name is problematic. This breaks debugging
Basically, this breaks debugging and library evolution (doesn't compile because of a name conflict)
Printing description of json:
expression produced error: error: /var/folders/80/mpcqcbzn44g0p4mrp671cg1h0000gn/T/expr58-4c5dd5..swift:1:73: error: 'JSON' is not a member type of class 'Swifter.Swifter'
Swift._DebuggerSupport.stringForPrintObject(Swift.UnsafePointer<Swifter.JSON>(bitPattern: 0x1063c56c0)!.pointee)
~~~~~~~ ^
Swifter.Swifter:1:14: note: 'Swifter' declared here
public class Swifter {
^
This is a big API-breaking change, so I know that this is trouble. I've renamed Swifter
to SwifterAPI
in my fork to fix this. There's a Swift library evolution issue to fix this eventually (so ::Swifter could be used to differ between module and class), but that's a long-term solution.
I'm also affected, though in a bit different way. I have Credential
struct in my app and Swift cannot disambiguate between my MyApp.Credential
and Swifter.Credential
because Swifter
is both class name and module name.