From c9e29431a81b9dea886912b0e8cb388acdd112a8 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Tue, 29 Nov 2022 07:59:32 +0100 Subject: [PATCH] docs: small updates to config related docs --- docs/configuration-format.md | 18 ++++++++++++++---- docs/contributing-guide.md | 14 +++++++++++++- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/docs/configuration-format.md b/docs/configuration-format.md index 28b93b2090..8939b772bb 100644 --- a/docs/configuration-format.md +++ b/docs/configuration-format.md @@ -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)`. diff --git a/docs/contributing-guide.md b/docs/contributing-guide.md index 24c53c6ca2..70ed3594ea 100644 --- a/docs/contributing-guide.md +++ b/docs/contributing-guide.md @@ -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. @@ -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