Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Swift lang, Vapor framework.#2570

Merged
msmith-techempower merged 4 commits intoTechEmpower:masterfrom
e-kazakov:swift-vapor
Feb 16, 2017
Merged

Swift lang, Vapor framework.#2570
msmith-techempower merged 4 commits intoTechEmpower:masterfrom
e-kazakov:swift-vapor

Conversation

@e-kazakov
Copy link
Copy Markdown
Contributor

Here is naive implementation of tests in Swift lang using Vapor framework.

Can someone review setup scripts? Swift doc on Ubuntu 14.04.

Target(name: "vapor-tfb-mongodb", dependencies: ["TfbCommon"])
],
dependencies: [
.Package(url: "https://github.com/vapor/vapor.git", majorVersion: 1, minor: 5),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming "majorVersion" and "minor" relate to the relate tags on github?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're correct.

@NateBrady23
Copy link
Copy Markdown
Member

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
Copy link
Copy Markdown
Contributor

@knewmanTE knewmanTE Feb 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right! And actually this is being installed in the prerequisites.sh file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, right-o. good catch!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Azeff just chop that line and I think we're good to go for now!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌
@nbrady-techempower, @knewmanTE Thanks for reviewing this!

@msmith-techempower
Copy link
Copy Markdown
Member

Looks good to me; LGTM!

@msmith-techempower msmith-techempower merged commit f3fc1dc into TechEmpower:master Feb 16, 2017
Copy link
Copy Markdown
Contributor

@tanner0101 tanner0101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

private init() { }

public static let maxId: UInt32 = 10000
public static let randomId = { () -> UInt32 in UInt32(1) + CryptoRandom.uint32 % maxId }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless we need a cryptographically secure random number it might be better to use PseudoRandom. (will probably be a lot faster)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Just saw I missed this getting merged by 3 hours >_<. Sorry @knewmanTE

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 🙃

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol. Nevermind then.

@@ -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/)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see anything Python specific below :-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Copy-paste 😱
Will update READMEs on weekend.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants