kylef-archive / curassow-example-helloworld Goto Github PK
View Code? Open in Web Editor NEWExample Swift web application that can be deployed to Heroku
Example Swift web application that can be deployed to Heroku
Just gave this a try with the heroku deploy button, but got the following error when trying to build
-----> Fetching set buildpack https://github.com/kylef/heroku-buildpack-swift... done
-----> Swift app detected
-----> Installing 2.2-SNAPSHOT-2015-12-22-a
! Push rejected, failed to compile Swift app
error says: is using Swift tools version 3.1.0 which is no longer supported; consider using '// swift-tools-version:5.3' to specify the current tools version
but when try to add above comment to Package.swift, get other syntax errors.
Updating this and all dependencies:
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "HelloWorld",
dependencies: [
.package(url: "https://github.com/kylef/Curassow.git", from: "0.6.1")
]
)
I'm deploying this to Bluemix and am seeing this in my logs:
2016-01-20T17:20:49.034-0600[API/1]OUTCreated app with guid d40ed4c7-0380-45d9-a3ff-a6dd5bf97040
2016-01-20T17:20:53.654-0600[DEA/113]OUTGot staging request for app with id d40ed4c7-0380-45d9-a3ff-a6dd5bf97040
2016-01-20T17:21:02.854-0600[API/4]OUTUpdated app with guid d40ed4c7-0380-45d9-a3ff-a6dd5bf97040 ({"state"=>"STARTED", "buildpack"=>"https://github.com/cloudfoundry-community/swift-buildpack.git"})
2016-01-20T17:21:03.061-0600[STG/113]OUT-----> Downloaded app package (40K)
2016-01-20T17:21:03.217-0600[STG/0]ERRCloning into '/tmp/buildpacks/swift-buildpack'...
2016-01-20T17:21:04.390-0600[STG/0]OUT-----> Buildpack version 1.0.2
2016-01-20T17:21:04.394-0600[STG/0]OUT-----> Installing Swift 2.2-SNAPSHOT-2016-01-11-a
2016-01-20T17:21:13.283-0600[STG/0]OUT Downloaded Swift
2016-01-20T17:21:16.091-0600[STG/0]OUT-----> Installing Clang 3.7.0
2016-01-20T17:22:27.627-0600[STG/0]OUT Downloaded Clang
2016-01-20T17:22:40.920-0600[STG/0]OUT-----> Building Package
2016-01-20T17:22:41.119-0600[STG/0]ERRswift-build: error: no Package.swift file found
2016-01-20T17:22:41.130-0600[STG/0]OUTStaging failed: Buildpack compilation step failed
2016-01-20T17:22:41.380-0600[API/4]ERRencountered error: App staging failed in the buildpack compile phase
Is there an issue with the buildpack that it can't be staged in bluemix? i'm sending an exact copy of this repo to Bluemix.
Hi @kylef, thanks for the heroku-buildpack-swift, seems great! I just wanted to try the one-click Heroku's deploy feature, and I deployed with success, but when I do a request, I get an Internal Server Error. Have you got any ideas? Thanks
I did the one-click heroku deploy but get the following error. Suggestions?
-----> Fetching set buildpack https://github.com/kylef/heroku-buildpack-swift... done
-----> Swift app detected
-----> Installing swift-2.2-SNAPSHOT-2015-12-01-b
-----> Installing clang-3.7.0
-----> Building Package
Cloning Packages/Curassow
Cloning Packages/Nest
Cloning Packages/Inquiline
Cloning Packages/Commander
Compiling Swift Module 'Nest' (1 sources)
Linking Library: .build/release/Nest.a
Compiling Swift Module 'Inquiline' (3 sources)
Linking Library: .build/release/Inquiline.a
Compiling Swift Module 'Commander' (8 sources)
Linking Library: .build/release/Commander.a
Compiling Swift Module 'Curassow' (6 sources)
Linking Library: .build/release/Curassow.a
Compiling Swift Module 'HelloWorld' (1 sources)
/tmp/build_af0f5a6539c14dc38c754b196e3dc4b9/kylef-Curassow-example-helloworld-9df8ef0/Sources/main.swift:3:8: error: no such module 'Curasow'
import Curasow
^
<unknown>:0: error: build had 1 command failures
swift-build: exit(1): ["/tmp/build_af0f5a6539c14dc38c754b196e3dc4b9/kylef-Curassow-example-helloworld-9df8ef0/.swift/swift-2.2-SNAPSHOT-2015-12-01-b/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04/usr/bin/swift-build-tool", "-f", "/tmp/build_af0f5a6539c14dc38c754b196e3dc4b9/kylef-Curassow-example-helloworld-9df8ef0/.build/release/HelloWorld.o/llbuild.yaml"]
! Push rejected, failed to compile Swift app
Hi @kylef, thanks for putting this sample online!
However, I tried to deploy it by pressing the button in the readme file, but heroku failed to build it. I have put the logs below :
-----> Fetching set buildpack https://github.com/kylef/heroku-buildpack-swift... done
-----> Swift app detected
-----> Installing swift-2.2-SNAPSHOT-2015-12-01-b
-----> Installing clang-3.7.0
xz: (stdin): File format not recognized
! Push rejected, failed to compile Swift app
There is also an error message in the web interface which might gives you a hint?
There was an issue building your app. This can mean your app.json's project is not a valid Heroku application. Please ensure your app is deployable to Heroku and try again.
Awesome work! ๐ช
Hello!
Thanks for the hard work! I'm trying to build the example by doing swift build --configuration release
but it results in a failed build.
"_swift_unknownRetain_n", referenced from:
__TFC8Curassow7Arbiter13createSocketsfzT_T_ in Curassow.a(Arbiter.swift.o)
__TFVs10Dictionary8popFirstfT_GSqTxq___ in Curassow.a(Arbiter.swift.o)
__TTSf4gs_d___TFVs9CharacterCfSSS_ in Curassow.a(Currasow.swift.o)
__TTSg5VSS9UTF16ViewS_s9Indexables_VS_5IndexS1_s16ForwardIndexTypes_SiSis18_SignedIntegerTypes_SiSis33_BuiltinIntegerLiteralConvertibles_Vs20_DisabledRangeIndex__Vs6UInt16___TFVs17IndexingGenerator4nextfT_GSqwx8_Element_ in Curassow.a(Currasow.swift.o)
__TTSf4n_n_g_n___TTSg5VSS13CharacterViewS_s14CollectionTypes_GVs17IndexingGeneratorS__GS1_S__s13GeneratorTypes_Vs9Character_VS_5IndexS4_s16ForwardIndexTypes_SiSis18_SignedIntegerTypes_SiSis33_BuiltinIntegerLiteralConvertibles_Vs20_DisabledRangeIndex__S_S_s9IndexablesS_s12SequenceTypes_GS1_S__GS1_S__S2_s_S3__S4_S4_S5_s_SiSiS6_s_SiSiS7_s_S8__S__S3__S3____TFEsPs14CollectionType5splitfzTSi16allowEmptySlicesSb11isSeparatorFzWx9Generator7Element_Sb_GSawx11SubSequence_ in Curassow.a(Currasow.swift.o)
__TTSg5VSS13CharacterViewS_s14CollectionTypes_GVs17IndexingGeneratorS__GS1_S__s13GeneratorTypes_Vs9Character_VS_5IndexS4_s16ForwardIndexTypes_SiSis18_SignedIntegerTypes_SiSis33_BuiltinIntegerLiteralConvertibles_Vs20_DisabledRangeIndex__S_S_s9IndexablesS_s12SequenceTypes_GS1_S__GS1_S__S2_s_S3__S4_S4_S5_s_SiSiS6_s_SiSiS7_s_S8__S__S3__S3____TFEsPs14CollectionTypeg7isEmptySb in Curassow.a(Currasow.swift.o)
__TTSf4g_d___TFSSCfVs9CharacterSS in Curassow.a(Currasow.swift.o)
...
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: build had 1 command failures
error: exit(1): ["/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a.xctoolchain/usr/bin/swift-build-tool", "-f", "/Users/patrickbalestra/Documents/Github/Curassow-example-helloworld/.build/release/HelloWorld.o/llbuild.yaml"]
By running swiftenv version
it looks like I have the correct swift snapshot installed:
DEVELOPMENT-SNAPSHOT-2016-02-08-a (set by /Users/patrickbalestra/Documents/Github/Curassow-example-helloworld/.swift-version)
Do you have any idea on how to fix it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.