A monorepo that holds all of Foursquare's opensource projects
All Foursquare code lives in a single repository, an architecture generally called a monorepo.
Fsq.iois a subset of that internal monorepo.
Fsq.ioholds many of Foursquare's open source projects that had previously lived in their own separate Github repos. Foursquare contributes to a build tool specifically designed to work with monorepos called Pants. The entire
Fsq.iorepo is is built and tested by Pants.
Deploying directly from our monorepo has some nice advantages, for consumers of our open source projects as well as Foursquare itself. The entire repo is built daily by our CIs and internal contributions are open sourced automatically without the overhead of publishing. This repo will always contain the latest code that we use internally, all of the tools can be built just as we use them, directly from HEAD.
Internally we use OSX Yosemite or later. Other OS may work but are officially unsupported. (Unofficially, if building on Linux you should install
libpq-devin addition to the above).
Pants is a build system that works particularly well for a source code workspace containing many distinct but interdependent pieces.
Pants is similar to
sbt, etc. but pants pursues different design goals. Pants optimizes for:
Pants is a true community project, with major contributions from Twitter, Foursquare, Square, among other companies and independent contributors. It has friendly documentation here, in this README we will just touch on how to compile and test the code.
A good first run is to compile the repo and run every test.
./pants compile test src:: test::
Targets are adressable project or dependency level modules that can be built by Pants.
BUILDfiles are configuration files that define targets that can be built by Pants. Each target has a name and can be built by running a Pants task against the target's name and location.
For example, Fsq.io's JVM projects live under
src/jvmhere. You can compile Rogue by running:
./pants compile src/jvm/io/fsq/rogue:rogue
::to a path will glob every target under that location. So to compile every target in Fsq.io:
./pants compile src::
Similarly, to run all the tests, (after starting the mongodb server):
./pants test test::
Projects aspirationally have READMEs at the project root.
Please open an issue if you have any questions or concerns.
Apache License, Version 2.0 (Apache-2.0)