Skip to content

Commit

Permalink
improvement: Remove workaround for Bloop and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Oct 24, 2024
1 parent a72b97a commit e53cb5b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 45 deletions.
24 changes: 12 additions & 12 deletions docs/_docs/contributing/setting-up-your-ide.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ layout: doc-page
title: Setting up your IDE
---

You can use either Metals with your favorite editor (VS Code, Neovim, Sublime)
or [IntelliJ IDEA for
Scala](https://www.jetbrains.com/help/idea/discover-intellij-idea-for-scala.html)
You can use either Metals with your favorite editor or
[IntelliJ IDEA for Scala](https://www.jetbrains.com/help/idea/discover-intellij-idea-for-scala.html)
to work on the Scala 3 codebase. There are however a few additional
considerations to take into account.

## Bootstrapping Projects

The sbt build for dotty implements bootstrapping within the same build, so each component has
two projects:
The sbt build for dotty implements bootstrapping within the same build, so each
component has two projects:

```
sbt:scala3> projects
Expand All @@ -33,22 +32,23 @@ you'll actually want these modules exported. In order to achieve this you'll
want to make sure you do two things:

1. You'll want to find and change the following under
`commonBootstrappedSettings` which is found in the
[`Build.scala`](https://github.com/scala/scala3/blob/main/project/Build.scala)
file.
`commonBootstrappedSettings` which is found in the
[`Build.scala`](https://github.com/scala/scala3/blob/main/project/Build.scala)
file.

```diff

- bspEnabled := false,
+ bspEnabled := true,
```

2. Set `sbt` as your build server instead of the default, Bloop. You can achieve
this with the `Metals: Switch Build Server` command and then choosing sbt. In
VSCode, this looks like this:
2. Run `sbt publishLocal` to get the needed presentation compiler jars.

![bsp-switch](https://user-images.githubusercontent.com/777748/241986423-0724ae74-0ebd-42ef-a1b7-4d17678992b4.png)
By default Metals uses Bloop build server, however you can also use sbt
directly. You can achieve this with the `Metals: Switch Build Server` command
and then choosing sbt. In VSCode, this looks like this:

![bsp-switch](https://user-images.githubusercontent.com/777748/241986423-0724ae74-0ebd-42ef-a1b7-4d17678992b4.png)

### IntelliJ

Expand Down
4 changes: 2 additions & 2 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ object Build {
}

// Settings used when compiling dotty with a non-bootstrapped dotty
lazy val commonBootstrappedSettings = commonDottySettings ++ NoBloopExport.settings ++ Seq(
// To enable support of scaladoc and language-server projects you need to change this to true and use sbt as your build server
lazy val commonBootstrappedSettings = commonDottySettings ++ Seq(
// To enable support of scaladoc and language-server projects you need to change this to true
bspEnabled := false,
(Compile / unmanagedSourceDirectories) += baseDirectory.value / "src-bootstrapped",

Expand Down
31 changes: 0 additions & 31 deletions project/NoBloopExport.scala

This file was deleted.

0 comments on commit e53cb5b

Please sign in to comment.