Skip to content
This repository has been archived by the owner on Feb 8, 2021. It is now read-only.

fails to build on linux swift 3.0 preview 4 #201

Closed
chad3814 opened this issue Aug 13, 2016 · 9 comments
Closed

fails to build on linux swift 3.0 preview 4 #201

chad3814 opened this issue Aug 13, 2016 · 9 comments

Comments

@chad3814
Copy link

chad3814 commented Aug 13, 2016

I know it's probably not you favorite platform, but I'd love to use it in a server on linux. There are some errors building though:

~/Gloss$ swift build
Compile Swift Module 'Gloss' (6 sources)
/home/ubuntu/Gloss/Sources/Gloss.swift:78:35: error: argument labels '(identifier:)' do not match any available overloads
    dateFormatterISO8601.locale = Locale(identifier: "en_US_POSIX")
                                  ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/Gloss/Sources/Gloss.swift:78:35: note: overloads for 'Locale' exist with these partially matching parameter lists: (localeIdentifier: String), (coder: NSCoder)
    dateFormatterISO8601.locale = Locale(identifier: "en_US_POSIX")
                                  ^
/home/ubuntu/Gloss/Sources/Gloss.swift:82:43: error: type 'String' has no member 'gregorian'
    var gregorian = Calendar(identifier: .gregorian)
                                          ^~~~~~~~~
/home/ubuntu/Gloss/Sources/Decoder.swift:461:37: error: value of type 'String' has no member 'addingPercentEncoding'
                let encodedString = urlString.addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlQueryAllowed) {
                                    ^~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
Foundation.String:286:16: note: did you mean 'removingPercentEncoding'?
    public var removingPercentEncoding: String? { get }
               ^
/home/ubuntu/Gloss/Sources/Encoder.swift:84:45: error: value of type 'String' does not conform to expected dictionary value type 'AnyObject'
                return [key : dateFormatter.string(from: date)]
                              ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/home/ubuntu/Gloss/Sources/Encoder.swift:112:31: error: value of type '[String]' does not conform to expected dictionary value type 'AnyObject'
                return [key : dateStrings]
                              ^~~~~~~~~~~
/home/ubuntu/Gloss/Sources/Encoder.swift:153:31: error: value of type 'JSON' (aka 'Dictionary<String, AnyObject>') does not conform to expected dictionary value type 'AnyObject'
                return [key : json]
                              ^~~~
/home/ubuntu/Gloss/Sources/Encoder.swift:180:31: error: value of type '[JSON]' does not conform to expected dictionary value type 'AnyObject'
                return [key : encodedArray]
                              ^~~~~~~~~~~~
/home/ubuntu/Gloss/Sources/Encoder.swift:210:27: error: value of type '[String : JSON]' does not conform to expected dictionary value type 'AnyObject'
            return [key : encoded]
                          ^~~~~~~
/home/ubuntu/Gloss/Sources/Encoder.swift:239:27: error: value of type '[String : [JSON]]' does not conform to expected dictionary value type 'AnyObject'
            return [key : encoded]
                          ^~~~~~~
/home/ubuntu/Gloss/Sources/Encoder.swift:320:31: error: value of type '[NSNumber]' does not conform to expected dictionary value type 'AnyObject'
                return [key : numbers]
                              ^~~~~~~
/home/ubuntu/Gloss/Sources/Encoder.swift:360:19: error: value of type '[NSNumber]' does not conform to expected dictionary value type 'AnyObject'
                                return [key : numbers]
                                              ^~~~~~~
/home/ubuntu/Gloss/Sources/Encoder.swift:400:31: error: value of type '[NSNumber]' does not conform to expected dictionary value type 'AnyObject'
                return [key : numbers]
                              ^~~~~~~
/home/ubuntu/Gloss/Sources/Encoder.swift:440:19: error: value of type '[NSNumber]' does not conform to expected dictionary value type 'AnyObject'
                                return [key : numbers]
                                              ^~~~~~~
/home/ubuntu/Gloss/Sources/Encoder.swift:459:31: error: value of type 'String' does not conform to expected dictionary value type 'AnyObject'
                return [key : absoluteURLString]
                              ^~~~~~~~~~~~~~~~~
<unknown>:0: error: build had 1 command failures
error: exit(1): /home/ubuntu/swift-3.0-PREVIEW-4-ubuntu14.04/usr/bin/swift-build-tool -f /home/ubuntu/Gloss/.build/debug.yaml

(that was in the swift_3.0 branch, I'll see what I can fix and make a PR)

@hkellaway
Copy link
Owner

yeah, i don't use Linux and am not sure how to troubleshoot these issues really. 😕 would love to see that PR if you're able to

@tsheaff
Copy link

tsheaff commented Sep 12, 2016

@hkellaway semi-unrelated question — when will swift_3.0 branch be merged to master and pushed to pod trunk as a new version of the pod? I'm assuming a major version bump would be in order given that swift 3 breaks backwards-compatibility.

@hkellaway
Copy link
Owner

hkellaway commented Sep 13, 2016

@tsheaff good q. i've yet to have time to download the latest and make sure things are in working order. once i do so, yes - you'll see a new version

@ibakurov
Copy link

@hkellaway is it any timeline you could provide, just to schedule things properly?

@hkellaway
Copy link
Owner

@illyaBakurov i will work on it this coming weekend

@hkellaway
Copy link
Owner

will be giving it a once-over with fresh eyes tomorrow night then pushing to CocoaPods. branch release/1.0.0 can be pointed to in the meanwhile, if desired.

@hkellaway
Copy link
Owner

tried to push to the master CocoaPods repo tonight - but encountered error (CocoaPods/CocoaPods#5908). hope to resolve soon; apologies for delaying

@hkellaway
Copy link
Owner

version 1.0.0 has been released and is compatible with Swift 3.0! 🎉

@hkellaway
Copy link
Owner

i'm closing the original issue as preview 4 is no longer applicable

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

No branches or pull requests

4 participants