-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ammonite integration and prepare v1.3.1 (#930)
Fix ammonite integration and prepare v1.3.1
- Loading branch information
Showing
13 changed files
with
581 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# bloop `v1.3.1` | ||
|
||
Bloop is a [build server and CLI tool for the Scala programming | ||
language](https://github.com/scalacenter/bloop) developed by the Scala | ||
Center. | ||
|
||
Bloop `v1.3.1` is a bugfix release for `v1.3.0`. | ||
|
||
## Upgrade guide :inbox_tray: | ||
|
||
These are **only** the upgrade steps. If you don't have bloop installed, you | ||
must read the [installation instructions][] instead. | ||
|
||
If you're on macOS, **upgrade** to the latest version with: | ||
|
||
```sh | ||
$ brew upgrade scalacenter/bloop/bloop | ||
$ brew services restart bloop # Note a restart is required in case a server still runs! | ||
``` | ||
|
||
If you're on Windows using `scoop`, **upgrade** to the latest version with: | ||
|
||
```sh | ||
$ scoop upgrade bloop | ||
$ bloop ng-stop | ||
$ bloop server # in a long-running terminal session | ||
``` | ||
|
||
If you're on Arch Linux, **upgrade** to the latest version with: | ||
|
||
```sh | ||
$ rm -rf ~/.bloop | ||
$ yaourt -S bloop | ||
$ systemctl --user start bloop | ||
``` | ||
|
||
Otherwise, use the generic installation method: | ||
|
||
``` | ||
$ curl -L https://github.com/scalacenter/bloop/releases/download/v1.3.1/install.py | python | ||
$ bloop ng-stop | ||
$ systemctl --user start bloop # or similar way to run server in a long-running session | ||
``` | ||
|
||
Read the complete installation instructions in our [Installation page][installation instructions]. | ||
|
||
## Fixed Ammonite integration in CLI client | ||
|
||
`v1.3.0` added an Ammonite integration in Bloop. Every time `bloop | ||
console` is run, bloop compiles the project and then creates an Ammonite REPL | ||
session. This integration required the cooperation of the nailgun script that | ||
ended up misfunctioning due to a `git revert` error. The bug would print the Ammonite command to run but would not actually run it. | ||
|
||
A workaround would be to run `sh -c $(bloop console $PROJECT)`, however | ||
`v1.3.1` fixes the CLI client so that this workaround is no longer needed. | ||
|
||
## Contributors :busts_in_silhouette: | ||
|
||
According to `git shortlog -sn --no-merges v1.2.4..v1.2.5`, 1 people | ||
contributed to this `v1.3.1` release: Jorge Vicente Cantero. | ||
|
||
[gitter]: https://gitter.im/scalacenter/bloop | ||
[installation instructions]: https://scalacenter.github.io/bloop/setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
190 changes: 190 additions & 0 deletions
190
website/versioned_docs/version-1.3.1/contributing-guide.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
--- | ||
id: version-1.3.1-contributing-guide | ||
title: Contributing to bloop | ||
sidebar_label: Contributing Guide | ||
original_id: contributing-guide | ||
--- | ||
|
||
## Requirements | ||
|
||
1. Install Java 8 and sbt in your machine. | ||
2. Read and abide by the [Scala Code of Conduct](https://www.scala-lang.org/conduct/). | ||
|
||
## Project structure | ||
|
||
Here's a list of the most important directories in the bloop repositories. | ||
|
||
1. `backend` defines low-level compiler APIs wrapping Zinc APIs. | ||
2. `frontend` defines the core of bloop, the task scheduling, the CLI and all the supported tasks: compilation, testing, running and linking. | ||
3. `integrations` contains plugins for every supported build tool (such as sbt, Maven and Gradle) to extract any build to bloop. | ||
|
||
When contributing to bloop, you will most likely need to modify code in the | ||
above directories. The next directories define the rest of the project and | ||
tooling infrastructure. | ||
|
||
1. `bridges` contains Scala code written against Scala.js and Scala Native tooling APIs in a version-agnostic way. | ||
2. `buildpress` is an application that given a list of `(project-name, vcs-uri)` will export a build to bloop. | ||
3. `config` contains Scala 2.10 and 2.12 module to read and write configuration files. | ||
4. `docs` and `docs-gen` define our docs infrastructure. | ||
5. `benchmark-bridge` and `benchmarks` define our compiler benchmark infrastructure. | ||
6. `launcher` is an application to spawn a bloop server and establish a | ||
bsp/cli connection to it. | ||
7. `nailgun` is a git submodule of `scalacenter/nailgun`, a fork of `facebook/nailgun`. | ||
8. `sockets` is a library to use Unix Domain sockets and Named Pipes in Windows. | ||
9. `website` contains the [Docusaurus](https://docusaurus.io/) code of our website. | ||
10. `zinc` is a git submodule to the version of Zinc that bloop master is using. | ||
|
||
## Set the repository up | ||
|
||
1. Clone the [GitHub repository](https://github.com/scalacenter/bloop) | ||
2. Change directory to bloop's base directory and run `git submodule update --init`. | ||
3. Run the sbt shell in the base directory. | ||
|
||
If the sbt shell did not fail, you already have a working bloop build in your | ||
machine. | ||
|
||
To hack on the bloop repository you can use either | ||
[Metals](https://scalameta.org/metals/) or | ||
[IntelliJ](https://www.jetbrains.com/idea/). Open the project and import the | ||
build in order to get started. | ||
|
||
## Learn the developer workflow | ||
|
||
The recommended way to build and hack on bloop is by using bloop. Run | ||
`bloopInstall` in your sbt shell if you are not using Metals to export the build to the | ||
`.bloop/` configuration directory. | ||
|
||
### Common commands | ||
|
||
Once the build is exported, here are a few commands to test your changes. | ||
|
||
1. `bloop test backend` runs unit tests for the `backend/` project. | ||
2. `bloop test frontend` runs unit tests for most of the build server. This is the most common command to run. | ||
3. `bloop test frontend -o bloop.CompileSpec` will test only the compilation spec. | ||
4. `bloop test frontend -o bloop.DeduplicationSpec -- "bloop.DeduplicationSpec.three concurrent clients deduplicate compilation"` will test only that particular test case in the `DeduplicationSpec` test suite. | ||
|
||
### Write commit messages | ||
|
||
Write concise commit messages, with a capital letter at the beginning of the | ||
commit message and with a potential description of what your change does so | ||
that future code wanderers can understand what your contribution is. | ||
|
||
**Tip**: If you're only making changes to the docs, add `[DOCS]` to the commit | ||
message so that Bloop does not run tests for your commit. | ||
|
||
## Install a SNAPSHOT release | ||
|
||
When a PR is merged in `scalacenter/bloop`, the CI cuts a new release | ||
available to any Bloop user. The version number of the latest SNAPSHOT | ||
release can be found in the version table available in the [Installation | ||
guide](/bloop/setup). It has a stable version number to | ||
make dependencies reproducible. | ||
|
||
### Depend on SNAPSHOT releases | ||
|
||
The table in [the setup page](/bloop/setup) shows the latest stable and | ||
SNAPSHOT versions available. Pick either. | ||
|
||
Then take a look at the list of published artifacts in [this Sonatype | ||
link](https://search.maven.org/search?q=g:ch.epfl.scala%20a:bloop*) and add | ||
them to your project. For example, to depend on the latest SNAPSHOT of bloop | ||
launcher in sbt, add the following to your project: | ||
|
||
```scala | ||
resolvers += Resolver.bintrayRepo("scalacenter", "releases"), | ||
libraryDependencies += "ch.epfl.scala" % "bloop-launcher" % "$VERSION" | ||
``` | ||
|
||
### Install a SNAPSHOT release in your machine | ||
|
||
If you want to install a SNAPSHOT bloop version in your machine because, for | ||
example, you want to use the CLI or integrate it with a local build tool and | ||
editor, follow these steps: | ||
|
||
1. Checkout the commit in master you want to use. | ||
2. Run `sbt install`. After the command runs, you have: | ||
* Built all modules in the bloop repository. | ||
* Generated installation scripts and package manager formulas. | ||
|
||
The logs contain the paths of every installation resource that has been | ||
generated by `install`. | ||
|
||
#### Homebrew | ||
|
||
If you have installed bloop via `brew`, look for the path of the Homebrew | ||
formula (ending in `.rb`) in the installation logs and run `brew upgrade | ||
--build-from-source $LOCAL_HOMEBREW_FORMULA`. | ||
|
||
Then, **restart the bloop server** to pick up the new installed version. | ||
|
||
The command to run depends on how you have run the bloop server, the [Build | ||
Server reference](server.md) explains the available startup mechanisms. For | ||
example, if you're a macOS user and use `brew services`, restart the server | ||
with `brew services restart bloop`. | ||
|
||
#### Scoop | ||
|
||
If you have installed bloop via `scoop`, look for the path of the Scoop | ||
formula in the installation logs and upgade bloop with the `scoop` CLI. | ||
|
||
Then, **restart the bloop server** to pick up the new installed version. | ||
|
||
The command to run depends on how you have run the bloop server, the [Build | ||
Server reference](server.md) explains the available startup mechanisms. | ||
|
||
#### Generic installation (most common) | ||
|
||
If you have installed bloop via the CURL script in the website, you can use a | ||
local Python script to override your installation in `$HOME/.bloop`: | ||
|
||
1. Give executable permission to the install script: `chmod +x $BLOOP_REPO/frontend/target/install.py`. | ||
2. Run script with `./$BLOOP_REPO/frontend/target/install.py`. | ||
|
||
You will roughly see something like this: | ||
|
||
``` | ||
Downloading Bloop's coursier version, this may take some seconds... | ||
Installed bloop server in '/home/user/.bloop/blp-server' | ||
Installed bloop client in '/home/user/.bloop/bloop' | ||
HTTP Error 404: Not Found | ||
Couldn't download https://raw.githubusercontent.com/scalacenter/bloop/v1.2.5+464-0159c1c3+20190529-1423/etc/zsh/_bloop, please try again. | ||
``` | ||
|
||
You can safely ignore the HTTP error and **restart the bloop server** to | ||
pick up the new installed version. | ||
|
||
The command to run depends on how you have run the bloop server, the [Build | ||
Server reference](server.md) explains the available startup mechanisms. For | ||
example, if you're a Linux user and use `systemd`, restart the server with | ||
`systemctl --user restart bloop`. | ||
|
||
### Verify the installation of a SNAPSHOT release | ||
|
||
Then, restart the bloop server to pick up the new local version. Verify the | ||
local installation by comparing the SNAPSHOT version you wanted to install | ||
with the version of the running server. | ||
|
||
```bash | ||
➜ bloop about | ||
bloop v1.2.5+264-3441652d | ||
|
||
Running on Scala v2.12.8 and Zinc v1.2.1+110-85b9a03c | ||
Maintained by the Scala Center (Martin Duhem, Jorge Vicente Cantero) | ||
``` | ||
|
||
Note the bloop version number in the first line of the above logs. | ||
|
||
## Updating documentation | ||
|
||
The workflow to update the documentation is the following: | ||
|
||
1. Run the docs generation via `bloop run docs -w` or `~docs/run` if you're using the sbt shell. | ||
2. Run `yarn start` inside the `website/` directory. Yarn will start a local web server with the current state of the docs. | ||
3. Locate the Markdown file you want to edit | ||
4. Make a change in the Markdown file. The first command will automatically rebuild the docs and the second one will show it in the browser. | ||
|
||
If the previous procedure doesn't show a change because, for example, you | ||
modified the name of a sidebar or the title of a documentation page, type | ||
<kbd>CTRL</kbd>+<kbd>C</kbd> on the `yarn start` process and run it again. | ||
Docusaurus doesn't incrementally rebuild changes to the Markdown page | ||
indices. |
Oops, something went wrong.