Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Build failure on macOS 10.13 with Xcode 9 (swift 3.2) #106

Closed
fxcoudert opened this issue Oct 4, 2017 · 7 comments
Closed

Build failure on macOS 10.13 with Xcode 9 (swift 3.2) #106

fxcoudert opened this issue Oct 4, 2017 · 7 comments
Assignees

Comments

@fxcoudert
Copy link

Cannot build 0.5.0 on macOS 10.13 with Xcode 9:

$ swift build -c release -Xswiftc -static-stdlib
Compile Swift Module 'natalie' (14 sources)
natalie.XMLIndexer:72:22: error: invalid redeclaration of 'Element'
    public typealias Element = natalie.XMLIndexer
                     ^
/private/tmp/Natalie-0.5.0/Sources/natalie/SWXMLHash/SWXMLHash.swift:359:10: note: 'Element' previously declared here
    case Element(XMLElement)
         ^
error: terminated(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /private/tmp/Natalie-0.5.0/.build/release.yaml main
@phimage
Copy link
Collaborator

phimage commented Oct 10, 2017

You try to compile with swift 4.

The project has not been update for it. So you could find a way to use swift 3 until that.

@fxcoudert
Copy link
Author

I am using the Apple-provided tools (Xcode 9) on macOS 10.13. So Natalie is not supported on latest macOS or with Xcode 9?

@phimage
Copy link
Collaborator

phimage commented Oct 10, 2017

Xcode 9 could compile with swift 3.2
But by default swift 4

You could open the project with xcode and compile it

I do not know the command line argument to force swift version

@fxcoudert
Copy link
Author

If I open in Xcode and compile it I get the same error:

capture d ecran 2017-10-10 a 16 21 10

@phimage
Copy link
Collaborator

phimage commented Oct 10, 2017

I have not maybe due to some compile cash
But when I clean my project I have also the same error with swift 3,2

I you want to make a rapid patch
Edit SWXMLHash.swift
go to public enum XMLIndexer: Sequence {
and in next line rename case Element to case element using refactor (or replace each .Element to .element)

OR

SWXMLHash has been updated, but Nathalie provide a old version
You can try with this one if in swift 3.2
https://github.com/drmohundro/SWXMLHash/blob/master/Source/SWXMLHash.swift

@krzyzanowskim
Copy link
Owner

do you want to prepare PR with that update? I'm happy to merge

@phimage
Copy link
Collaborator

phimage commented Oct 11, 2017

I could, by updating SWXMLHash
You could assign to me this issue, if you want (a way to not forget)

@phimage phimage self-assigned this Oct 11, 2017
@phimage phimage changed the title Build failure on macOS 10.13 with Xcode 9 Build failure on macOS 10.13 with Xcode 9 (swift 3.2) Oct 11, 2017
krzyzanowskim added a commit that referenced this issue Oct 11, 2017
Fix compilation with Xcode 9 and swift 3.2 Fix #106
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants