From 0999f5bead0bf4f8801c75d96d56e655c4baf2c3 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Wed, 12 Jul 2017 16:08:38 +0200 Subject: [PATCH 1/2] sbt-dotty: Better error when code is not found - Don't use MessageOnlyException since it can display its output twice in the sbt shell - Point to the Dotty docs on IDE support --- .../src/dotty/tools/sbtplugin/DottyIDEPlugin.scala | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sbt-dotty/src/dotty/tools/sbtplugin/DottyIDEPlugin.scala b/sbt-dotty/src/dotty/tools/sbtplugin/DottyIDEPlugin.scala index f08e68e0bdd0..8d3260427eea 100644 --- a/sbt-dotty/src/dotty/tools/sbtplugin/DottyIDEPlugin.scala +++ b/sbt-dotty/src/dotty/tools/sbtplugin/DottyIDEPlugin.scala @@ -239,13 +239,14 @@ object DottyIDEPlugin extends AutoPlugin { runProcess(codeCommand.value ++ Seq("."), directory = baseDirectory.value) } catch { case ioex: IOException if ioex.getMessage.startsWith("""Cannot run program "code"""") => - throw new MessageOnlyException( + val log = streams.value.log + log.error( """Could not find Visual Studio Code on your system. - |Please download it at (https://code.visualstudio.com/) and add it to your path and then rerun launchIDE - | - |For Linux: https://code.visualstudio.com/docs/setup/linux - |For Windows: https://code.visualstudio.com/docs/setup/windows - |For Mac: https://code.visualstudio.com/docs/setup/mac""".stripMargin) + |Follow the instructions at http://dotty.epfl.ch/docs/usage/ide-support.html + |to install it.""".stripMargin) + throw new FeedbackProvidedException { + override def toString = "Could not find Visual Studio Code on your system." + } } } From 52d81179dd8c14164fe50396692a0d927ac1ebb6 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Wed, 12 Jul 2017 16:08:25 +0200 Subject: [PATCH 2/2] Release sbt-dotty 0.1.4 --- project/Build.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Build.scala b/project/Build.scala index 8359469fe1d8..9f94587fffbb 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -899,7 +899,7 @@ object Build { sbtPlugin := true, - version := "0.1.3", + version := "0.1.4", ScriptedPlugin.scriptedSettings, ScriptedPlugin.sbtTestDirectory := baseDirectory.value / "sbt-test", ScriptedPlugin.scriptedBufferLog := false,