Swift lang, Vapor framework.#2570
Swift lang, Vapor framework.#2570msmith-techempower merged 4 commits intoTechEmpower:masterfrom e-kazakov:swift-vapor
Conversation
| Target(name: "vapor-tfb-mongodb", dependencies: ["TfbCommon"]) | ||
| ], | ||
| dependencies: [ | ||
| .Package(url: "https://github.com/vapor/vapor.git", majorVersion: 1, minor: 5), |
There was a problem hiding this comment.
I'm assuming "majorVersion" and "minor" relate to the relate tags on github?
There was a problem hiding this comment.
Yes, you're correct.
|
This looks good @Azeff ! Just want to confirm that the dependencies pull from a specific release on github. |
|
|
||
| fw_depends swift3 mongodb mysql postgresql | ||
|
|
||
| sudo apt-get install -y libmysqlclient-dev |
There was a problem hiding this comment.
You actually should be able to install any tools that are installed with apt-get by including the package name in your fw_depends line. See here for more info. Basically, if fw_depends doesn't find a file with the given name in toolset/setup/linux/, it will attempt to install it with apt-get.
There was a problem hiding this comment.
Right! And actually this is being installed in the prerequisites.sh file
There was a problem hiding this comment.
@Azeff just chop that line and I think we're good to go for now!
There was a problem hiding this comment.
👌
@nbrady-techempower, @knewmanTE Thanks for reviewing this!
…it's already specified in prerequisites.sh
|
Looks good to me; LGTM! |
| private init() { } | ||
|
|
||
| public static let maxId: UInt32 = 10000 | ||
| public static let randomId = { () -> UInt32 in UInt32(1) + CryptoRandom.uint32 % maxId } |
There was a problem hiding this comment.
Unless we need a cryptographically secure random number it might be better to use PseudoRandom. (will probably be a lot faster)
There was a problem hiding this comment.
Oops. Just saw I missed this getting merged by 3 hours >_<. Sorry @knewmanTE
There was a problem hiding this comment.
@tanner0101 I agree. PseudoRandom fits better. Will change this a bit later.
Looks like CryptoRandom uses RAND_bytes and PseudoRandom uses RAND_pseudo_bytes and these functions have same implementation in clibressl 🙃
| @@ -0,0 +1,24 @@ | |||
| # Swift frameworks | |||
|
|
|||
| The information below contains information specific to Python. For further guidance, review the [documentation](http://frameworkbenchmarks.readthedocs.org/en/latest/) | |||
There was a problem hiding this comment.
I don't see anything Python specific below :-)
There was a problem hiding this comment.
Oops. Copy-paste 😱
Will update READMEs on weekend.
Here is naive implementation of tests in Swift lang using Vapor framework.
Can someone review setup scripts? Swift doc on Ubuntu 14.04.