Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Swifter' used both as module name and class name is problematic. This breaks debugging #347

Open
steipete opened this issue Apr 17, 2021 · 1 comment

Comments

@steipete
Copy link

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.

@alex-vasenin
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants