From fa16dd6c16faaab1165ab6914aafd1aa6155d699 Mon Sep 17 00:00:00 2001 From: Roberto Tyley Date: Tue, 1 Aug 2023 12:29:27 +0100 Subject: [PATCH] Fix `InvocationTargetException` in ScalaDoc gen This sbt command was failing with an `InvocationTargetException`: ``` +aws-s3-sdk-v2 / Compile / doc ``` ...the 'doc' command is invoked during release, so we need it to work! This is a known issue: https://github.com/lampepfl/dotty/issues/15288 See also https://github.com/scanamo/scanamo/pull/1643, which looks like it fixed the issue by downgrading to Scala 3.2.0. Weirdly, this fix did not seem to work for me when I tried it here. --- build.sbt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 026fa10..b7aeafb 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,9 @@ def awsS3WithSdkVersion(version: Int)= libraryDependencies ++= Seq( awsSdkForVersion(version), "com.adobe.testing" % "s3mock-testcontainers" % "3.0.1" % Test - ) + ), + Compile / doc / sources := // https://github.com/lampepfl/dotty/issues/15288, see also https://github.com/scanamo/scanamo/pull/1643 + { if (scalaVersion.value.startsWith("3.")) Nil else (Compile / doc / sources).value } ) val awsSdkForVersion = Map(