From fb066405a609d2508e7a1fca5c7ab827f8b53cd2 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Tue, 16 Aug 2022 14:23:18 +0200 Subject: [PATCH] refactor(build): remove explicit dependency on Bloop This is a bit opinionated, so no worries if you'd rather not, but when working on #477 I had a pretty hard time with Bloop, but when using sbt things seems to go much smoother. This pr does a couple things: - Updates the contributing docs from "don't use " -> Feel free to use Metals with lesser support than IntelliJ will give you. It also then recommends using sbt as your build server. - Remove the explicit dependency on `sbt-bloop`. This both gets rid of some complexity in the build by removing the Bloop-explicit stuff which I assume most non-Scala devs aren't familiar with. - Removes the `BuildInfo.bloopVersion` which didn't seem to be used anywhere. --- build.sbt | 4 ---- docs/contributing.md | 14 ++++++++------ project/plugins.sbt | 1 - project/project/plugins.sbt | 1 - 4 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 project/project/plugins.sbt diff --git a/build.sbt b/build.sbt index 69e0679d..c30af7e2 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,6 @@ lazy val V = new { val protobuf = "3.21.4" val coursier = "2.0.8" - val bloop = "1.4.7" val bsp = "2.0.0-M13" val moped = "0.1.10" def scala213 = "2.13.6" @@ -61,8 +60,6 @@ inThisBuild( ) name := "root" -(Compile / bloopGenerate) := None -(Test / bloopGenerate) := None (publish / skip) := true commands += @@ -168,7 +165,6 @@ lazy val cli = project "scala212" -> V.scala212, "scala213" -> V.scala213, "scala3" -> V.scala3, - "bloopVersion" -> V.bloop, "bspVersion" -> V.bsp, "minimalMillVersion" -> V.minimalMillVersion, "millScipVersion" -> V.millScipVersion diff --git a/docs/contributing.md b/docs/contributing.md index 99228264..18260fd9 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -76,12 +76,14 @@ sbt/BSP/Bloop. It's best to run tests from the sbt shell, not from the IntelliJ UI. -## Don't use VS Code/Vim/Sublime Text/Emacs - -If you want to use completions and precise code navigation, it's not recommended -to use other editors than IntelliJ. IntelliJ is the only IDE that properly -supports hybrid Java/Scala codebases at the moment, although that may change -soon thanks to scip-java :) +## Importing the project with Metals + +While the cross-language support won't be as rich as it is in IntelliJ, +[Metals](https://scalameta.org/metals/) does offer rich language support for +Scala and basic Java navigation support (thanks to scip-java!). When using +Metals and your editor of choice it's recommended to use sbt as your build +server. This isn't the default with Metals, so you'll want to use the `Metals: +Switch build server` command and choose `sbt`. ## Tests are written in Scala diff --git a/project/plugins.sbt b/project/plugins.sbt index 1cea1821..a0385953 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,7 +6,6 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.24") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.31") addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.0") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.11") addSbtPlugin("com.sourcegraph" % "sbt-sourcegraph" % "0.4.0") addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.6.1") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") diff --git a/project/project/plugins.sbt b/project/project/plugins.sbt deleted file mode 100644 index 7e54554e..00000000 --- a/project/project/plugins.sbt +++ /dev/null @@ -1 +0,0 @@ -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.11")