8000 GitHub - jiminhsieh/bloop at fix/filewatch-close · GitHub
[go: up one dir, main page]

Skip to content
  • jiminhsiehPublic
    forked from scalacenter/bloop

    About

    Scala build server and command-line tool for fast developer workflows

    Resources

    Stars

    0 stars

    Watchers

    1 watching

    Forks

     
     

    Repository files navigation

    logo

    Bloop gives you fast edit/compile/test workflows for Scala.

    GitHub tag Build Status Join the chat

    Goals

    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.

    Installation

    Building Bloop locally

    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/blp-server, ~/.bloop/blp-shell and ~/.bloop/bloop:

    • blp-server is the Bloop server
    • bloop is the Bloop client
    • blp-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.

    Installing a released version of Bloop

    Bloop hasn't been released yet, so these instructions won't work!

    On Mac OS

    With Homebrew

    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. 8000 This is optional, but we recommend it:

    $ brew services start bloop
    Manually

    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/blp-server, ~/.bloop/BLOOP_SHELL_CMD# and ~/.bloop/bloop:

    • blp-server is the Bloop server
    • bloop is the Bloop client
    • blp-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.

    How to use

    Generate the configuration files

    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

    Start the server

    If you have installed Bloop using Homebrew, you can start the server with:

    $ brew services start bloop

    Otherwise, you can start it with:

    $ blp-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.

    Command examples

    $ 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
    

    Command reference

    $ 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

    Tab-completion

    Bloop supports tab-completion on ZSH. To install command completion on ZSH, copy the completions file to an existing completions directory, if it exists.

    If not, you can create it, and update your .zshrc script as follows:

    $ mkdir -p ~/.zsh/completion
    $ cp etc/_bloop ~/.zsh/completion/
    $ echo 'fpath=(~/.zsh/completion $fpath)' >> ~/.zshrc
    $ echo 'autoload -Uz compinit ; compinit' >> ~/.zshrc

    Closing and reopening your shell should make bloop tab-completions available.

    About

    Scala build server and command-line tool for fast developer workflows

    Resources

    Stars

    0 stars

    Watchers

    1 watching

    Forks

    Releases

    Packages

    Contributors

    Languages

    0