Skip to content

docs(contributing): show an example of how to switch your build server #17628

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

Merged
merged 1 commit into from
Jun 2, 2023
Merged
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
22 changes: 15 additions & 7 deletions docs/_docs/contributing/setting-up-your-ide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,34 @@ sbt:scala3> projects
...
```

These duplicated projects can be confusing and cause issues in IDEs.
These duplicated projects can be confusing and cause issues in IDEs, so it's
import to import the project in a specific way depending on your editor.

### Metals

When using Metals, the `-bootstrapped` projects are not exported by default.
Normally this is fine, but if you're working on certain modules like `scaladoc`
you'll actually want these modules exported. In order to achieve this you'll
first want to ensure you're using `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. Once you do this, you'll want to find and change
the following under `commonBootstrappedSettings` which is found in the
[`Build.scala`](https://github.com/lampepfl/dotty/blob/main/project/Build.scala)
file.
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/lampepfl/dotty/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:

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


### IntelliJ

In IntelliJ IDEA, we recommend importing the dotty codebase through BSP, then
Expand Down