Bloop gives you fast edit/compile/test workflows for Scala.
To understand the goals of bloop, we strongly encourage you to read this Scala blog post.
Bloop is a command-line tool for fast edit/compile/test workflows. Its primary goal is to compile and test your project as fast as possible, offering a snappy developer experience. Bloop does not aim to replace your stock build tool, but rather complement it.
Disclaimer: Bloop is in beta, that means that you should not expect everything to make sense and you should be ready to see unexpected behaviours. We're working hard to quickly improve it, and we encourage you to update master on a daily basis if you start using the tool.
Bloop is not released yet. To publish bloop locally, you'll need to clone this repository and use sbt:
$ git clone --recursive https://github.com/scalacenter/bloop.git
$ cd bloop
$ sbt
> install
> frontend/version # copy this version number
> cd nailgun
> git rev-parse HEAD # copy this commit SHA
> cd ..
# paste the version number and SHA obtained above in the following command:
$ bin/install.py --dest $HOME/.bloop --nailgun <nailgun-commit-sha> --version <version>
The script will create the executables ~/.bloop/bloop-server
, ~/.bloop/bloop-shell
and ~/.bloop/bloop
:
bloop-server
is the Bloop serverbloop
is the Bloop clientbloop-shell
is a shell that you can use while the Nailgun integration is experimental
We describe how to use Bloop with the experimental Nailgun integration. The shell will be removed in the next versions of Bloop: don't rely on it.
To be able to start the Bloop server and client without specifying the full path to the commands, we suggest that you add the following to your shell configuration:
export PATH="$PATH:~/.bloop"
The next sections assume that you've added that line to your profile, and reloaded your shell.
Bloop hasn't been released yet, so these instructions won't work!
The easiest solution is to install Bloop using Homebrew:
$ brew install scalacenter/bloop/bloop
Homebrew can take care of starting Bloop automatically when you log into your machine. This is optional, but we recommend it:
$ brew services start bloop
You can also use our installation script to install Bloop:
$ curl https://raw.githubusercontent.com/scalacenter/bloop/no-tag-yet/bin/install.py | python2
The script will create the executables ~/.bloop/bloop-server
, ~/.bloop/BLOOP_SHELL_CMD#
and ~/.bloop/bloop
:
bloop-server
is the Bloop serverbloop
is the Bloop clientbloop-shell
is a shell that you can use while the Nailgun integration is experimental
We describe how to use Bloop with the experimental Nailgun integration. The shell will be removed in the next versions of Bloop: don't rely on it.
To be able to start the Bloop server and client without specifying the full path to the commands, we suggest that you add the following to your shell configuration:
export PATH="$PATH:~/.bloop"
The next sections assume that you've added that line to your profile, and reloaded your shell.
First, we'll need to generate Bloop's configuration files for your project. To
do this, add the following sbt plugin in project/plugins.sbt
in your project:
(While Bloop isn't released, you'll need to replace no-tag-yet
with the version you
copy-pasted earlier)
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "no-tag-yet")
You can then use sbt to generate the configuration:
$ sbt installBloop
If you have installed Bloop using Homebrew, you can start the server with:
$ brew services start bloop
Otherwise, you can start it with:
$ bloop-server &
Note that you only need to start the server once on your machine, and you can use it with as many projects as you want, simultaneously.
$ bloop projects # show the projects that are loaded
$ bloop compile -p my-project # compile my-project
$ bloop test -p my-project-test # run the tests on my-project
$ bloop exit # shuts the compilation server down
$ bloop --help
Usage: bloop [options] [command] [command-options]
Available commands: about, clean, compile, help, projects, test
Type `bloop 'command' --help` for help on an individual command