Development - artsy/snowplow GitHub Wiki

Local tips

Organization

A way to keep the different apps separate with the utmost clarity is to create totally separate directories for different apps, and then clone/sparse-checkout the particular branch into that directory.

For example, keep a local directory called snowplow-scala-kinesis-enrich in which the scala-kinesis-enrich-master branch is cloned into, and a separate local directory called snowplow-scala-common-enrich in which the scala-common-enrich-master branch is cloned into.

The branches after all, should be treated as completely separate entities.

Ignore java.lang.OutOfMemoryError

Always ignore the fluke java.lang.OutOfMemoryError: PermGen space that crops up on almost every clean compile.

Errors like this one too:

sbt appears to be exiting abnormally.
  The log file for this session is at /var/folders/sz/v9p5w7d912182q3mtj_gy_j40000gp/T/sbt2209070525300680691.log
Exception in thread "main"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"

Sparse Checkout

To contribute back to snowplow, using sparse checkouts is convenient. This will let you only copy the directory/app within snowplow to your local machine.

For example, to do a sparse checkout of the scala-common-enrich library section of snowplow:

mkdir snowplow-scala-common-enrich
cd snowplow-scala-common-enrich
git init
git remote add upstream -f [email protected]:artsy/snowplow.git
# the directory of the app we want to work on
echo 3-enrich/scala-common-enrich/ >> .git/info/sparse-checkout
echo makefile >> .git/info/sparse-checkout
git pull upstream scala-common-enrich-master

Don't forget the makefile!