Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: small updates to config related docs #1885

Merged
merged 1 commit into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions docs/configuration-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,24 @@ provide autocompletions and simple type error detection.

## Generating configuration files

Install the `bloop-config` dependency in your `build.sbt`:
Install the [`bloop-config`](https://github.com/scalacenter/bloop-config)
dependency in your build:

_sbt_

```scala
libraryDependencies += "ch.epfl.scala" %% "bloop-config" % "1.5.5"
```

_mill_

```scala
libraryDependencies += "ch.epfl.scala" %% "bloop-config" % "1.1.0"
def ivyDeps = Agg(ivy"ch.epfl.scala::bloop-config:1.5.5")
```

The `bloop-config` module is published to Maven Central and implements encoders and decoders to read
and write configuration files. Once the library is added in your build:
`bloop-config` is published for 2.11-2.13 on the JVM and JS. It implements
encoders and decoders to read and write configuration files. Once the library is
added in your build:

1. Create an instance of `bloop.config.Config.File` and populate all its fields.
2. Write the json file to a `target` path with `bloop.config.Config.File.write(config, target)`.
14 changes: 13 additions & 1 deletion docs/contributing-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ sidebar_label: Contributing Guide
1. Check that you have Node v12.10.0 or newer by running `node -v`
1. Read and abide by the [Scala Code of Conduct](https://www.scala-lang.org/conduct/).

## Ensure you're in the right repo

Before getting started you'll want to make sure you're in the right place. Some
tools like [Mill](https://com-lihaoyi.github.io/mill/mill/Intro_to_Mill.html)
have their Bloop integration built-in, whereas others like
[sbt](https://www.scala-sbt.org/) are in here. If you're working on an
integration, make sure it's in this repo

If you're making changes to the actual config structure, you'll want to make
those changes in the
[scalacenter/bloop-config](https://github.com/scalacenter/bloop-config) repo,
which will then need to be released and included in this build.

## Project structure

Here's a list of the most important directories in the bloop repositories.
Expand All @@ -25,7 +38,6 @@ tooling infrastructure.

1. `bridges` contains Scala code written against Scala.js and Scala Native tooling APIs in a version-agnostic way.
1. `buildpress` is an application that given a list of `(project-name, vcs-uri)` will export a build to bloop.
1. `config` contains a Scala 2.10 and 2.11-2.13 module to read and write configuration files.
1. `docs` and `docs-gen` define our docs infrastructure.
1. `benchmark-bridge` and `benchmarks` define our compiler benchmark infrastructure.
1. `launcher` is an application to spawn a bloop server and establish a
Expand Down