Scala Dev Tools

Prerequisites

Java 8 JDK

The backend depends on the Java 8 JDK

Install JDK

brew install --cask adoptopenjdk/openjdk/adoptopenjdk8

Configure environment variables

mkdir -p ~/.bash_profile.d
cat > ~/.bash_profile.d/java << 'EOF'
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export PATH=$PATH:$JAVA_HOME/bin
EOF
source ~/.bash_profile.d/java

sbt

sbt is the Scala Build Tool

Install with Homebrew

brew install sbt

Scala Console

The Scala Console REPL is included in the scala toolchain.

brew install scala

Coursier

Coursier provides numerous benefits over sbt’s default ivy resolvers

  • downloading artifacts in parallel
  • better offline mode
  • non obfuscated cache
  • no global lock

It is automatically used by the SBT builds. No need to manually configure it.

IntelliJ CE

Install with Homebrew

brew install --cask intellij-idea-ce
  • On first launch
  • Choose Darcula Theme
  • Choose Mac OS X 10.5+ keymap
  • Create a script for opening files and projects from the command-line: /usr/local/bin/idea
  • Install Scala plugin
  • Use the newly installed Java8 JDK while importing projects
  • Navigate to Preferences / Editor / Code Style / Scala
  • Import the Narrative I/O Scala Code Style Scheme.

Install PostgreSQL Client

We install both the official PostgreSQL client to get access to tools like pg_dump as well as pgcli for a more feature-rich CLI tool.

brew install postgresql
brew install pgcli

Install Redis Client

The Redis command-line client.

brew install redis

Install Thrift

We use Thrift + Parquet as a serialization mechanism for some of the backend jobs.

brew install thrift

Install Apache Spark

Apache Spark is a unified analytics engine for large-scale data processing.

brew install apache-spark