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

The naming of 'Element' from SWXMLHash.XMLIndexer causes a build failure in Xcode 9 #140

Closed
jacquelinelee opened this issue Jun 9, 2017 · 6 comments
Labels

Comments

@jacquelinelee
Copy link

I found a related issue on the apple swift bugs site: https://bugs.swift.org/browse/SR-4951

When I attempt to build with SWXMLHash on Xcode 9, I encounter the following error:
SWXMLHash.XMLIndexer:72:22: error: invalid redeclaration of 'Element'
public typealias Element = (SWXMLHash.XMLIndexer)

I can rename 'Element' (at line 457 of SWXMLHash.swift) to 'element' using Xcode9's new rename feature and my build works.

@drmohundro
Copy link
Owner

Have you checked out the latest version 4.0.0? Via #133? That should have introduced the rename from Element to element along with other enum renames which should have resolved this.

@skofgar
Copy link

skofgar commented Jun 9, 2017

Thanks @drmohundro – using 4.0.0 resolved the problem for me

@codeslubber
Copy link

The code compiles now, but the implementation of the Sequence Protocol was dropped from XMLIndexer, which is causing issues in our code?

@drmohundro
Copy link
Owner

Is your current usage for val in xml["elem"]?

If so, just add .all at the end - it does the same as the prior approach did.

@codeslubber
Copy link

Yah we figured it out, thanks.

@drmohundro
Copy link
Owner

Closing this as I think this should be resolved.

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

No branches or pull requests

4 participants