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

Curassow issues on Cloud Foundry #17

Closed
ragsns opened this issue Jan 7, 2016 · 12 comments
Closed

Curassow issues on Cloud Foundry #17

ragsns opened this issue Jan 7, 2016 · 12 comments

Comments

@ragsns
Copy link

ragsns commented Jan 7, 2016

I had to downgrade to tag 0.2 for the app. to work on Cloud Foundry.

The Hello World app (pinned to swift 2.2 but don't think that matters) is at

https://github.com/ragsns/Curassow-example-helloworld

and the Curassow tag 0.2 (for convenience) is at

https://github.com/ragsns/Curassow/

Am I missing something or is it a bug in master branch?

@kylef
Copy link
Member

kylef commented Jan 7, 2016

@ragsns Which version of Curassow was you having problems with?

@ragsns
Copy link
Author

ragsns commented Jan 7, 2016

@kylef master branch - 0.2.3?

@kylef
Copy link
Member

kylef commented Jan 7, 2016

Can you elaborate on what the problems you are seeing are? I've successfully ran this version on both OS X and Linux.

@ragsns
Copy link
Author

ragsns commented Jan 7, 2016

With master, here's the error that I get when pushing.

Might have to do with swift-2.2-SNAPSHOT-2015-12-01-b?

Starting app swift-helloworld in org raghsrin@us.ibm.com / space dev as raghsrin@us.ibm.com...
-----> Downloaded app package (4.0K)
-----> Downloaded app buildpack cache (257M)
Cloning into '/tmp/buildpacks/swift-buildpack'...
-----> Buildpack version 1.0.2
-----> Building Package
Cloning Packages/Curassow
/tmp/staged/app/Packages/Curassow/Package.swift:7:6: error: type of expression is ambiguous without more context
.Package(url: "https://github.com/nestproject/Nest.git", majorVersion: 0, minor: 2),
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
swift-build: exit(1): ["/tmp/cache/swift-2.2/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04/usr/bin/swiftc", "--driver-mode=swift", "-I", "/tmp/cache/swift-2.2/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04/usr/lib/swift/pm", "-L", "/tmp/cache/swift-2.2/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04/usr/lib/swift/pm", "-lPackageDescription", "/tmp/staged/app/Packages/Curassow/Package.swift"]
Staging failed: Buildpack compilation step failed

FAILED
BuildpackCompileFailed

@briancroom
Copy link
Contributor

@ragsns I'm assuming that error is happening because the Swift buildpack's master branch is a few weeks behind in the Swift snapshot version it is using. I just opened a (PR)[https://github.com/cloudfoundry-community/swift-buildpack/pull/3] for that. In the meantime could you try pushing with my branch as the buildpack? https://github.com/briancroom/swift-buildpack#update-snapshot

@ragsns
Copy link
Author

ragsns commented Jan 7, 2016

@briancroom I am able to push the following (which uses the 0.2.0 version of the framework).

https://github.com/ragsns/Curassow-example-helloworld

I still am seeing similar errors (as before) on

https://github.com/kylef/Curassow-example-helloworld which is pinned to a snapshot version of swift?

Hope this helps?

@briancroom
Copy link
Contributor

@ragsns the forked swift-buildpack for CF doesn't know how to deal with a pinned Swift version referencing a development snapshot right now. If you delete the .swift-version file and re-push with my buildpack branch, it should work for you. If you see the same error, that means it probably cached the older Swift toolchain. I had to delete and re-push the app to get it to stage properly (live at https://curassow-example-helloworld.cfapps.io/ )

@ragsns
Copy link
Author

ragsns commented Jan 7, 2016

@briancroom Ah, the cache strikes again. I deleted the app and the .swift-version and now it worked (I got a few warnings, however).

Thanks for the help!

@kylef
Copy link
Member

kylef commented Jan 8, 2016

@briancroom I think it would make sense if CloudFlare didn't hard-code a version but instead allowed the .swift-version file (similar to swiftenv, and the Heroku buildpack) considering we don't, and won't have a stable Swift release with SPM for a while (Swift 3.0) according to https://swift.org/blog/swift-2-2-release-process/ .

Swift 2.2 will not include the Swift Core Libraries but will include LLDB and the REPL.
The Swift Package Manager is still early in development and will not be included in this release.

@briancroom
Copy link
Contributor

@kylef that's a good point. The Cloud Foundry buildpack (forked from your Heroku one!) actually does support .swift-version still, it just doesn't interpret the snapshot release version numbers the same way that yours does. I intend to propose a patch bringing it back in line with what your buildpack does, which seems the most sensible to me.

@kylef
Copy link
Member

kylef commented Jan 10, 2016

@briancroom Great, I'd advise supporting a raw version number without the swift- prefix too, I think it's unnessecery to place swift prefix when referencing Apples own Swift. I'll add support to the Heroku build pack soon, and swiftenv already supports both.

@kylef
Copy link
Member

kylef commented Jan 11, 2016

Going to close this issue as I don't think there is anything we can do in Curassow here. Please do mention if there is anything I / Curassow can do to help.

@kylef kylef closed this as completed Jan 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants