kylef / heroku-buildpack-swift

Heroku build pack for Swift
BSD 3-Clause "New" or "Revised" License
508 stars 0 forks source link

Swift 4 support #30

Closed PopFlamingo closed 7 years ago

PopFlamingo commented 7 years ago

Great buildpack thanks for that ! 👍

I tried to change Swift version to "4.0.0" in the script but I get the error:

remote: We don't have build instructions for 4.0.0.

Do you know how to fix this ?

Thank you

Trevör

PopFlamingo commented 7 years ago

By setting .swift-version file to:

4.0-DEVELOPMENT-SNAPSHOT-2017-09-05-a

I get this error:

remote: Cloning into 'swiftenv'... remote: -----> Installing 4.0-DEVELOPMENT-SNAPSHOT-2017-09-05-a remote: Apple does not provide binary releases for ubuntu16.04. remote: remote: You may manually install Swift and place it into: remote: /app/tmp/cache/swiftenv/versions/4.0-DEVELOPMENT-SNAPSHOT-2017-09-05-a

PopFlamingo commented 7 years ago

Doesn't Apple provide binaries for Ubuntu 16.04 ? Since it didn't worked I switched to Ubuntu 14.04 on Heroku, but now I get this error:

4.0-DEVELOPMENT-SNAPSHOT-2017-09-05-a was not found on swift.org. https://swift.org/builds/swift-4.0-DEVELOPMENT-branch/ubuntu1404/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-09-05-a/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-09-05-a-ubuntu14.04.tar.gz

From what I see, the URL of the binary is:

https://swift.org/builds/swift-4.0-branch/ubuntu1404/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-09-05-a/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-09-05-a-ubuntu14.04.tar.gz

So its not swift-4.0-DEVELOPMENT-branch but swift-4.0-branch

kylef commented 7 years ago

@adtrevor I think this should be fixed by 9f343b4c24891fd143384979a0a89e2cc0487de2, can you give it another go?

PopFlamingo commented 7 years ago

@kylef It solved the problem ! Thank you ! :)

PopFlamingo commented 7 years ago

@kylef About the error I had "Apple does not provide binary releases for ubuntu16.04." does your buildpack support Heroku 16 currently ?

kylef commented 7 years ago

remote: -----> Installing 4.0-DEVELOPMENT-SNAPSHOT-2017-09-05-a remote: Apple does not provide binary releases for ubuntu16.04.

I think this was due to the older version of swiftenv used at the time since it failed to find the version on Apples server due to the URL template format changing.

Are you seeing further problems after https://github.com/kylef/heroku-buildpack-swift/commit/9f343b4c24891fd143384979a0a89e2cc0487de2?

PopFlamingo commented 7 years ago

I got this error:

remote: -----> Swift app detected remote: Cloning into 'swiftenv'... remote: -----> Building Package remote: /app/tmp/cache/swiftenv/versions/4.0-DEVELOPMENT-SNAPSHOT-2017-09-05-a/usr/bin/swift-build: error while loading shared libraries: libicuuc.so.52: cannot open shared object file: No such file or directory

Could it be that the buildpack uses cached data that was originally for Ubuntu 16.04 ?

PopFlamingo commented 7 years ago

Just modified the Swift release I was using to the latest one (thus clearing the cache) and it worked (without warning about Linux version either !). Thank you !

I am also encountering another issue due to changes to the way Swift 4 SPM layouts products, I will open another issue.