From 890efe16196305d3b7bca9747d5b09dfda77aad4 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 12 Aug 2022 11:58:04 +0200 Subject: [PATCH 01/96] Update coursier to 2.1.0-M6-28-gbad85693f (#392) --- build.sbt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 09e6e973e..30aa82725 100644 --- a/build.sbt +++ b/build.sbt @@ -15,7 +15,7 @@ inThisBuild(List( ) )) -val coursierVersion0 = "2.1.0-M5" +val coursierVersion0 = "2.1.0-M6-28-gbad85693f" val lmVersion = "1.3.4" val lm2_13Version = "1.5.0-M3" @@ -78,8 +78,6 @@ lazy val `lm-coursier-shaded` = project shadingRules ++= { val toShade = Seq( "coursier", - "shapeless", - "argonaut", "org.fusesource", "macrocompat", "io.github.alexarchambault.windowsansi", @@ -91,7 +89,8 @@ lazy val `lm-coursier-shaded` = project "org.apache.xbean", "org.codehaus", "org.iq80", - "org.tukaani" + "org.tukaani", + "com.github.plokhotnyuk.jsoniter_scala" ) for (ns <- toShade) yield ShadingRule.moveUnder(ns, "lmcoursier.internal.shaded") From c82bb68a1e28dbdc9e332c6cbd4f2a0e38f7d8ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 12:20:13 +0200 Subject: [PATCH 02/96] Bump actions/checkout from 2 to 3 (#385) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f5a99178..69c4db410 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: run: | git config --global core.autocrlf false git config --global core.eol lf - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 submodules: true @@ -43,7 +43,7 @@ jobs: if: github.event_name == 'push' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 submodules: true From 9ac7e77c1c7ce2ffee6558fcf60039395383b7c5 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 12 Aug 2022 14:48:39 +0200 Subject: [PATCH 03/96] Update coursier to 2.1.0-M6-49-gff26f8e39 (#402) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 30aa82725..9ab80888c 100644 --- a/build.sbt +++ b/build.sbt @@ -15,7 +15,7 @@ inThisBuild(List( ) )) -val coursierVersion0 = "2.1.0-M6-28-gbad85693f" +val coursierVersion0 = "2.1.0-M6-49-gff26f8e39" val lmVersion = "1.3.4" val lm2_13Version = "1.5.0-M3" From a301c86d6dd3d33e007a39dc0feffbce415867a6 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 12 Aug 2022 11:10:48 +0200 Subject: [PATCH 04/96] Use mainline sbt launcher on CI --- .github/workflows/ci.yml | 4 ++-- scripts/ci.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69c4db410..ffd630a74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: 8 - apps: sbt-launcher + apps: sbt - run: scripts/ci.sh shell: bash env: @@ -51,7 +51,7 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: 8 - apps: sbt-launcher + apps: sbt - uses: olafurpg/setup-gpg@v3 - name: Release run: sbt ci-release diff --git a/scripts/ci.sh b/scripts/ci.sh index 123a51cf9..218e87dce 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -2,11 +2,11 @@ set -euvx if [ "$(expr substr $(uname -s) 1 5 2>/dev/null)" == "Linux" ]; then - SBT="sbt -C--plugin-version=2.0.0-RC6-8" + SBT="sbt" elif [ "$(uname)" == "Darwin" ]; then - SBT="sbt -C--plugin-version=2.0.0-RC6-8" + SBT="sbt" else - SBT="sbt.bat -C--plugin-version=2.0.0-RC6-8" + SBT="sbt.bat" fi lmCoursier() { From c89ba1c4ff2cc96e7c4478a6fd8ee24e2489ca05 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 12 Aug 2022 11:20:10 +0200 Subject: [PATCH 05/96] Remove unused script --- scripts/cs-setup.sh | 105 -------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100755 scripts/cs-setup.sh diff --git a/scripts/cs-setup.sh b/scripts/cs-setup.sh deleted file mode 100755 index 25f31b2aa..000000000 --- a/scripts/cs-setup.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env bash - -# -# coursier launcher setup script -# See https://github.com/coursier/ci-scripts -# - - -set -e - -coursier_version="2.0.0-RC6-24" -for_graalvm="false" -dest="cs" - -# Adapted from https://github.com/paulp/sbt-extras/blob/ea47026bd55439760f4c5e9b27b002fa64a8b82f/sbt#L427-L435 and around -die() { - echo "Aborting: $*" - exit 1 -} -process_args() { - require_arg() { - local type="$1" - local opt="$2" - local arg="$3" - - if [[ -z "$arg" ]] || [[ "${arg:0:1}" == "-" ]]; then - die "$opt requires <$type> argument" - fi - } - parsing_args="true" - while [[ $# -gt 0 && "$parsing_args" == "true" ]]; do - case "$1" in - --version) require_arg version "$1" "$2" && coursier_version="$2" && shift 2 ;; - --dest) require_arg path "$1" "$2" && dest="$2" && shift 2 ;; - --graalvm) for_graalvm="true" && shift ;; - *) die "Unexpected argument: '$1'" ;; - esac - done -} - -process_args "$@" - - -do_chmod="1" -ext="" -setenv_bat="0" - -# https://stackoverflow.com/questions/3466166/how-to-check-if-running-in-cygwin-mac-or-linux/17072017#17072017 -if [ "$(expr substr $(uname -s) 1 5 2>/dev/null)" == "Linux" ]; then - cs_url="https://github.com/coursier/coursier/releases/download/v$coursier_version/cs-x86_64-pc-linux" - cache_base="$HOME/.cache/coursier/v1" -elif [ "$(uname)" == "Darwin" ]; then - cs_url="https://github.com/coursier/coursier/releases/download/v$coursier_version/cs-x86_64-apple-darwin" - cache_base="$HOME/Library/Caches/Coursier/v1" -else - # assuming Windows… - cs_url="https://github.com/coursier/coursier/releases/download/v$coursier_version/cs-x86_64-pc-win32.exe" - cache_base="$LOCALAPPDATA/Coursier/v1" # TODO Check that - ext=".exe" - do_chmod="0" - - if [ "$for_graalvm" = "true" ]; then - choco install -y windows-sdk-7.1 vcbuildtools kb2519277 - setenv_bat="1" - fi -fi - -cache_dest="$cache_base/$(echo "$cs_url" | sed 's@://@/@')" - -if [ -f "$cache_dest" ]; then - echo "Found $cache_dest in cache" -else - mkdir -p "$(dirname "$cache_dest")" - tmp_dest="$cache_dest.tmp-setup" - echo "Downloading $cs_url" - curl -Lo "$tmp_dest" "$cs_url" - mv "$tmp_dest" "$cache_dest" -fi - -if [ "$setenv_bat" = "1" ]; then - cp "$cache_dest" ".$dest$ext" - "./.$dest$ext" --help - if [ "$do_chmod" = "1" ]; then - chmod +x ".$dest$ext" - fi - cat > "$dest.bat" << EOF -@call "C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Bin\\SetEnv.Cmd" -%~dp0.$dest$ext %* -EOF - # that one is for bash - cat > "$dest" << EOF -#!/usr/bin/env bash -set -e -exec $(pwd)/$dest.bat "\$@" -EOF - chmod +x "$dest" || true -else - cp "$cache_dest" "$dest$ext" - if [ "$do_chmod" = "1" ]; then - chmod +x "$dest$ext" - fi -fi - -export PATH=".:$PATH" -"$dest" --help From b587076320e97cd05dfaa34db650d12f009cc2f4 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 12 Aug 2022 12:02:23 +0200 Subject: [PATCH 06/96] Address deprecation warning --- .../main/scala/lmcoursier/CoursierDependencyResolution.scala | 2 -- .../src/main/scala/lmcoursier/internal/SbtUpdateReport.scala | 2 +- .../scala/coursier/sbtcoursiershared/SbtCoursierShared.scala | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala b/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala index 6e2f37d5c..6976d9b28 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala @@ -31,8 +31,6 @@ class CoursierDependencyResolution( bootstrappingProtocolHandler = true ) - lmcoursier.CoursierConfiguration.checkLegacyCache() - private var protocolHandlerClassLoader: Option[ClassLoader] = None private val protocolHandlerClassLoaderLock = new Object diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/internal/SbtUpdateReport.scala b/modules/lm-coursier/src/main/scala/lmcoursier/internal/SbtUpdateReport.scala index 40c956b79..55bf9fc4a 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/internal/SbtUpdateReport.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/internal/SbtUpdateReport.scala @@ -47,7 +47,7 @@ private[internal] object SbtUpdateReport { .withExtraAttributes(dependency.module.attributes ++ extraProperties) .withExclusions( dependency - .exclusions + .minimizedExclusions .toVector .map { case (org, name) => diff --git a/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala b/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala index da365174b..ef3a258d7 100644 --- a/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala +++ b/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala @@ -14,8 +14,6 @@ import sbt.librarymanagement.{ModuleID, Resolver, URLRepository} object SbtCoursierShared extends AutoPlugin { - lmcoursier.CoursierConfiguration.checkLegacyCache() - override def trigger = allRequirements override def requires = sbt.plugins.JvmPlugin From 240725e35f658b48b0c141f88ce15d897e0962b5 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Sun, 12 Dec 2021 23:38:59 +0100 Subject: [PATCH 07/96] Update sbt to 1.5.6 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index dbae93bcf..bb3a9b7dc 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.9 +sbt.version=1.5.6 From f73ea018ed50c2a1ed53384a04965e563e4da5df Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 12 Aug 2022 17:44:13 +0200 Subject: [PATCH 08/96] Revert "Update scala-xml to 2.1.0 (#387)" This reverts commit 18a72e49755e74903bff2cdd3ce89bd2e8d034b6. --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9ab80888c..ebd85f79e 100644 --- a/build.sbt +++ b/build.sbt @@ -99,7 +99,7 @@ lazy val `lm-coursier-shaded` = project "io.get-coursier" %% "coursier" % coursierVersion0, "io.github.alexarchambault" %% "data-class" % "0.2.5" % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", - "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded + "org.scala-lang.modules" %% "scala-xml" % "1.3.0", // depending on that one so that it doesn't get shaded "org.scala-sbt" %% "librarymanagement-ivy" % { if (scalaBinaryVersion.value == "2.12") lmVersion else lm2_13Version From 117ff375b9aca2fa52bd084b8fe03ce9b26ca1e4 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 12 Aug 2022 17:53:32 +0200 Subject: [PATCH 09/96] Ignore scala-xml version mismatch in 2.13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hope this isn't a problem downstream… --- project/Settings.scala | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/project/Settings.scala b/project/Settings.scala index 7c183ad1a..ad7d8632f 100644 --- a/project/Settings.scala +++ b/project/Settings.scala @@ -36,6 +36,13 @@ object Settings { scalacOptions ++= { if (isAtLeastScala213.value) Seq("-Ymacro-annotations") else Nil + }, + libraryDependencySchemes ++= { + val sv = scalaVersion.value + if (sv.startsWith("2.13.")) + Seq("org.scala-lang.modules" %% "scala-xml" % "always") + else + Nil } ) ++ { val prop = sys.props.getOrElse("publish.javadoc", "").toLowerCase(Locale.ROOT) From db3810551da658a500ee5a85aad117ea855222bf Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Fri, 12 Aug 2022 09:30:47 -0400 Subject: [PATCH 10/96] Refactor build Deduplicate lm-ivy selection to an ad-hoc setting. --- build.sbt | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/build.sbt b/build.sbt index ebd85f79e..65331d7b4 100644 --- a/build.sbt +++ b/build.sbt @@ -16,8 +16,15 @@ inThisBuild(List( )) val coursierVersion0 = "2.1.0-M6-49-gff26f8e39" -val lmVersion = "1.3.4" -val lm2_13Version = "1.5.0-M3" +def lmIvy = Def.setting { + "org.scala-sbt" %% "librarymanagement-ivy" % { + scalaBinaryVersion.value match { + case "2.12" => "1.3.4" + case "2.13" => "1.7.0" + case _ => "2.0.0-alpha2" + } + } +} lazy val `lm-coursier` = project .in(file("modules/lm-coursier")) @@ -34,10 +41,7 @@ lazy val `lm-coursier` = project // to DependencyResolutionInterface.update, which is an // IvySbt#Module (seems DependencyResolutionInterface.moduleDescriptor // is ignored). - "org.scala-sbt" %% "librarymanagement-ivy" % { - if (scalaBinaryVersion.value == "2.12") lmVersion - else lm2_13Version - }, + lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.13" % Test ), Test / test := { @@ -100,10 +104,7 @@ lazy val `lm-coursier-shaded` = project "io.github.alexarchambault" %% "data-class" % "0.2.5" % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", "org.scala-lang.modules" %% "scala-xml" % "1.3.0", // depending on that one so that it doesn't get shaded - "org.scala-sbt" %% "librarymanagement-ivy" % { - if (scalaBinaryVersion.value == "2.12") lmVersion - else lm2_13Version - }, + lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.13" % Test ) ) From ca6704b6b0cf0b47ef298744989ff58711b8dbc8 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Fri, 12 Aug 2022 09:38:06 -0400 Subject: [PATCH 11/96] Move out data classes to its own subproject --- build.sbt | 18 ++++++++++++++++-- .../lmcoursier/CoursierConfiguration.scala | 0 .../scala/lmcoursier/FallbackDependency.scala | 0 .../lmcoursier/credentials/Credentials.scala | 1 + .../credentials/DirectCredentials.scala | 0 .../credentials/FileCredentials.scala | 0 .../lmcoursier/definitions/Attributes.scala | 0 .../definitions/Authentication.scala | 0 .../lmcoursier/definitions/CacheLogger.scala | 1 + .../lmcoursier/definitions/CachePolicy.scala | 1 + .../lmcoursier/definitions/DateTime.scala | 0 .../lmcoursier/definitions/Definitions.scala | 1 + .../lmcoursier/definitions/Dependency.scala | 0 .../lmcoursier/definitions/Developer.scala | 0 .../lmcoursier/definitions/FromCoursier.scala | 1 + .../scala/lmcoursier/definitions/Info.scala | 0 .../scala/lmcoursier/definitions/Module.scala | 0 .../definitions/ModuleMatchers.scala | 0 .../scala/lmcoursier/definitions/Project.scala | 0 .../lmcoursier/definitions/Publication.scala | 0 .../definitions/Reconciliation.scala | 1 + .../scala/lmcoursier/definitions/Strict.scala | 0 .../lmcoursier/definitions/CachePolicy.scala | 2 +- 23 files changed, 23 insertions(+), 3 deletions(-) rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/CoursierConfiguration.scala (100%) rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/FallbackDependency.scala (100%) create mode 120000 modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/credentials/DirectCredentials.scala (100%) rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/credentials/FileCredentials.scala (100%) rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/Attributes.scala (100%) rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/Authentication.scala (100%) create mode 120000 modules/definitions/src/main/scala/lmcoursier/definitions/CacheLogger.scala create mode 120000 modules/definitions/src/main/scala/lmcoursier/definitions/CachePolicy.scala rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/DateTime.scala (100%) create mode 120000 modules/definitions/src/main/scala/lmcoursier/definitions/Definitions.scala rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/Dependency.scala (100%) rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/Developer.scala (100%) create mode 120000 modules/definitions/src/main/scala/lmcoursier/definitions/FromCoursier.scala rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/Info.scala (100%) rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/Module.scala (100%) rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/ModuleMatchers.scala (100%) rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/Project.scala (100%) rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/Publication.scala (100%) create mode 120000 modules/definitions/src/main/scala/lmcoursier/definitions/Reconciliation.scala rename modules/{lm-coursier => definitions}/src/main/scala/lmcoursier/definitions/Strict.scala (100%) diff --git a/build.sbt b/build.sbt index 65331d7b4..afea3ec86 100644 --- a/build.sbt +++ b/build.sbt @@ -26,8 +26,23 @@ def lmIvy = Def.setting { } } +lazy val definitions = project + .in(file("modules/definitions")) + .disablePlugins(MimaPlugin) + .settings( + shared, + crossScalaVersions := Seq(scala212, scala213), + libraryDependencies ++= Seq( + "io.get-coursier" %% "coursier" % coursierVersion0, + "io.github.alexarchambault" %% "data-class" % "0.2.5" % Provided, + lmIvy.value, + ), + dontPublish, + ) + lazy val `lm-coursier` = project .in(file("modules/lm-coursier")) + .dependsOn(definitions) .settings( shared, crossScalaVersions := Seq(scala212, scala213), @@ -35,7 +50,6 @@ lazy val `lm-coursier` = project Mima.lmCoursierFilters, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, - "io.github.alexarchambault" %% "data-class" % "0.2.5" % Provided, // We depend on librarymanagement-ivy rather than just // librarymanagement-core to handle the ModuleDescriptor passed // to DependencyResolutionInterface.update, which is an @@ -61,6 +75,7 @@ lazy val `lm-coursier` = project lazy val `lm-coursier-shaded` = project .in(file("modules/lm-coursier/target/shaded-module")) .enablePlugins(ShadingPlugin) + .dependsOn(definitions) .settings( shared, crossScalaVersions := Seq(scala212, scala213), @@ -101,7 +116,6 @@ lazy val `lm-coursier-shaded` = project }, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, - "io.github.alexarchambault" %% "data-class" % "0.2.5" % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", "org.scala-lang.modules" %% "scala-xml" % "1.3.0", // depending on that one so that it doesn't get shaded lmIvy.value, diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierConfiguration.scala b/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/CoursierConfiguration.scala rename to modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/FallbackDependency.scala b/modules/definitions/src/main/scala/lmcoursier/FallbackDependency.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/FallbackDependency.scala rename to modules/definitions/src/main/scala/lmcoursier/FallbackDependency.scala diff --git a/modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala b/modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala new file mode 120000 index 000000000..cd85138e1 --- /dev/null +++ b/modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala @@ -0,0 +1 @@ +../../../../../../lm-coursier/src/main/scala/lmcoursier/credentials/Credentials.scala \ No newline at end of file diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/credentials/DirectCredentials.scala b/modules/definitions/src/main/scala/lmcoursier/credentials/DirectCredentials.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/credentials/DirectCredentials.scala rename to modules/definitions/src/main/scala/lmcoursier/credentials/DirectCredentials.scala diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/credentials/FileCredentials.scala b/modules/definitions/src/main/scala/lmcoursier/credentials/FileCredentials.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/credentials/FileCredentials.scala rename to modules/definitions/src/main/scala/lmcoursier/credentials/FileCredentials.scala diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/Attributes.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Attributes.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/Attributes.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/Attributes.scala diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/Authentication.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Authentication.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/Authentication.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/Authentication.scala diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/CacheLogger.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/CacheLogger.scala new file mode 120000 index 000000000..24bba6949 --- /dev/null +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/CacheLogger.scala @@ -0,0 +1 @@ +../../../../../../lm-coursier/src/main/scala/lmcoursier/definitions/CacheLogger.scala \ No newline at end of file diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/CachePolicy.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/CachePolicy.scala new file mode 120000 index 000000000..f78933cc5 --- /dev/null +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/CachePolicy.scala @@ -0,0 +1 @@ +../../../../../../lm-coursier/src/main/scala/lmcoursier/definitions/CachePolicy.scala \ No newline at end of file diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/DateTime.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/DateTime.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/DateTime.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/DateTime.scala diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/Definitions.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Definitions.scala new file mode 120000 index 000000000..3b8d411c7 --- /dev/null +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/Definitions.scala @@ -0,0 +1 @@ +../../../../../../lm-coursier/src/main/scala/lmcoursier/definitions/Definitions.scala \ No newline at end of file diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/Dependency.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Dependency.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/Dependency.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/Dependency.scala diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/Developer.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Developer.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/Developer.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/Developer.scala diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/FromCoursier.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/FromCoursier.scala new file mode 120000 index 000000000..e79438aa1 --- /dev/null +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/FromCoursier.scala @@ -0,0 +1 @@ +../../../../../../lm-coursier/src/main/scala/lmcoursier/definitions/FromCoursier.scala \ No newline at end of file diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/Info.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Info.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/Info.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/Info.scala diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/Module.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Module.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/Module.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/Module.scala diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/ModuleMatchers.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/ModuleMatchers.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/ModuleMatchers.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/ModuleMatchers.scala diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/Project.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Project.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/Project.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/Project.scala diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/Publication.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Publication.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/Publication.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/Publication.scala diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/Reconciliation.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Reconciliation.scala new file mode 120000 index 000000000..46a1687de --- /dev/null +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/Reconciliation.scala @@ -0,0 +1 @@ +../../../../../../lm-coursier/src/main/scala/lmcoursier/definitions/Reconciliation.scala \ No newline at end of file diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/Strict.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Strict.scala similarity index 100% rename from modules/lm-coursier/src/main/scala/lmcoursier/definitions/Strict.scala rename to modules/definitions/src/main/scala/lmcoursier/definitions/Strict.scala diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/CachePolicy.scala b/modules/lm-coursier/src/main/scala/lmcoursier/definitions/CachePolicy.scala index 6ad3acc1e..a0c479f4a 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/CachePolicy.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/definitions/CachePolicy.scala @@ -6,7 +6,7 @@ object CachePolicy { /* NOTE: the following comments are copied from coursier.cache.CachePolicy for the benefit of users within an IDE that reads the javadocs. Please keep in sync from the original ADT. */ - + /** Only pick local files, possibly from the cache. Don't try to download anything. */ case object LocalOnly extends CachePolicy From 22bac78b34b17d5b56c3cba3dfcfd4dd6c869b2b Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Fri, 12 Aug 2022 10:17:34 -0400 Subject: [PATCH 12/96] Move out custom methods in data-classes to syntax package These are mostly unused, so we might be able to get rid of them too eventually? --- .../lmcoursier/CoursierConfiguration.scala | 84 +------- .../credentials/DirectCredentials.scala | 8 - .../definitions/Authentication.scala | 6 - .../lmcoursier/definitions/Dependency.scala | 31 +-- .../definitions/ModuleMatchers.scala | 9 - .../lmcoursier/definitions/Publication.scala | 8 +- .../scala/lmcoursier/definitions/Strict.scala | 7 +- .../CoursierDependencyResolution.scala | 1 + .../lmcoursier/credentials/Credentials.scala | 15 +- .../scala/lmcoursier/syntax/package.scala | 204 ++++++++++++++++++ .../sbtcoursiershared/SbtCoursierShared.scala | 1 + .../sbtlmcoursier/LmCoursierPlugin.scala | 1 + 12 files changed, 212 insertions(+), 163 deletions(-) create mode 100644 modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala diff --git a/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala b/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala index e2be99c49..50f765f73 100644 --- a/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala +++ b/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala @@ -59,86 +59,4 @@ import java.net.URLClassLoader providedInCompile: Boolean = false, // unused, kept for binary compatibility @since protocolHandlerDependencies: Seq[ModuleID] = Vector.empty, -) { - - def withLog(log: Logger): CoursierConfiguration = - withLog(Option(log)) - def withSbtScalaOrganization(sbtScalaOrganization: String): CoursierConfiguration = - withSbtScalaOrganization(Option(sbtScalaOrganization)) - def withSbtScalaVersion(sbtScalaVersion: String): CoursierConfiguration = - withSbtScalaVersion(Option(sbtScalaVersion)) - def withScalaOrganization(scalaOrganization: String): CoursierConfiguration = - withScalaOrganization(Option(scalaOrganization)) - def withScalaVersion(scalaVersion: String): CoursierConfiguration = - withScalaVersion(Option(scalaVersion)) - def withLogger(logger: CacheLogger): CoursierConfiguration = - withLogger(Option(logger)) - def withCache(cache: File): CoursierConfiguration = - withCache(Option(cache)) - def withIvyHome(ivyHome: File): CoursierConfiguration = - withIvyHome(Option(ivyHome)) - def withFollowHttpToHttpsRedirections(followHttpToHttpsRedirections: Boolean): CoursierConfiguration = - withFollowHttpToHttpsRedirections(Some(followHttpToHttpsRedirections)) - def withFollowHttpToHttpsRedirections(): CoursierConfiguration = - withFollowHttpToHttpsRedirections(Some(true)) - def withStrict(strict: Strict): CoursierConfiguration = - withStrict(Some(strict)) - def withTtl(ttl: Duration): CoursierConfiguration = - withTtl(Some(ttl)) - def addRepositoryAuthentication(repositoryId: String, authentication: Authentication): CoursierConfiguration = - withAuthenticationByRepositoryId(authenticationByRepositoryId :+ (repositoryId, authentication)) - - def withUpdateConfiguration(conf: UpdateConfiguration): CoursierConfiguration = - withMissingOk(conf.missingOk) -} - -object CoursierConfiguration { - - @deprecated("Legacy cache location support was dropped, this method does nothing.", "2.0.0-RC6-10") - def checkLegacyCache(): Unit = () - - def apply( - log: Logger, - resolvers: Vector[Resolver], - parallelDownloads: Int, - maxIterations: Int, - sbtScalaOrganization: String, - sbtScalaVersion: String, - sbtScalaJars: Vector[File], - interProjectDependencies: Vector[Project], - excludeDependencies: Vector[(String, String)], - fallbackDependencies: Vector[FallbackDependency], - autoScalaLibrary: Boolean, - hasClassifiers: Boolean, - classifiers: Vector[String], - mavenProfiles: Vector[String], - scalaOrganization: String, - scalaVersion: String, - authenticationByRepositoryId: Vector[(String, Authentication)], - credentials: Seq[Credentials], - logger: CacheLogger, - cache: File - ): CoursierConfiguration = - CoursierConfiguration( - Option(log), - resolvers, - parallelDownloads, - maxIterations, - Option(sbtScalaOrganization), - Option(sbtScalaVersion), - sbtScalaJars, - interProjectDependencies, - excludeDependencies, - fallbackDependencies, - autoScalaLibrary, - hasClassifiers, - classifiers, - mavenProfiles, - Option(scalaOrganization), - Option(scalaVersion), - authenticationByRepositoryId, - credentials, - Option(logger), - Option(cache) - ) /* no need to touch this 'apply'; @data above is doing the hard work */ -} +) diff --git a/modules/definitions/src/main/scala/lmcoursier/credentials/DirectCredentials.scala b/modules/definitions/src/main/scala/lmcoursier/credentials/DirectCredentials.scala index fa93f8bd1..fd69fe021 100644 --- a/modules/definitions/src/main/scala/lmcoursier/credentials/DirectCredentials.scala +++ b/modules/definitions/src/main/scala/lmcoursier/credentials/DirectCredentials.scala @@ -15,16 +15,8 @@ import dataclass._ httpsOnly: Boolean = true ) extends Credentials { - def withRealm(realm: String): DirectCredentials = - withRealm(Option(realm)) - override def toString(): String = withPassword("****") .productIterator .mkString("DirectCredentials(", ", ", ")") } - -object DirectCredentials { - def apply(host: String, username: String, password: String, realm: String): DirectCredentials = DirectCredentials(host, username, password, Option(realm)) - def apply(host: String, username: String, password: String, realm: String, optional: Boolean): DirectCredentials = DirectCredentials(host, username, password, Option(realm), optional) -} diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/Authentication.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Authentication.scala index 5d65e1763..e0031f7d0 100644 --- a/modules/definitions/src/main/scala/lmcoursier/definitions/Authentication.scala +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/Authentication.scala @@ -22,9 +22,3 @@ import dataclass._ .productIterator .mkString("Authentication(", ", ", ")") } - -object Authentication { - - def apply(headers: Seq[(String, String)]): Authentication = - Authentication("", "").withHeaders(headers) -} diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/Dependency.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Dependency.scala index 5021aadce..a4447f118 100644 --- a/modules/definitions/src/main/scala/lmcoursier/definitions/Dependency.scala +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/Dependency.scala @@ -10,33 +10,4 @@ import dataclass.data publication: Publication, optional: Boolean, transitive: Boolean -) { - def attributes: Attributes = publication.attributes - def withAttributes(attributes: Attributes): Dependency = - withPublication( - publication - .withType(attributes.`type`) - .withClassifier(attributes.classifier) - ) -} - -object Dependency { - def apply( - module: Module, - version: String, - configuration: Configuration, - exclusions: Set[(Organization, ModuleName)], - attributes: Attributes, - optional: Boolean, - transitive: Boolean - ): Dependency = - Dependency( - module, - version, - configuration, - exclusions, - Publication("", attributes.`type`, Extension(""), attributes.classifier), - optional, - transitive - ) -} +) diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/ModuleMatchers.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/ModuleMatchers.scala index 31464d3bc..f88eb8ee0 100644 --- a/modules/definitions/src/main/scala/lmcoursier/definitions/ModuleMatchers.scala +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/ModuleMatchers.scala @@ -11,12 +11,3 @@ import dataclass.data include: Set[Module], includeByDefault: Boolean = true ) - -object ModuleMatchers { - def all: ModuleMatchers = - ModuleMatchers(Set.empty, Set.empty) - def only(organization: String, moduleName: String): ModuleMatchers = - ModuleMatchers(Set.empty, Set(Module(Organization(organization), ModuleName(moduleName), Map())), includeByDefault = false) - def only(mod: Module): ModuleMatchers = - ModuleMatchers(Set.empty, Set(mod), includeByDefault = false) -} diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/Publication.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Publication.scala index bb5f9e253..3af283906 100644 --- a/modules/definitions/src/main/scala/lmcoursier/definitions/Publication.scala +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/Publication.scala @@ -7,10 +7,4 @@ import dataclass.data `type`: Type, ext: Extension, classifier: Classifier -) { - def attributes: Attributes = - Attributes(`type`, classifier) - def withAttributes(attributes: Attributes): Publication = - withType(attributes.`type`) - .withClassifier(attributes.classifier) -} +) diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/Strict.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Strict.scala index f5f5e6a1a..3738ed06d 100644 --- a/modules/definitions/src/main/scala/lmcoursier/definitions/Strict.scala +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/Strict.scala @@ -9,9 +9,4 @@ import dataclass._ @since includeByDefault: Boolean = false, semVer: Boolean = false -) { - def addInclude(include: (String, String)*): Strict = - withInclude(this.include ++ include) - def addExclude(exclude: (String, String)*): Strict = - withExclude(this.exclude ++ exclude) -} +) diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala b/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala index 6976d9b28..9feba63c4 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala @@ -10,6 +10,7 @@ import coursier.util.Artifact import coursier.internal.Typelevel import lmcoursier.definitions.ToCoursier import lmcoursier.internal.{ArtifactsParams, ArtifactsRun, CoursierModuleDescriptor, InterProjectRepository, ResolutionParams, ResolutionRun, Resolvers, SbtBootJars, UpdateParams, UpdateRun} +import lmcoursier.syntax._ import sbt.internal.librarymanagement.IvySbt import sbt.librarymanagement._ import sbt.util.Logger diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/credentials/Credentials.scala b/modules/lm-coursier/src/main/scala/lmcoursier/credentials/Credentials.scala index 8557ba188..43cda490e 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/credentials/Credentials.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/credentials/Credentials.scala @@ -4,17 +4,4 @@ import java.io.File abstract class Credentials extends Serializable -object Credentials { - - def apply(): DirectCredentials = DirectCredentials() - def apply(host: String, username: String, password: String): DirectCredentials = DirectCredentials(host, username, password) - def apply(host: String, username: String, password: String, realm: Option[String]): DirectCredentials = DirectCredentials(host, username, password, realm) - def apply(host: String, username: String, password: String, realm: String): DirectCredentials = DirectCredentials(host, username, password, Option(realm)) - def apply(host: String, username: String, password: String, realm: Option[String], optional: Boolean): DirectCredentials = DirectCredentials(host, username, password, realm, optional) - def apply(host: String, username: String, password: String, realm: String, optional: Boolean): DirectCredentials = DirectCredentials(host, username, password, Option(realm), optional) - - def apply(f: File): FileCredentials = - FileCredentials(f.getAbsolutePath) - def apply(f: File, optional: Boolean): FileCredentials = - FileCredentials(f.getAbsolutePath, optional) -} +object Credentials diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala b/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala new file mode 100644 index 000000000..a6ed0df39 --- /dev/null +++ b/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala @@ -0,0 +1,204 @@ +package lmcoursier + +import coursier.cache.CacheDefaults +import lmcoursier.credentials._ +import lmcoursier.definitions._ +import sbt.librarymanagement.{Resolver, UpdateConfiguration, ModuleID, CrossVersion, ModuleInfo, ModuleDescriptorConfiguration} +import xsbti.Logger + +import scala.concurrent.duration.Duration +import java.io.File +import java.net.URL +import java.net.URLClassLoader + +package object syntax { + implicit class CoursierConfigurationModule(value: CoursierConfiguration.type) { + @deprecated("Legacy cache location support was dropped, this method does nothing.", "2.0.0-RC6-10") + def checkLegacyCache(): Unit = () + + def apply( + log: Logger, + resolvers: Vector[Resolver], + parallelDownloads: Int, + maxIterations: Int, + sbtScalaOrganization: String, + sbtScalaVersion: String, + sbtScalaJars: Vector[File], + interProjectDependencies: Vector[Project], + excludeDependencies: Vector[(String, String)], + fallbackDependencies: Vector[FallbackDependency], + autoScalaLibrary: Boolean, + hasClassifiers: Boolean, + classifiers: Vector[String], + mavenProfiles: Vector[String], + scalaOrganization: String, + scalaVersion: String, + authenticationByRepositoryId: Vector[(String, Authentication)], + credentials: Seq[Credentials], + logger: CacheLogger, + cache: File + ): CoursierConfiguration = + CoursierConfiguration( + Option(log), + resolvers, + parallelDownloads, + maxIterations, + Option(sbtScalaOrganization), + Option(sbtScalaVersion), + sbtScalaJars, + interProjectDependencies, + excludeDependencies, + fallbackDependencies, + autoScalaLibrary, + hasClassifiers, + classifiers, + mavenProfiles, + Option(scalaOrganization), + Option(scalaVersion), + authenticationByRepositoryId, + credentials, + Option(logger), + Option(cache), + ivyHome = None, + followHttpToHttpsRedirections = None, + strict = None, + extraProjects = Vector.empty, + forceVersions = Vector.empty, + reconciliation = Vector.empty, + classpathOrder = true, + verbosityLevel = 0, + ttl = CacheDefaults.ttl, + checksums = CacheDefaults.checksums.toVector, + cachePolicies = CacheDefaults.cachePolicies.toVector.map(FromCoursier.cachePolicy), + missingOk = false, + sbtClassifiers = false, + providedInCompile = false, + protocolHandlerDependencies = Vector.empty, + ) + } + + implicit class CoursierConfigurationOp(value: CoursierConfiguration) { + def withLog(log: Logger): CoursierConfiguration = + value.withLog(Option(log)) + def withSbtScalaOrganization(sbtScalaOrganization: String): CoursierConfiguration = + value.withSbtScalaOrganization(Option(sbtScalaOrganization)) + def withSbtScalaVersion(sbtScalaVersion: String): CoursierConfiguration = + value.withSbtScalaVersion(Option(sbtScalaVersion)) + def withScalaOrganization(scalaOrganization: String): CoursierConfiguration = + value.withScalaOrganization(Option(scalaOrganization)) + def withScalaVersion(scalaVersion: String): CoursierConfiguration = + value.withScalaVersion(Option(scalaVersion)) + def withLogger(logger: CacheLogger): CoursierConfiguration = + value.withLogger(Option(logger)) + def withCache(cache: File): CoursierConfiguration = + value.withCache(Option(cache)) + def withIvyHome(ivyHome: File): CoursierConfiguration = + value.withIvyHome(Option(ivyHome)) + def withFollowHttpToHttpsRedirections(followHttpToHttpsRedirections: Boolean): CoursierConfiguration = + value.withFollowHttpToHttpsRedirections(Some(followHttpToHttpsRedirections)) + def withFollowHttpToHttpsRedirections(): CoursierConfiguration = + value.withFollowHttpToHttpsRedirections(Some(true)) + def withStrict(strict: Strict): CoursierConfiguration = + value.withStrict(Some(strict)) + def withTtl(ttl: Duration): CoursierConfiguration = + value.withTtl(Some(ttl)) + def addRepositoryAuthentication(repositoryId: String, authentication: Authentication): CoursierConfiguration = + value.withAuthenticationByRepositoryId(value.authenticationByRepositoryId :+ (repositoryId, authentication)) + + def withUpdateConfiguration(conf: UpdateConfiguration): CoursierConfiguration = + value.withMissingOk(conf.missingOk) + } + + implicit class PublicationOp(value: Publication) { + def attributes: Attributes = + Attributes(value.`type`, value.classifier) + + def withAttributes(attributes: Attributes): Publication = + value.withType(attributes.`type`) + .withClassifier(attributes.classifier) + } + + implicit class DependencyModule(value: Dependency.type) { + def apply( + module: Module, + version: String, + configuration: Configuration, + exclusions: Set[(Organization, ModuleName)], + attributes: Attributes, + optional: Boolean, + transitive: Boolean + ): Dependency = + Dependency( + module, + version, + configuration, + exclusions, + Publication("", attributes.`type`, Extension(""), attributes.classifier), + optional, + transitive + ) + } + + implicit class DependencyOp(value: Dependency) { + def attributes: Attributes = value.publication.attributes + + def withAttributes(attributes: Attributes): Dependency = + value.withPublication( + value.publication + .withType(attributes.`type`) + .withClassifier(attributes.classifier) + ) + } + + implicit class ModuleMatchersModule(value: ModuleMatchers.type) { + def all: ModuleMatchers = + ModuleMatchers(Set.empty, Set.empty) + def only(organization: String, moduleName: String): ModuleMatchers = + ModuleMatchers(Set.empty, Set(Module(Organization(organization), ModuleName(moduleName), Map())), includeByDefault = false) + def only(mod: Module): ModuleMatchers = + ModuleMatchers(Set.empty, Set(mod), includeByDefault = false) + } + + implicit class StrictOp(value: Strict) { + def addInclude(include: (String, String)*): Strict = + value.withInclude(value.include ++ include) + def addExclude(exclude: (String, String)*): Strict = + value.withExclude(value.exclude ++ exclude) + } + + implicit class AuthenticationModule(value: Authentication.type) { + def apply(headers: Seq[(String, String)]): Authentication = + Authentication("", "").withHeaders(headers) + } + + implicit class DirectCredentialsModule(value: DirectCredentials.type) { + def apply(host: String, username: String, password: String, realm: String): DirectCredentials = + DirectCredentials(host, username, password, Option(realm)) + def apply(host: String, username: String, password: String, realm: String, optional: Boolean): DirectCredentials = + DirectCredentials(host, username, password, Option(realm)) + } + + implicit class DirectCredentialsOp(value: DirectCredentials) { + def withRealm(realm: String): DirectCredentials = + value.withRealm(Option(realm)) + } + + implicit class CredentialsModule(value: Credentials.type) { + def apply(): DirectCredentials = DirectCredentials() + def apply(host: String, username: String, password: String): DirectCredentials = + DirectCredentials(host, username, password) + def apply(host: String, username: String, password: String, realm: Option[String]): DirectCredentials = + DirectCredentials(host, username, password, realm) + def apply(host: String, username: String, password: String, realm: String): DirectCredentials = + DirectCredentials(host, username, password, Option(realm)) + def apply(host: String, username: String, password: String, realm: Option[String], optional: Boolean): DirectCredentials = + DirectCredentials(host, username, password, realm, optional, matchHost = false, httpsOnly = true) + def apply(host: String, username: String, password: String, realm: String, optional: Boolean): DirectCredentials = + DirectCredentials(host, username, password, Option(realm), optional, matchHost = false, httpsOnly = true) + + def apply(f: File): FileCredentials = + FileCredentials(f.getAbsolutePath) + def apply(f: File, optional: Boolean): FileCredentials = + FileCredentials(f.getAbsolutePath, optional) + } +} diff --git a/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala b/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala index ef3a258d7..11cb03ceb 100644 --- a/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala +++ b/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala @@ -7,6 +7,7 @@ import lmcoursier.credentials.Credentials import lmcoursier.{CoursierDependencyResolution, FallbackDependency} import lmcoursier.definitions.{CacheLogger, Configuration, Project, Publication} import lmcoursier.internal.SbtCoursierCache +import lmcoursier.syntax._ import sbt.{AutoPlugin, Classpaths, Compile, Setting, TaskKey, Test, settingKey, taskKey} import sbt.Keys._ import sbt.librarymanagement.DependencyBuilders.OrganizationArtifactName diff --git a/modules/sbt-lm-coursier/src/main/scala/coursier/sbtlmcoursier/LmCoursierPlugin.scala b/modules/sbt-lm-coursier/src/main/scala/coursier/sbtlmcoursier/LmCoursierPlugin.scala index 1a2a87d19..aa30afc5e 100644 --- a/modules/sbt-lm-coursier/src/main/scala/coursier/sbtlmcoursier/LmCoursierPlugin.scala +++ b/modules/sbt-lm-coursier/src/main/scala/coursier/sbtlmcoursier/LmCoursierPlugin.scala @@ -2,6 +2,7 @@ package coursier.sbtlmcoursier import lmcoursier.definitions.{Authentication, ModuleMatchers, Reconciliation} import lmcoursier.{CoursierConfiguration, CoursierDependencyResolution, Inputs} +import lmcoursier.syntax._ import coursier.sbtcoursiershared.InputsTasks.{credentialsTask, strictTask} import coursier.sbtcoursiershared.{InputsTasks, SbtCoursierShared} import sbt.{AutoPlugin, Classpaths, Def, Setting, Task, taskKey} From d1a52064848197e7d60af7df362c12f561483cfd Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Fri, 12 Aug 2022 10:20:28 -0400 Subject: [PATCH 13/96] Ignore metals files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1e1817089..35262b401 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ target/ # Metals / bloop .metals/ .bloop/ +metals.sbt # Intellij .idea/ From 25ea593d4254d30486fb49a0708d03a9c8e14704 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sat, 13 Aug 2022 20:46:47 -0400 Subject: [PATCH 14/96] Fix test prep step --- build.sbt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/build.sbt b/build.sbt index afea3ec86..af3e59c58 100644 --- a/build.sbt +++ b/build.sbt @@ -26,6 +26,8 @@ def lmIvy = Def.setting { } } +lazy val preTest = taskKey[Unit]("prep steps before tests") + lazy val definitions = project .in(file("modules/definitions")) .disablePlugins(MimaPlugin) @@ -58,18 +60,16 @@ lazy val `lm-coursier` = project lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.13" % Test ), - Test / test := { - (publishLocal in customProtocolForTest212).value - (publishLocal in customProtocolForTest213).value - (publishLocal in customProtocolJavaForTest).value - (Test / test).value + Test / exportedProducts := { + (Test / preTest).value + (Test / exportedProducts).value }, - Test / testOnly := { - (publishLocal in customProtocolForTest212).value - (publishLocal in customProtocolForTest213).value - (publishLocal in customProtocolJavaForTest).value - (Test / testOnly).evaluated - } + Test / preTest := { + (customProtocolForTest212 / publishLocal).value + (customProtocolForTest213 / publishLocal).value + (customProtocolJavaForTest / publishLocal).value + }, + Compile / sourceGenerators += dataclassGen(definitions).taskValue, ) lazy val `lm-coursier-shaded` = project From e8b2a198fbd550f25a86407c542525becf0af446 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Fri, 12 Aug 2022 10:49:41 -0400 Subject: [PATCH 15/96] Use dataclass-scalafix for code gen This uses https://github.com/hamnis/dataclass-scalafix. --- build.sbt | 32 ++++++++++++++++--- .../lmcoursier/CoursierConfiguration.scala | 2 +- .../lmcoursier/credentials/Credentials.scala | 8 ++++- .../credentials/DirectCredentials.scala | 12 +++---- .../definitions/Authentication.scala | 13 +++----- .../lmcoursier/credentials/Credentials.scala | 19 ++++++++++- .../scala/lmcoursier/syntax/package.scala | 19 ----------- project/plugins.sbt | 1 + 8 files changed, 63 insertions(+), 43 deletions(-) mode change 120000 => 100644 modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala diff --git a/build.sbt b/build.sbt index af3e59c58..fd4c6a119 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,8 @@ import Settings._ +def dataclassScalafixV = "0.1.0-M3" + inThisBuild(List( organization := "io.get-coursier", homepage := Some(url("https://github.com/coursier/sbt-coursier")), @@ -12,10 +14,29 @@ inThisBuild(List( "", url("https://github.com/alexarchambault") ) - ) + ), + semanticdbEnabled := true, + semanticdbVersion := "4.5.9", + scalafixDependencies += "net.hamnaberg" %% "dataclass-scalafix" % dataclassScalafixV )) val coursierVersion0 = "2.1.0-M6-49-gff26f8e39" + +def dataclassGen(data: Reference) = Def.taskDyn { + val root = (ThisBuild / baseDirectory).value.toURI.toString + val from = (data / Compile / sourceDirectory).value + val to = (Compile / sourceManaged).value + val outFrom = from.toURI.toString.stripSuffix("/").stripPrefix(root) + val outTo = to.toURI.toString.stripSuffix("/").stripPrefix(root) + (data / Compile / compile).value + Def.task { + (data / Compile / scalafix) + .toTask(s" --rules GenerateDataClass --out-from=$outFrom --out-to=$outTo") + .value + (to ** "*.scala").get + } +} + def lmIvy = Def.setting { "org.scala-sbt" %% "librarymanagement-ivy" % { scalaBinaryVersion.value match { @@ -36,7 +57,7 @@ lazy val definitions = project crossScalaVersions := Seq(scala212, scala213), libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, - "io.github.alexarchambault" %% "data-class" % "0.2.5" % Provided, + "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, lmIvy.value, ), dontPublish, @@ -44,7 +65,6 @@ lazy val definitions = project lazy val `lm-coursier` = project .in(file("modules/lm-coursier")) - .dependsOn(definitions) .settings( shared, crossScalaVersions := Seq(scala212, scala213), @@ -52,6 +72,7 @@ lazy val `lm-coursier` = project Mima.lmCoursierFilters, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, + "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, // We depend on librarymanagement-ivy rather than just // librarymanagement-core to handle the ModuleDescriptor passed // to DependencyResolutionInterface.update, which is an @@ -75,14 +96,13 @@ lazy val `lm-coursier` = project lazy val `lm-coursier-shaded` = project .in(file("modules/lm-coursier/target/shaded-module")) .enablePlugins(ShadingPlugin) - .dependsOn(definitions) .settings( shared, crossScalaVersions := Seq(scala212, scala213), Mima.settings, Mima.lmCoursierFilters, Mima.lmCoursierShadedFilters, - unmanagedSourceDirectories.in(Compile) := unmanagedSourceDirectories.in(Compile).in(`lm-coursier`).value, + Compile / sources := (`lm-coursier` / Compile / sources).value, shadedModules += "io.get-coursier" %% "coursier", validNamespaces += "lmcoursier", validEntries ++= Set( @@ -116,6 +136,7 @@ lazy val `lm-coursier-shaded` = project }, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, + "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", "org.scala-lang.modules" %% "scala-xml" % "1.3.0", // depending on that one so that it doesn't get shaded lmIvy.value, @@ -215,6 +236,7 @@ lazy val `sbt-coursier-root` = project .in(file(".")) .disablePlugins(MimaPlugin) .aggregate( + definitions, `lm-coursier`, `lm-coursier-shaded`, `sbt-coursier`, diff --git a/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala b/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala index 50f765f73..09a7df697 100644 --- a/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala +++ b/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala @@ -2,7 +2,7 @@ package lmcoursier import java.io.File -import dataclass.data +import dataclass.{ data, since } import coursier.cache.CacheDefaults import lmcoursier.credentials.Credentials import lmcoursier.definitions.{Authentication, CacheLogger, CachePolicy, FromCoursier, Module, ModuleMatchers, Project, Reconciliation, Strict} diff --git a/modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala b/modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala deleted file mode 120000 index cd85138e1..000000000 --- a/modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala +++ /dev/null @@ -1 +0,0 @@ -../../../../../../lm-coursier/src/main/scala/lmcoursier/credentials/Credentials.scala \ No newline at end of file diff --git a/modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala b/modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala new file mode 100644 index 000000000..43cda490e --- /dev/null +++ b/modules/definitions/src/main/scala/lmcoursier/credentials/Credentials.scala @@ -0,0 +1,7 @@ +package lmcoursier.credentials + +import java.io.File + +abstract class Credentials extends Serializable + +object Credentials diff --git a/modules/definitions/src/main/scala/lmcoursier/credentials/DirectCredentials.scala b/modules/definitions/src/main/scala/lmcoursier/credentials/DirectCredentials.scala index fd69fe021..f77e06606 100644 --- a/modules/definitions/src/main/scala/lmcoursier/credentials/DirectCredentials.scala +++ b/modules/definitions/src/main/scala/lmcoursier/credentials/DirectCredentials.scala @@ -6,17 +6,15 @@ import dataclass._ host: String = "", username: String = "", password: String = "", - @since + @since("1.0") realm: Option[String] = None, - @since + @since("1.1") optional: Boolean = true, - @since + @since("1.2") matchHost: Boolean = false, + @since("1.3") httpsOnly: Boolean = true ) extends Credentials { - override def toString(): String = - withPassword("****") - .productIterator - .mkString("DirectCredentials(", ", ", ")") + override def toString(): String = s"DirectCredentials(host=$host, username=$username)" } diff --git a/modules/definitions/src/main/scala/lmcoursier/definitions/Authentication.scala b/modules/definitions/src/main/scala/lmcoursier/definitions/Authentication.scala index e0031f7d0..5bb231e5d 100644 --- a/modules/definitions/src/main/scala/lmcoursier/definitions/Authentication.scala +++ b/modules/definitions/src/main/scala/lmcoursier/definitions/Authentication.scala @@ -7,18 +7,13 @@ import dataclass._ password: String, optional: Boolean = false, realmOpt: Option[String] = None, - @since + @since("1.0") headers: Seq[(String,String)] = Nil, + @since("1.1") httpsOnly: Boolean = true, + @since("1.2") passOnRedirect: Boolean = false ) { override def toString(): String = - withPassword("****") - .withHeaders( - headers.map { - case (k, v) => (k, "****") - } - ) - .productIterator - .mkString("Authentication(", ", ", ")") + s"Authentication(user=$user)" } diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/credentials/Credentials.scala b/modules/lm-coursier/src/main/scala/lmcoursier/credentials/Credentials.scala index 43cda490e..27f81cebe 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/credentials/Credentials.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/credentials/Credentials.scala @@ -4,4 +4,21 @@ import java.io.File abstract class Credentials extends Serializable -object Credentials +object Credentials { + def apply(): DirectCredentials = DirectCredentials() + def apply(host: String, username: String, password: String): DirectCredentials = + DirectCredentials(host, username, password) + def apply(host: String, username: String, password: String, realm: Option[String]): DirectCredentials = + DirectCredentials(host, username, password, realm) + def apply(host: String, username: String, password: String, realm: String): DirectCredentials = + DirectCredentials(host, username, password, Option(realm)) + def apply(host: String, username: String, password: String, realm: Option[String], optional: Boolean): DirectCredentials = + DirectCredentials(host, username, password, realm, optional, matchHost = false, httpsOnly = true) + def apply(host: String, username: String, password: String, realm: String, optional: Boolean): DirectCredentials = + DirectCredentials(host, username, password, Option(realm), optional, matchHost = false, httpsOnly = true) + + def apply(f: File): FileCredentials = + FileCredentials(f.getAbsolutePath) + def apply(f: File, optional: Boolean): FileCredentials = + FileCredentials(f.getAbsolutePath, optional) +} diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala b/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala index a6ed0df39..bb34688dc 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala @@ -182,23 +182,4 @@ package object syntax { def withRealm(realm: String): DirectCredentials = value.withRealm(Option(realm)) } - - implicit class CredentialsModule(value: Credentials.type) { - def apply(): DirectCredentials = DirectCredentials() - def apply(host: String, username: String, password: String): DirectCredentials = - DirectCredentials(host, username, password) - def apply(host: String, username: String, password: String, realm: Option[String]): DirectCredentials = - DirectCredentials(host, username, password, realm) - def apply(host: String, username: String, password: String, realm: String): DirectCredentials = - DirectCredentials(host, username, password, Option(realm)) - def apply(host: String, username: String, password: String, realm: Option[String], optional: Boolean): DirectCredentials = - DirectCredentials(host, username, password, realm, optional, matchHost = false, httpsOnly = true) - def apply(host: String, username: String, password: String, realm: String, optional: Boolean): DirectCredentials = - DirectCredentials(host, username, password, Option(realm), optional, matchHost = false, httpsOnly = true) - - def apply(f: File): FileCredentials = - FileCredentials(f.getAbsolutePath) - def apply(f: File, optional: Boolean): FileCredentials = - FileCredentials(f.getAbsolutePath, optional) - } } diff --git a/project/plugins.sbt b/project/plugins.sbt index 2f4968e8e..9d6f89eee 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.0.1") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value From 59392662331eb009e75a51fa1849a39674152568 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sat, 13 Aug 2022 22:16:40 -0400 Subject: [PATCH 16/96] Convert to slash syntax --- build.sbt | 17 ++++++++++------- project/Settings.scala | 10 +++++----- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/build.sbt b/build.sbt index fd4c6a119..78d50a86e 100644 --- a/build.sbt +++ b/build.sbt @@ -20,6 +20,9 @@ inThisBuild(List( scalafixDependencies += "net.hamnaberg" %% "dataclass-scalafix" % dataclassScalafixV )) +Global / excludeLintKeys += scriptedBufferLog +Global / excludeLintKeys += scriptedLaunchOpts + val coursierVersion0 = "2.1.0-M6-49-gff26f8e39" def dataclassGen(data: Reference) = Def.taskDyn { @@ -162,7 +165,7 @@ lazy val `sbt-coursier-shared-shaded` = project .settings( plugin, generatePropertyFile, - unmanagedSourceDirectories.in(Compile) := unmanagedSourceDirectories.in(Compile).in(`sbt-coursier-shared`).value + Compile / unmanagedSourceDirectories := (`sbt-coursier-shared` / Compile / unmanagedSourceDirectories).value ) lazy val `sbt-lm-coursier` = project @@ -172,14 +175,14 @@ lazy val `sbt-lm-coursier` = project .dependsOn(`sbt-coursier-shared-shaded`) .settings( plugin, - sbtTestDirectory := sbtTestDirectory.in(`sbt-coursier`).value, + sbtTestDirectory := (`sbt-coursier` / sbtTestDirectory).value, scriptedDependencies := { scriptedDependencies.value // TODO Get those automatically // (but shouldn't scripted itself handle that…?) - publishLocal.in(`lm-coursier-shaded`).value - publishLocal.in(`sbt-coursier-shared-shaded`).value + (`lm-coursier-shaded` / publishLocal).value + (`sbt-coursier-shared-shaded` / publishLocal).value } ) @@ -195,8 +198,8 @@ lazy val `sbt-coursier` = project // TODO Get dependency projects automatically // (but shouldn't scripted itself handle that…?) - publishLocal.in(`lm-coursier`).value - publishLocal.in(`sbt-coursier-shared`).value + (`lm-coursier` / publishLocal).value + (`sbt-coursier-shared` / publishLocal).value } ) @@ -246,6 +249,6 @@ lazy val `sbt-coursier-root` = project ) .settings( shared, - skip.in(publish) := true + (publish / skip) := true ) diff --git a/project/Settings.scala b/project/Settings.scala index ad7d8632f..3b21982d2 100644 --- a/project/Settings.scala +++ b/project/Settings.scala @@ -48,8 +48,8 @@ object Settings { val prop = sys.props.getOrElse("publish.javadoc", "").toLowerCase(Locale.ROOT) if (prop == "0" || prop == "false") Seq( - sources in (Compile, doc) := Seq.empty, - publishArtifact in (Compile, packageDoc) := false + Compile / doc / sources := Seq.empty, + Compile / packageDoc / publishArtifact := false ) else Nil @@ -69,14 +69,14 @@ object Settings { ), scriptedBufferLog := false, sbtPlugin := true, - sbtVersion.in(pluginCrossBuild) := targetSbtVersion + pluginCrossBuild / sbtVersion := targetSbtVersion ) lazy val generatePropertyFile = - resourceGenerators.in(Compile) += Def.task { + Compile / resourceGenerators += Def.task { import sys.process._ - val dir = classDirectory.in(Compile).value / "coursier" + val dir = (Compile / classDirectory).value / "coursier" val ver = version.value val f = dir / "sbtcoursier.properties" From 819665579413e9e3c128a64fc60db49267cad765 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 15 Aug 2022 10:55:42 +0200 Subject: [PATCH 17/96] Update data-class to 0.2.6 (#405) --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index ebd85f79e..46cc29d5c 100644 --- a/build.sbt +++ b/build.sbt @@ -28,7 +28,7 @@ lazy val `lm-coursier` = project Mima.lmCoursierFilters, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, - "io.github.alexarchambault" %% "data-class" % "0.2.5" % Provided, + "io.github.alexarchambault" %% "data-class" % "0.2.6" % Provided, // We depend on librarymanagement-ivy rather than just // librarymanagement-core to handle the ModuleDescriptor passed // to DependencyResolutionInterface.update, which is an @@ -97,7 +97,7 @@ lazy val `lm-coursier-shaded` = project }, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, - "io.github.alexarchambault" %% "data-class" % "0.2.5" % Provided, + "io.github.alexarchambault" %% "data-class" % "0.2.6" % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", "org.scala-lang.modules" %% "scala-xml" % "1.3.0", // depending on that one so that it doesn't get shaded "org.scala-sbt" %% "librarymanagement-ivy" % { From d0af20e3cde0ffcbe80d3ee24d84b608f5cdc120 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Mon, 15 Aug 2022 16:00:07 +0200 Subject: [PATCH 18/96] Remove now deprecated sbt launcher script (#406) --- sbt | 704 ------------------------------------------------------------ 1 file changed, 704 deletions(-) delete mode 100755 sbt diff --git a/sbt b/sbt deleted file mode 100755 index 9fc15a12a..000000000 --- a/sbt +++ /dev/null @@ -1,704 +0,0 @@ -#!/usr/bin/env bash -# -# A more capable sbt runner, coincidentally also called sbt. -# Author: Paul Phillips -# https://github.com/paulp/sbt-extras -# -# Generated from http://www.opensource.org/licenses/bsd-license.php -# Copyright (c) 2011, Paul Phillips. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the author nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -set -o pipefail - -declare -r sbt_release_version="1.4.0" -declare -r sbt_unreleased_version="1.4.0" - -declare -r latest_213="2.13.3" -declare -r latest_212="2.12.12" -declare -r latest_211="2.11.12" -declare -r latest_210="2.10.7" -declare -r latest_29="2.9.3" -declare -r latest_28="2.8.2" - -declare -r buildProps="project/build.properties" - -declare -r sbt_launch_ivy_release_repo="https://repo.typesafe.com/typesafe/ivy-releases" -declare -r sbt_launch_ivy_snapshot_repo="https://repo.scala-sbt.org/scalasbt/ivy-snapshots" -declare -r sbt_launch_mvn_release_repo="https://repo.scala-sbt.org/scalasbt/maven-releases" -declare -r sbt_launch_mvn_snapshot_repo="https://repo.scala-sbt.org/scalasbt/maven-snapshots" - -declare -r default_jvm_opts_common="-Xms512m -Xss2m -XX:MaxInlineLevel=18" -declare -r noshare_opts="-Dsbt.global.base=project/.sbtboot -Dsbt.boot.directory=project/.boot -Dsbt.ivy.home=project/.ivy -Dsbt.coursier.home=project/.coursier" - -declare -r default_coursier_launcher_version="1.2.22" -declare coursier_launcher_version="default" - -declare sbt_jar sbt_dir sbt_create sbt_version sbt_script sbt_new -declare sbt_explicit_version -declare verbose noshare batch trace_level - -declare java_cmd="java" -declare sbt_launch_dir="$HOME/.sbt/launchers" -declare sbt_launch_repo - -# pull -J and -D options to give to java. -declare -a java_args scalac_args sbt_commands residual_args - -# args to jvm/sbt via files or environment variables -declare -a extra_jvm_opts extra_sbt_opts - -echoerr() { echo >&2 "$@"; } -vlog() { [[ -n "$verbose" ]] && echoerr "$@"; } -die() { - echo "Aborting: $*" - exit 1 -} - -setTrapExit() { - # save stty and trap exit, to ensure echo is re-enabled if we are interrupted. - SBT_STTY="$(stty -g 2>/dev/null)" - export SBT_STTY - - # restore stty settings (echo in particular) - onSbtRunnerExit() { - [ -t 0 ] || return - vlog "" - vlog "restoring stty: $SBT_STTY" - stty "$SBT_STTY" - } - - vlog "saving stty: $SBT_STTY" - trap onSbtRunnerExit EXIT -} - -# this seems to cover the bases on OSX, and someone will -# have to tell me about the others. -get_script_path() { - local path="$1" - [[ -L "$path" ]] || { - echo "$path" - return - } - - local -r target="$(readlink "$path")" - if [[ "${target:0:1}" == "/" ]]; then - echo "$target" - else - echo "${path%/*}/$target" - fi -} - -script_path="$(get_script_path "${BASH_SOURCE[0]}")" -declare -r script_path -script_name="${script_path##*/}" -declare -r script_name - -init_default_option_file() { - local overriding_var="${!1}" - local default_file="$2" - if [[ ! -r "$default_file" && "$overriding_var" =~ ^@(.*)$ ]]; then - local envvar_file="${BASH_REMATCH[1]}" - if [[ -r "$envvar_file" ]]; then - default_file="$envvar_file" - fi - fi - echo "$default_file" -} - -sbt_opts_file="$(init_default_option_file SBT_OPTS .sbtopts)" -sbtx_opts_file="$(init_default_option_file SBTX_OPTS .sbtxopts)" -jvm_opts_file="$(init_default_option_file JVM_OPTS .jvmopts)" - -build_props_sbt() { - [[ -r "$buildProps" ]] && - grep '^sbt\.version' "$buildProps" | tr '=\r' ' ' | awk '{ print $2; }' -} - -set_sbt_version() { - sbt_version="${sbt_explicit_version:-$(build_props_sbt)}" - [[ -n "$sbt_version" ]] || sbt_version=$sbt_release_version - export sbt_version -} - -url_base() { - local version="$1" - - case "$version" in - 0.7.*) echo "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/simple-build-tool" ;; - 0.10.*) echo "$sbt_launch_ivy_release_repo" ;; - 0.11.[12]) echo "$sbt_launch_ivy_release_repo" ;; - 0.*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9]) # ie "*-yyyymmdd-hhMMss" - echo "$sbt_launch_ivy_snapshot_repo" ;; - 0.*) echo "$sbt_launch_ivy_release_repo" ;; - *-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]T[0-9][0-9][0-9][0-9][0-9][0-9]) # ie "*-yyyymmddThhMMss" - echo "$sbt_launch_mvn_snapshot_repo" ;; - *) echo "$sbt_launch_mvn_release_repo" ;; - esac -} - -make_url() { - local version="$1" - - local base="${sbt_launch_repo:-$(url_base "$version")}" - - case "$version" in - 0.7.*) echo "$base/sbt-launch-0.7.7.jar" ;; - 0.10.*) echo "$base/org.scala-tools.sbt/sbt-launch/$version/sbt-launch.jar" ;; - 0.11.[12]) echo "$base/org.scala-tools.sbt/sbt-launch/$version/sbt-launch.jar" ;; - 0.*) echo "$base/org.scala-sbt/sbt-launch/$version/sbt-launch.jar" ;; - *) echo "$base/org/scala-sbt/sbt-launch/$version/sbt-launch-${version}.jar" ;; - esac -} - -make_coursier_url () { - local version="$1" - - echo "https://github.com/coursier/sbt-launcher/releases/download/v$version/csbt" -} - -enable_coursier () { - if [[ -z "$coursier_launcher_version" ]]; then - coursier_launcher_version="$default_coursier_launcher_version" - fi -} - -addJava() { - vlog "[addJava] arg = '$1'" - java_args+=("$1") -} -addSbt() { - vlog "[addSbt] arg = '$1'" - sbt_commands+=("$1") -} -addScalac() { - vlog "[addScalac] arg = '$1'" - scalac_args+=("$1") -} -addResidual() { - vlog "[residual] arg = '$1'" - residual_args+=("$1") -} - -addResolver() { addSbt "set resolvers += $1"; } - -addDebugger() { addJava "-Xdebug" && addJava "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$1"; } - -setThisBuild() { - vlog "[addBuild] args = '$*'" - local key="$1" && shift - addSbt "set $key in ThisBuild := $*" -} -setScalaVersion() { - [[ "$1" == *"-SNAPSHOT" ]] && addResolver 'Resolver.sonatypeRepo("snapshots")' - addSbt "++ $1" -} -setJavaHome() { - java_cmd="$1/bin/java" - setThisBuild javaHome "_root_.scala.Some(file(\"$1\"))" - export JAVA_HOME="$1" - export JDK_HOME="$1" - export PATH="$JAVA_HOME/bin:$PATH" -} - -getJavaVersion() { - local -r str=$("$1" -version 2>&1 | grep -E -e '(java|openjdk) version' | awk '{ print $3 }' | tr -d '"') - - # java -version on java8 says 1.8.x - # but on 9 and 10 it's 9.x.y and 10.x.y. - if [[ "$str" =~ ^1\.([0-9]+)(\..*)?$ ]]; then - echo "${BASH_REMATCH[1]}" - elif [[ "$str" =~ ^([0-9]+)(\..*)?$ ]]; then - echo "${BASH_REMATCH[1]}" - elif [[ -n "$str" ]]; then - echoerr "Can't parse java version from: $str" - fi -} - -checkJava() { - # Warn if there is a Java version mismatch between PATH and JAVA_HOME/JDK_HOME - - [[ -n "$JAVA_HOME" && -e "$JAVA_HOME/bin/java" ]] && java="$JAVA_HOME/bin/java" - [[ -n "$JDK_HOME" && -e "$JDK_HOME/lib/tools.jar" ]] && java="$JDK_HOME/bin/java" - - if [[ -n "$java" ]]; then - pathJavaVersion=$(getJavaVersion java) - homeJavaVersion=$(getJavaVersion "$java") - if [[ "$pathJavaVersion" != "$homeJavaVersion" ]]; then - echoerr "Warning: Java version mismatch between PATH and JAVA_HOME/JDK_HOME, sbt will use the one in PATH" - echoerr " Either: fix your PATH, remove JAVA_HOME/JDK_HOME or use -java-home" - echoerr " java version from PATH: $pathJavaVersion" - echoerr " java version from JAVA_HOME/JDK_HOME: $homeJavaVersion" - fi - fi -} - -java_version() { - local -r version=$(getJavaVersion "$java_cmd") - vlog "Detected Java version: $version" - echo "$version" -} - -# MaxPermSize critical on pre-8 JVMs but incurs noisy warning on 8+ -default_jvm_opts() { - local -r v="$(java_version)" - if [[ $v -ge 10 ]]; then - echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler" - elif [[ $v -ge 8 ]]; then - echo "$default_jvm_opts_common" - else - echo "-XX:MaxPermSize=384m $default_jvm_opts_common" - fi -} - -execRunner() { - # print the arguments one to a line, quoting any containing spaces - vlog "# Executing command line:" && { - for arg; do - if [[ -n "$arg" ]]; then - if printf "%s\n" "$arg" | grep -q ' '; then - printf >&2 "\"%s\"\n" "$arg" - else - printf >&2 "%s\n" "$arg" - fi - fi - done - vlog "" - } - - setTrapExit - - if [[ -n "$batch" ]]; then - "$@" /dev/null 2>&1; then - curl --fail --silent --location "$url" --output "$jar" - elif command -v wget >/dev/null 2>&1; then - wget -q -O "$jar" "$url" - fi - } && [[ -r "$jar" ]] -} - -acquire_sbt_jar() { - - # if none of the options touched coursier_launcher_version, use the coursier - # launcher with sbt >= 0.13.8 - if [[ "$coursier_launcher_version" = "default" ]]; then - case "$sbt_version" in - 0.13.[89] | 0.13.1[0-9] | 1.* ) coursier_launcher_version="$default_coursier_launcher_version" ;; - * ) coursier_launcher_version="" ;; - esac - fi - - { - if [[ -z "$coursier_launcher_version" ]]; then - sbt_jar="$(jar_file "$sbt_version")" - else - sbt_jar="$(jar_file "coursier_$coursier_launcher_version")" - fi - - [[ -r "$sbt_jar" ]] - } || { - sbt_jar="$HOME/.ivy2/local/org.scala-sbt/sbt-launch/$sbt_version/jars/sbt-launch.jar" - [[ -z "$coursier_launcher_version" && -r "$sbt_jar" ]] - } || { - if [[ -z "$coursier_launcher_version" ]]; then - sbt_jar="$(jar_file "$sbt_version")" - jar_url="$(make_url "$sbt_version")" - - download_url "${jar_url}" "${sbt_jar}" \ - "Downloading sbt launcher for ${sbt_version}:" - - case "${sbt_version}" in - 0.*) - vlog "SBT versions < 1.0 do not have published MD5 checksums, skipping check" - echo "" - ;; - *) verify_sbt_jar "${sbt_jar}" ;; - esac - else - sbt_jar="$(jar_file "coursier_$coursier_launcher_version")" - download_url "$(make_coursier_url "$coursier_launcher_version")" "$sbt_jar" \ - "Downloading coursier sbt launcher ${coursier_launcher_version}:" - fi - } -} - -verify_sbt_jar() { - local jar="${1}" - local md5="${jar}.md5" - md5url="$(make_url "${sbt_version}").md5" - - echoerr "Downloading sbt launcher ${sbt_version} md5 hash:" - echoerr " From ${md5url}" - echoerr " To ${md5}" - - download_url "${md5url}" "${md5}" >/dev/null 2>&1 - - if command -v md5sum >/dev/null 2>&1; then - if echo "$(cat "${md5}") ${jar}" | md5sum -c -; then - rm -rf "${md5}" - return 0 - else - echoerr "Checksum does not match" - return 1 - fi - elif command -v md5 >/dev/null 2>&1; then - if [ "$(md5 -q "${jar}")" == "$(cat "${md5}")" ]; then - rm -rf "${md5}" - return 0 - else - echoerr "Checksum does not match" - return 1 - fi - elif command -v openssl >/dev/null 2>&1; then - if [ "$(openssl md5 -r "${jar}" | awk '{print $1}')" == "$(cat "${md5}")" ]; then - rm -rf "${md5}" - return 0 - else - echoerr "Checksum does not match" - return 1 - fi - else - echoerr "Could not find an MD5 command" - return 1 - fi -} - -usage() { - set_sbt_version - cat < display stack traces with a max of frames (default: -1, traces suppressed) - -debug-inc enable debugging log for the incremental compiler - -no-colors disable ANSI color codes - -sbt-create start sbt even if current directory contains no sbt project - -sbt-dir path to global settings/plugins directory (default: ~/.sbt/) - -sbt-boot path to shared boot directory (default: ~/.sbt/boot in 0.11+) - -ivy path to local Ivy repository (default: ~/.ivy2) - -no-share use all local caches; no sharing - -offline put sbt in offline mode - -jvm-debug Turn on JVM debugging, open at the given port. - -batch Disable interactive mode - -prompt Set the sbt prompt; in expr, 's' is the State and 'e' is Extracted - -script Run the specified file as a scala script - -coursier use a coursier-based launcher rather than an official sbt launcher (default) - -mainline use the mainline sbt launcher - - # sbt version (default: sbt.version from $buildProps if present, otherwise $sbt_release_version) - -sbt-version use the specified version of sbt (default: $sbt_release_version) - -sbt-force-latest force the use of the latest release of sbt: $sbt_release_version - -sbt-dev use the latest pre-release version of sbt: $sbt_unreleased_version - -sbt-jar use the specified jar as the sbt launcher - -sbt-launch-dir directory to hold sbt launchers (default: $sbt_launch_dir) - -sbt-launch-repo repo url for downloading sbt launcher jar (default: $(url_base "$sbt_version")) - - # scala version (default: as chosen by sbt) - -28 use $latest_28 - -29 use $latest_29 - -210 use $latest_210 - -211 use $latest_211 - -212 use $latest_212 - -213 use $latest_213 - -scala-home use the scala build at the specified directory - -scala-version use the specified version of scala - -binary-version use the specified scala version when searching for dependencies - - # java version (default: java from PATH, currently $(java -version 2>&1 | grep version)) - -java-home alternate JAVA_HOME - - # passing options to the jvm - note it does NOT use JAVA_OPTS due to pollution - # The default set is used if JVM_OPTS is unset and no -jvm-opts file is found - $(default_jvm_opts) - JVM_OPTS environment variable holding either the jvm args directly, or - the reference to a file containing jvm args if given path is prepended by '@' (e.g. '@/etc/jvmopts') - Note: "@"-file is overridden by local '.jvmopts' or '-jvm-opts' argument. - -jvm-opts file containing jvm args (if not given, .jvmopts in project root is used if present) - -Dkey=val pass -Dkey=val directly to the jvm - -J-X pass option -X directly to the jvm (-J is stripped) - - # passing options to sbt, OR to this runner - SBT_OPTS environment variable holding either the sbt args directly, or - the reference to a file containing sbt args if given path is prepended by '@' (e.g. '@/etc/sbtopts') - Note: "@"-file is overridden by local '.sbtopts' or '-sbt-opts' argument. - -sbt-opts file containing sbt args (if not given, .sbtopts in project root is used if present) - -S-X add -X to sbt's scalacOptions (-S is stripped) - - # passing options exclusively to this runner - SBTX_OPTS environment variable holding either the sbt-extras args directly, or - the reference to a file containing sbt-extras args if given path is prepended by '@' (e.g. '@/etc/sbtxopts') - Note: "@"-file is overridden by local '.sbtxopts' or '-sbtx-opts' argument. - -sbtx-opts file containing sbt-extras args (if not given, .sbtxopts in project root is used if present) -EOM - exit 0 -} - -process_args() { - require_arg() { - local type="$1" - local opt="$2" - local arg="$3" - - if [[ -z "$arg" ]] || [[ "${arg:0:1}" == "-" ]]; then - die "$opt requires <$type> argument" - fi - } - while [[ $# -gt 0 ]]; do - case "$1" in - -h | -help) usage ;; - -v) verbose=true && shift ;; - -d) addSbt "--debug" && shift ;; - -w) addSbt "--warn" && shift ;; - -q) addSbt "--error" && shift ;; - -x) shift ;; # currently unused - -trace) require_arg integer "$1" "$2" && trace_level="$2" && shift 2 ;; - -debug-inc) addJava "-Dxsbt.inc.debug=true" && shift ;; - - -no-colors) addJava "-Dsbt.log.noformat=true" && shift ;; - -sbt-create) sbt_create=true && shift ;; - -sbt-dir) require_arg path "$1" "$2" && sbt_dir="$2" && shift 2 ;; - -sbt-boot) require_arg path "$1" "$2" && addJava "-Dsbt.boot.directory=$2" && shift 2 ;; - -ivy) require_arg path "$1" "$2" && addJava "-Dsbt.ivy.home=$2" && shift 2 ;; - -no-share) noshare=true && shift ;; - -offline) addSbt "set offline in Global := true" && shift ;; - -jvm-debug) require_arg port "$1" "$2" && addDebugger "$2" && shift 2 ;; - -batch) batch=true && shift ;; - -prompt) require_arg "expr" "$1" "$2" && setThisBuild shellPrompt "(s => { val e = Project.extract(s) ; $2 })" && shift 2 ;; - -script) require_arg file "$1" "$2" && sbt_script="$2" && addJava "-Dsbt.main.class=sbt.ScriptMain" && shift 2 ;; - - -sbt-version) require_arg version "$1" "$2" && sbt_explicit_version="$2" && shift 2 ;; - -sbt-force-latest) sbt_explicit_version="$sbt_release_version" && shift ;; - -sbt-dev) sbt_explicit_version="$sbt_unreleased_version" && shift ;; - -sbt-jar) require_arg path "$1" "$2" && sbt_jar="$2" && shift 2 ;; - -sbt-launch-dir) require_arg path "$1" "$2" && sbt_launch_dir="$2" && shift 2 ;; - -sbt-launch-repo) require_arg path "$1" "$2" && sbt_launch_repo="$2" && shift 2 ;; - - -28) setScalaVersion "$latest_28" && shift ;; - -29) setScalaVersion "$latest_29" && shift ;; - -210) setScalaVersion "$latest_210" && shift ;; - -211) setScalaVersion "$latest_211" && shift ;; - -212) setScalaVersion "$latest_212" && shift ;; - -213) setScalaVersion "$latest_213" && shift ;; - - -coursier) enable_coursier && shift ;; - -mainline) coursier_launcher_version="" && shift ;; - -coursier-version) require_arg version "$1" "$2" && coursier_launcher_version="$2" && shift 2 ;; - - -scala-version) require_arg version "$1" "$2" && setScalaVersion "$2" && shift 2 ;; - -binary-version) require_arg version "$1" "$2" && setThisBuild scalaBinaryVersion "\"$2\"" && shift 2 ;; - -scala-home) require_arg path "$1" "$2" && setThisBuild scalaHome "_root_.scala.Some(file(\"$2\"))" && shift 2 ;; - -java-home) require_arg path "$1" "$2" && setJavaHome "$2" && shift 2 ;; - -sbt-opts) require_arg path "$1" "$2" && sbt_opts_file="$2" && shift 2 ;; - -sbtx-opts) require_arg path "$1" "$2" && sbtx_opts_file="$2" && shift 2 ;; - -jvm-opts) require_arg path "$1" "$2" && jvm_opts_file="$2" && shift 2 ;; - - -D*) addJava "$1" && shift ;; - -J*) addJava "${1:2}" && shift ;; - -S*) addScalac "${1:2}" && shift ;; - - new) sbt_new=true && : ${sbt_explicit_version:=$sbt_release_version} && addResidual "$1" && shift ;; - - *) addResidual "$1" && shift ;; - esac - done -} - -# process the direct command line arguments -process_args "$@" - -# skip #-styled comments and blank lines -readConfigFile() { - local end=false - until $end; do - read -r || end=true - [[ $REPLY =~ ^# ]] || [[ -z $REPLY ]] || echo "$REPLY" - done <"$1" -} - -# if there are file/environment sbt_opts, process again so we -# can supply args to this runner -if [[ -r "$sbt_opts_file" ]]; then - vlog "Using sbt options defined in file $sbt_opts_file" - while read -r opt; do extra_sbt_opts+=("$opt"); done < <(readConfigFile "$sbt_opts_file") -elif [[ -n "$SBT_OPTS" && ! ("$SBT_OPTS" =~ ^@.*) ]]; then - vlog "Using sbt options defined in variable \$SBT_OPTS" - IFS=" " read -r -a extra_sbt_opts <<<"$SBT_OPTS" -else - vlog "No extra sbt options have been defined" -fi - -# if there are file/environment sbtx_opts, process again so we -# can supply args to this runner -if [[ -r "$sbtx_opts_file" ]]; then - vlog "Using sbt options defined in file $sbtx_opts_file" - while read -r opt; do extra_sbt_opts+=("$opt"); done < <(readConfigFile "$sbtx_opts_file") -elif [[ -n "$SBTX_OPTS" && ! ("$SBTX_OPTS" =~ ^@.*) ]]; then - vlog "Using sbt options defined in variable \$SBTX_OPTS" - IFS=" " read -r -a extra_sbt_opts <<<"$SBTX_OPTS" -else - vlog "No extra sbt options have been defined" -fi - -[[ -n "${extra_sbt_opts[*]}" ]] && process_args "${extra_sbt_opts[@]}" - -# reset "$@" to the residual args -set -- "${residual_args[@]}" -argumentCount=$# - -# set sbt version -set_sbt_version - -checkJava - -# only exists in 0.12+ -setTraceLevel() { - case "$sbt_version" in - "0.7."* | "0.10."* | "0.11."*) echoerr "Cannot set trace level in sbt version $sbt_version" ;; - *) setThisBuild traceLevel "$trace_level" ;; - esac -} - -# set scalacOptions if we were given any -S opts -[[ ${#scalac_args[@]} -eq 0 ]] || addSbt "set scalacOptions in ThisBuild += \"${scalac_args[*]}\"" - -[[ -n "$sbt_explicit_version" && -z "$sbt_new" ]] && addJava "-Dsbt.version=$sbt_explicit_version" -vlog "Detected sbt version $sbt_version" - -if [[ -n "$sbt_script" ]]; then - residual_args=("$sbt_script" "${residual_args[@]}") -else - # no args - alert them there's stuff in here - ((argumentCount > 0)) || { - vlog "Starting $script_name: invoke with -help for other options" - residual_args=(shell) - } -fi - -# verify this is an sbt dir, -create was given or user attempts to run a scala script -[[ -r ./build.sbt || -d ./project || -n "$sbt_create" || -n "$sbt_script" || -n "$sbt_new" ]] || { - cat < Date: Mon, 15 Aug 2022 16:32:00 +0200 Subject: [PATCH 19/96] Update sbt, scripted-plugin to 1.7.1 (#397) * Applied Scalafix rule(s) https://gist.githubusercontent.com/eed3si9n/57e83f5330592d968ce49f0d5030d4d5/raw/7f576f16a90e432baa49911c9a66204c354947bb/Sbt0_13BuildSyntax.scala See https://eed3si9n.com/syntactic-scalafix-rule-for-unified-slash-syntax for details * Update sbt, scripted-plugin to 1.7.1 * fix scalafix stuff Co-authored-by: Alexandre Archambault --- project/Settings.scala | 2 +- project/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/project/Settings.scala b/project/Settings.scala index 3b21982d2..257f4612d 100644 --- a/project/Settings.scala +++ b/project/Settings.scala @@ -20,7 +20,7 @@ object Settings { } lazy val shared = Seq( - resolvers += Resolver.sonatypeRepo("releases"), + resolvers ++= Resolver.sonatypeOssRepos("releases"), crossScalaVersions := Seq(scala212), scalaVersion := scala212, scalacOptions ++= Seq( diff --git a/project/build.properties b/project/build.properties index bb3a9b7dc..22af2628c 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.6 +sbt.version=1.7.1 From 87225ad1bf5bf91c77d6a2ca6df986251ed0f904 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 12 Aug 2022 16:06:04 +0200 Subject: [PATCH 20/96] Use newer coursier/setup-action That pulls coursier > 2.1.0-M5, that has coursier/coursier#2375 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffd630a74..186b9e3c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: fetch-depth: 0 submodules: true - uses: coursier/cache-action@v6.3 - - uses: coursier/setup-action@v1 + - uses: coursier/setup-action@v1.2.1 with: jvm: 8 apps: sbt @@ -48,7 +48,7 @@ jobs: fetch-depth: 0 submodules: true - uses: coursier/cache-action@v6.3 - - uses: coursier/setup-action@v1 + - uses: coursier/setup-action@v1.2.1 with: jvm: 8 apps: sbt From 82bd9a10ddb741f7331d4c606fd72c6818b35d94 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 12 Aug 2022 14:48:09 +0200 Subject: [PATCH 21/96] Ensure lmcoursier can load jniutils stuff fine on Windows --- build.sbt | 11 ++++++++++- scripts/ci.sh | 9 +++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 78d50a86e..a9ce2bfa6 100644 --- a/build.sbt +++ b/build.sbt @@ -66,6 +66,10 @@ lazy val definitions = project dontPublish, ) +// FIXME Ideally, we should depend on the same version of io.get-coursier.jniutils:windows-jni-utils that +// io.get-coursier::coursier depends on. +val jniUtilsVersion = "0.3.3" + lazy val `lm-coursier` = project .in(file("modules/lm-coursier")) .settings( @@ -75,6 +79,7 @@ lazy val `lm-coursier` = project Mima.lmCoursierFilters, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, + "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, // We depend on librarymanagement-ivy rather than just // librarymanagement-core to handle the ModuleDescriptor passed @@ -106,7 +111,10 @@ lazy val `lm-coursier-shaded` = project Mima.lmCoursierFilters, Mima.lmCoursierShadedFilters, Compile / sources := (`lm-coursier` / Compile / sources).value, - shadedModules += "io.get-coursier" %% "coursier", + shadedModules ++= Set( + "io.get-coursier" %% "coursier", + "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" + ), validNamespaces += "lmcoursier", validEntries ++= Set( // FIXME Ideally, we should just strip those from the resulting JAR… @@ -139,6 +147,7 @@ lazy val `lm-coursier-shaded` = project }, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, + "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", "org.scala-lang.modules" %% "scala-xml" % "1.3.0", // depending on that one so that it doesn't get shaded diff --git a/scripts/ci.sh b/scripts/ci.sh index 218e87dce..c0849d995 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash set -euvx +# Force the use of coursier JNI stuff on Windows, which ought to work fine. +# JNI stuff is used to compute the default cache location on Windows (to get the AppData local +# dir, or something like this, via native Windows APIs). +# Without this, if ever coursier fails to load its JNI library on Windows, it falls back +# to using some powershell scripts (via dirs-dev/directories-jvm), which are often a problem, +# see sbt/sbt#5206. +# Enable this once sbt uses the upcoming lm-coursier-shaded version (> 2.0.10-1) +# export COURSIER_JNI="force" + if [ "$(expr substr $(uname -s) 1 5 2>/dev/null)" == "Linux" ]; then SBT="sbt" elif [ "$(uname)" == "Darwin" ]; then From 21a7e747109cec28270d727e24fdea33971ec5b8 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 16 Aug 2022 16:16:28 +0200 Subject: [PATCH 22/96] Update coursier to 2.1.0-M6-53-gb4f448130 (#408) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a9ce2bfa6..01a04f223 100644 --- a/build.sbt +++ b/build.sbt @@ -23,7 +23,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -val coursierVersion0 = "2.1.0-M6-49-gff26f8e39" +val coursierVersion0 = "2.1.0-M6-53-gb4f448130" def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString From f8f3917ba9524b08904fffd72c7f2269c4f5aba3 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 16 Aug 2022 16:40:29 +0200 Subject: [PATCH 23/96] Update sbt-shading to 2.1.0 (#409) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 9d6f89eee..829d4b751 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0") -addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.0.1") +addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value From 8eadc24d3f60d8d5801c7bea4f05062f3c3d8e08 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 16 Aug 2022 17:40:34 +0200 Subject: [PATCH 24/96] Update sbt-scalafix to 0.10.1 (#407) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 829d4b751..63ab76914 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.0") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value From dc69ec56df19ac264a314a9017876c44693ff92c Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 7 Sep 2022 19:05:20 +0200 Subject: [PATCH 25/96] Update utest to 0.8.1 (#410) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 01a04f223..f09b989cf 100644 --- a/build.sbt +++ b/build.sbt @@ -163,7 +163,7 @@ lazy val `sbt-coursier-shared` = project .settings( plugin, generatePropertyFile, - libraryDependencies += "com.lihaoyi" %% "utest" % "0.8.0" % Test, + libraryDependencies += "com.lihaoyi" %% "utest" % "0.8.1" % Test, testFrameworks += new TestFramework("utest.runner.Framework") ) From 0f465e23aa885fafe7f529cd908b0ab00f177ab7 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 13 Sep 2022 11:22:44 +0200 Subject: [PATCH 26/96] Update dataclass-annotation, ... to 0.1.0 (#411) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f09b989cf..4dd303d95 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ import Settings._ -def dataclassScalafixV = "0.1.0-M3" +def dataclassScalafixV = "0.1.0" inThisBuild(List( organization := "io.get-coursier", From 32e67efb58e698cf43690f16ed9f914f261e0ecc Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 19 Sep 2022 10:15:51 +0200 Subject: [PATCH 27/96] Update sbt-scalafix to 0.10.2 (#412) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 63ab76914..6d79fe08d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.0") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.2") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value From 34724936386ee4a1ad35d24a46bda0ec4444b3e7 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 19 Sep 2022 10:16:06 +0200 Subject: [PATCH 28/96] Update sbt-mima-plugin to 1.1.1 (#413) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 6d79fe08d..189d9ad7f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.1") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.2") From 12db8905df73fa980aa4413b3fa1a57f0a5ad848 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:10:36 +0200 Subject: [PATCH 29/96] Update scalatest to 3.2.14 (#420) --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 4dd303d95..9de9bb785 100644 --- a/build.sbt +++ b/build.sbt @@ -87,7 +87,7 @@ lazy val `lm-coursier` = project // IvySbt#Module (seems DependencyResolutionInterface.moduleDescriptor // is ignored). lmIvy.value, - "org.scalatest" %% "scalatest" % "3.2.13" % Test + "org.scalatest" %% "scalatest" % "3.2.14" % Test ), Test / exportedProducts := { (Test / preTest).value @@ -152,7 +152,7 @@ lazy val `lm-coursier-shaded` = project "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", "org.scala-lang.modules" %% "scala-xml" % "1.3.0", // depending on that one so that it doesn't get shaded lmIvy.value, - "org.scalatest" %% "scalatest" % "3.2.13" % Test + "org.scalatest" %% "scalatest" % "3.2.14" % Test ) ) From 2f1d19ab8c21418a22983b9e4803caf793d85445 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:10:43 +0200 Subject: [PATCH 30/96] Update sbt, scripted-plugin to 1.7.2 (#419) --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 22af2628c..563a014da 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.1 +sbt.version=1.7.2 From 76a320c98e95eda094bbd9b60cb5fdf6d6a3e6be Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:10:52 +0200 Subject: [PATCH 31/96] Update sbt-scalafix to 0.10.4 (#416) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 189d9ad7f..2536a745f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.1") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.0") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.2") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value From bf9ff1c5205b1678c40816c9e59614669dbc49c6 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 18 Oct 2022 17:08:15 +0200 Subject: [PATCH 32/96] Update scala-library to 2.13.10 (#418) * Update scala-library to 2.13.10 * Bump semanticdb version too Co-authored-by: Alexandre Archambault --- build.sbt | 2 +- project/Settings.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 9de9bb785..68300809d 100644 --- a/build.sbt +++ b/build.sbt @@ -16,7 +16,7 @@ inThisBuild(List( ) ), semanticdbEnabled := true, - semanticdbVersion := "4.5.9", + semanticdbVersion := "4.6.0", scalafixDependencies += "net.hamnaberg" %% "dataclass-scalafix" % dataclassScalafixV )) diff --git a/project/Settings.scala b/project/Settings.scala index 257f4612d..c2985236d 100644 --- a/project/Settings.scala +++ b/project/Settings.scala @@ -10,7 +10,7 @@ import com.jsuereth.sbtpgp._ object Settings { def scala212 = "2.12.16" - def scala213 = "2.13.8" + def scala213 = "2.13.10" def targetSbtVersion = "1.2.8" From 38f75d3de5a67a098d5170c9ca4fcd5a3ee27f69 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 18 Oct 2022 17:38:11 +0200 Subject: [PATCH 33/96] Update coursier to 2.1.0-M7-18-g67daad6a9 (#417) * Update coursier to 2.1.0-M7-18-g67daad6a9 * Update shading config Co-authored-by: Alexandre Archambault --- build.sbt | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 68300809d..23937769e 100644 --- a/build.sbt +++ b/build.sbt @@ -23,7 +23,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -val coursierVersion0 = "2.1.0-M6-53-gb4f448130" +val coursierVersion0 = "2.1.0-M7-18-g67daad6a9" def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString @@ -123,7 +123,42 @@ lazy val `lm-coursier-shaded` = project "licenses/extreme.indiana.edu.license.TXT", "licenses/javolution.license.TXT", "licenses/thoughtworks.TXT", - "licenses/" + "licenses/", + // zstd files, pulled via plexus-archiver + "darwin/", + "darwin/aarch64/", + "darwin/aarch64/libzstd-jni-1.5.2-4.dylib", + "darwin/x86_64/", + "darwin/x86_64/libzstd-jni-1.5.2-4.dylib", + "freebsd/", + "freebsd/amd64/", + "freebsd/amd64/libzstd-jni-1.5.2-4.so", + "freebsd/i386/", + "freebsd/i386/libzstd-jni-1.5.2-4.so", + "linux/", + "linux/aarch64/", + "linux/aarch64/libzstd-jni-1.5.2-4.so", + "linux/amd64/", + "linux/amd64/libzstd-jni-1.5.2-4.so", + "linux/arm/", + "linux/arm/libzstd-jni-1.5.2-4.so", + "linux/i386/", + "linux/i386/libzstd-jni-1.5.2-4.so", + "linux/loongarch64/", + "linux/loongarch64/libzstd-jni-1.5.2-4.so", + "linux/mips64/", + "linux/mips64/libzstd-jni-1.5.2-4.so", + "linux/ppc64/", + "linux/ppc64/libzstd-jni-1.5.2-4.so", + "linux/ppc64le/", + "linux/ppc64le/libzstd-jni-1.5.2-4.so", + "linux/s390x/", + "linux/s390x/libzstd-jni-1.5.2-4.so", + "win/", + "win/amd64/", + "win/amd64/libzstd-jni-1.5.2-4.dll", + "win/x86/", + "win/x86/libzstd-jni-1.5.2-4.dll", ), shadingRules ++= { val toShade = Seq( @@ -140,7 +175,10 @@ lazy val `lm-coursier-shaded` = project "org.codehaus", "org.iq80", "org.tukaani", - "com.github.plokhotnyuk.jsoniter_scala" + "com.github.plokhotnyuk.jsoniter_scala", + "scala.cli", + "com.github.luben.zstd", + "javax.inject" // hope shading this is fine… It's probably pulled via plexus-archiver, that sbt shouldn't use anyway… ) for (ns <- toShade) yield ShadingRule.moveUnder(ns, "lmcoursier.internal.shaded") @@ -151,6 +189,7 @@ lazy val `lm-coursier-shaded` = project "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", "org.scala-lang.modules" %% "scala-xml" % "1.3.0", // depending on that one so that it doesn't get shaded + "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.14" % Test ) From 825665059219a8bfd882bfbc6071b2bfc477e16a Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Thu, 20 Oct 2022 10:26:21 +0200 Subject: [PATCH 34/96] Update slf4j-api to 2.0.3 (#422) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 23937769e..22994de44 100644 --- a/build.sbt +++ b/build.sbt @@ -189,7 +189,7 @@ lazy val `lm-coursier-shaded` = project "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", "org.scala-lang.modules" %% "scala-xml" % "1.3.0", // depending on that one so that it doesn't get shaded - "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either + "org.slf4j" % "slf4j-api" % "2.0.3", // depending on that one so that it doesn't get shaded either lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.14" % Test ) From 1a95cb63df624107cfad78efb253a2d79fc98c89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 10:26:30 +0200 Subject: [PATCH 35/96] Bump coursier/setup-action from 1.2.1 to 1.3.0 (#425) Bumps [coursier/setup-action](https://github.com/coursier/setup-action) from 1.2.1 to 1.3.0. - [Release notes](https://github.com/coursier/setup-action/releases) - [Commits](https://github.com/coursier/setup-action/compare/v1.2.1...v1.3.0) --- updated-dependencies: - dependency-name: coursier/setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 186b9e3c7..26378893f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: fetch-depth: 0 submodules: true - uses: coursier/cache-action@v6.3 - - uses: coursier/setup-action@v1.2.1 + - uses: coursier/setup-action@v1.3.0 with: jvm: 8 apps: sbt @@ -48,7 +48,7 @@ jobs: fetch-depth: 0 submodules: true - uses: coursier/cache-action@v6.3 - - uses: coursier/setup-action@v1.2.1 + - uses: coursier/setup-action@v1.3.0 with: jvm: 8 apps: sbt From f726a523acd2aad54961d3afd27a6f4cec3d67fb Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 24 Oct 2022 10:26:55 +0200 Subject: [PATCH 36/96] Update sbt-ci-release to 1.5.11 (#423) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 2536a745f..c6e61afa4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.1") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4") From 02f927b4a2978aab969b66c2413fc418e4fe109b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:25:55 +0200 Subject: [PATCH 37/96] Bump coursier/cache-action from 6.3 to 6.4 (#424) Bumps [coursier/cache-action](https://github.com/coursier/cache-action) from 6.3 to 6.4. - [Release notes](https://github.com/coursier/cache-action/releases) - [Commits](https://github.com/coursier/cache-action/compare/v6.3...v6.4) --- updated-dependencies: - dependency-name: coursier/cache-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26378893f..8503a94a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: with: fetch-depth: 0 submodules: true - - uses: coursier/cache-action@v6.3 + - uses: coursier/cache-action@v6.4 - uses: coursier/setup-action@v1.3.0 with: jvm: 8 @@ -47,7 +47,7 @@ jobs: with: fetch-depth: 0 submodules: true - - uses: coursier/cache-action@v6.3 + - uses: coursier/cache-action@v6.4 - uses: coursier/setup-action@v1.3.0 with: jvm: 8 From 3fea17c2787d147b5aedb576c10d22ff97855eea Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 28 Oct 2022 16:37:38 +0200 Subject: [PATCH 38/96] Enable reload on change --- build.sbt | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sbt b/build.sbt index 23937769e..17c4dedc3 100644 --- a/build.sbt +++ b/build.sbt @@ -300,3 +300,4 @@ lazy val `sbt-coursier-root` = project (publish / skip) := true ) +Global / onChangedBuildSource := ReloadOnSourceChanges From 0b49f7457192682aec5b6aa217dbafe341801cbf Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 28 Oct 2022 16:39:18 +0200 Subject: [PATCH 39/96] Ignore scala-xml major version bump --- build.sbt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 17c4dedc3..6017889d1 100644 --- a/build.sbt +++ b/build.sbt @@ -17,7 +17,8 @@ inThisBuild(List( ), semanticdbEnabled := true, semanticdbVersion := "4.6.0", - scalafixDependencies += "net.hamnaberg" %% "dataclass-scalafix" % dataclassScalafixV + scalafixDependencies += "net.hamnaberg" %% "dataclass-scalafix" % dataclassScalafixV, + libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % "always" )) Global / excludeLintKeys += scriptedBufferLog From b1fca0a553093f024cd124511ffef16bf3d2a7f5 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 19 Oct 2022 16:17:06 +0000 Subject: [PATCH 40/96] Update coursier to 2.1.0-M7-34-gf519b50a3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6017889d1..31d733d95 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -val coursierVersion0 = "2.1.0-M7-18-g67daad6a9" +val coursierVersion0 = "2.1.0-M7-34-gf519b50a3" def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString From 6e42e4d7bb1466f15106af277f62325768469700 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Fri, 28 Oct 2022 18:07:36 +0200 Subject: [PATCH 41/96] Update scala-library to 2.12.17 (#414) --- project/Settings.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Settings.scala b/project/Settings.scala index c2985236d..1e3e76863 100644 --- a/project/Settings.scala +++ b/project/Settings.scala @@ -9,7 +9,7 @@ import com.jsuereth.sbtpgp._ object Settings { - def scala212 = "2.12.16" + def scala212 = "2.12.17" def scala213 = "2.13.10" def targetSbtVersion = "1.2.8" From daf3f3dd6525028873ce45beb18e792ed1691f13 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Sun, 30 Oct 2022 15:06:51 +0100 Subject: [PATCH 42/96] Update coursier to 2.1.0-M7-39-gb8f3d7532 (#426) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 673fe3ca7..90a4bb33b 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -val coursierVersion0 = "2.1.0-M7-34-gf519b50a3" +val coursierVersion0 = "2.1.0-M7-39-gb8f3d7532" def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString From 02486bce1ee0f2e0915b7d8c2d6d91c3d8744d7f Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Mon, 31 Oct 2022 09:31:54 +0100 Subject: [PATCH 43/96] chore(deps): bump scala-xml to 2.1.0 Same reason that I had for https://github.com/coursier/coursier/pull/2548 but since sbt 1.7.3 was released a bunch of people will see the following: ``` 03:31:06 [info] loading global plugins from /root/.sbt/1.0/plugins 03:31:10 [error] java.lang.RuntimeException: found version conflict(s) in library dependencies; some are suspected to be binary incompatible: 03:31:10 [error] 03:31:10 [error] * org.scala-lang.modules:scala-xml_2.12:2.1.0 (early-semver) is selected over {1.3.0, 1.2.0, 1.0.6} 03:31:10 [error] +- org.scala-lang:scala-compiler:2.12.17 (depends on 2.1.0) 03:31:10 [error] +- org.scala-sbt:testing_2.12:1.7.3 (depends on 1.3.0) 03:31:10 [error] +- org.scala-sbt:sbinary_2.12:0.5.1 (depends on 1.0.6) 03:31:10 [error] +- org.scala-sbt:main_2.12:1.7.3 (depends on 1.3.0) 03:31:10 [error] +- org.scala-sbt:librarymanagement-core_2.12:1.7.1 (depends on 1.2.0) 03:31:10 [error] +- io.get-coursier:lm-coursier-shaded_2.12:2.0.12 (depends on 1.3.0) ``` Since there is a mismatch of scala-xml all over the place. Since Scala has bumped I think it's appropriate the everyone else bumps as well. sbt has also merged in this change for the 1.8.x series. Relates to https://github.com/sbt/sbt/issues/6997. --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 90a4bb33b..61e272b2b 100644 --- a/build.sbt +++ b/build.sbt @@ -189,7 +189,7 @@ lazy val `lm-coursier-shaded` = project "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", - "org.scala-lang.modules" %% "scala-xml" % "1.3.0", // depending on that one so that it doesn't get shaded + "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "2.0.3", // depending on that one so that it doesn't get shaded either lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.14" % Test From 8b08a62ffc0673ce27fef3f694b41e3aeb271f7a Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 2 Nov 2022 13:34:16 +0000 Subject: [PATCH 44/96] Update sbt, scripted-plugin to 1.7.3 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 563a014da..6a9f03889 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.2 +sbt.version=1.7.3 From ce16f8914e52def081e0eb950a7a5031a2ad8f61 Mon Sep 17 00:00:00 2001 From: Adrien Piquerez Date: Thu, 10 Nov 2022 14:59:06 +0100 Subject: [PATCH 45/96] Update coursier to 2.1.0-RC1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 61e272b2b..17e842091 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -val coursierVersion0 = "2.1.0-M7-39-gb8f3d7532" +val coursierVersion0 = "2.1.0-RC1" def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString From 3df025313bf010d80b8b9288c76fa6a3cb13c7d0 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 14 Nov 2022 16:49:57 +0100 Subject: [PATCH 46/96] Update sbt, scripted-plugin to 1.8.0 (#431) --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 6a9f03889..8b9a0b0ab 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.3 +sbt.version=1.8.0 From 0faa7291fbb2c21fc47e6faf13ee5e637b08f984 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 16 Nov 2022 16:42:58 +0000 Subject: [PATCH 47/96] Update coursier to 2.1.0-RC2 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 17e842091..0aadf22e4 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -val coursierVersion0 = "2.1.0-RC1" +val coursierVersion0 = "2.1.0-RC2" def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString From 35305810d8be7cbea25a8d27d21559ebbce3c4db Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Thu, 17 Nov 2022 14:44:57 +0100 Subject: [PATCH 48/96] Update allowed-files-in-shaded-jar list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kind of annoying to have to update that list everytime plexus-archiver in bumped in coursier… Hopefully, we can get rid of that dependency at some point. --- build.sbt | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/build.sbt b/build.sbt index 0aadf22e4..7ceffb182 100644 --- a/build.sbt +++ b/build.sbt @@ -128,38 +128,40 @@ lazy val `lm-coursier-shaded` = project // zstd files, pulled via plexus-archiver "darwin/", "darwin/aarch64/", - "darwin/aarch64/libzstd-jni-1.5.2-4.dylib", + "darwin/aarch64/libzstd-jni-1.5.2-5.dylib", "darwin/x86_64/", - "darwin/x86_64/libzstd-jni-1.5.2-4.dylib", + "darwin/x86_64/libzstd-jni-1.5.2-5.dylib", "freebsd/", "freebsd/amd64/", - "freebsd/amd64/libzstd-jni-1.5.2-4.so", + "freebsd/amd64/libzstd-jni-1.5.2-5.so", "freebsd/i386/", - "freebsd/i386/libzstd-jni-1.5.2-4.so", + "freebsd/i386/libzstd-jni-1.5.2-5.so", "linux/", "linux/aarch64/", - "linux/aarch64/libzstd-jni-1.5.2-4.so", + "linux/aarch64/libzstd-jni-1.5.2-5.so", "linux/amd64/", - "linux/amd64/libzstd-jni-1.5.2-4.so", + "linux/amd64/libzstd-jni-1.4.9-3.so", + "linux/amd64/libzstd-jni-1.4.9-4.so", + "linux/amd64/libzstd-jni-1.5.2-5.so", "linux/arm/", - "linux/arm/libzstd-jni-1.5.2-4.so", + "linux/arm/libzstd-jni-1.5.2-5.so", "linux/i386/", - "linux/i386/libzstd-jni-1.5.2-4.so", + "linux/i386/libzstd-jni-1.5.2-5.so", "linux/loongarch64/", - "linux/loongarch64/libzstd-jni-1.5.2-4.so", + "linux/loongarch64/libzstd-jni-1.5.2-5.so", "linux/mips64/", - "linux/mips64/libzstd-jni-1.5.2-4.so", + "linux/mips64/libzstd-jni-1.5.2-5.so", "linux/ppc64/", - "linux/ppc64/libzstd-jni-1.5.2-4.so", + "linux/ppc64/libzstd-jni-1.5.2-5.so", "linux/ppc64le/", - "linux/ppc64le/libzstd-jni-1.5.2-4.so", + "linux/ppc64le/libzstd-jni-1.5.2-5.so", "linux/s390x/", - "linux/s390x/libzstd-jni-1.5.2-4.so", + "linux/s390x/libzstd-jni-1.5.2-5.so", "win/", "win/amd64/", - "win/amd64/libzstd-jni-1.5.2-4.dll", + "win/amd64/libzstd-jni-1.5.2-5.dll", "win/x86/", - "win/x86/libzstd-jni-1.5.2-4.dll", + "win/x86/libzstd-jni-1.5.2-5.dll", ), shadingRules ++= { val toShade = Seq( From 9c5f2cf6815297c81090ccb6f7a7f4d7d799324e Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 29 Nov 2022 09:54:28 +0100 Subject: [PATCH 49/96] Update scala-collection-compat to 2.9.0 (#435) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 7ceffb182..a55370770 100644 --- a/build.sbt +++ b/build.sbt @@ -190,7 +190,7 @@ lazy val `lm-coursier-shaded` = project "io.get-coursier" %% "coursier" % coursierVersion0, "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, - "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1", + "org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0", "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "2.0.3", // depending on that one so that it doesn't get shaded either lmIvy.value, From 214e2b67a84a3662cdb337433003cc7d72fe740c Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 29 Nov 2022 09:54:42 +0100 Subject: [PATCH 50/96] Update slf4j-api to 2.0.5 (#434) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a55370770..5f63623cb 100644 --- a/build.sbt +++ b/build.sbt @@ -192,7 +192,7 @@ lazy val `lm-coursier-shaded` = project "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0", "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded - "org.slf4j" % "slf4j-api" % "2.0.3", // depending on that one so that it doesn't get shaded either + "org.slf4j" % "slf4j-api" % "2.0.5", // depending on that one so that it doesn't get shaded either lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.14" % Test ) From 6c2acf88470605da4b15a28bf42a2cbe74814873 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 19 Dec 2022 10:50:35 +0100 Subject: [PATCH 51/96] Update slf4j-api to 2.0.6 (#437) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5f63623cb..60eab3d2f 100644 --- a/build.sbt +++ b/build.sbt @@ -192,7 +192,7 @@ lazy val `lm-coursier-shaded` = project "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0", "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded - "org.slf4j" % "slf4j-api" % "2.0.5", // depending on that one so that it doesn't get shaded either + "org.slf4j" % "slf4j-api" % "2.0.6", // depending on that one so that it doesn't get shaded either lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.14" % Test ) From da501892e088bf79cb4d0117fe2433a12bd35e57 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 19 Dec 2022 10:50:53 +0100 Subject: [PATCH 52/96] Update coursier to 2.1.0-RC3-1 (#438) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 60eab3d2f..3653d42e7 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -val coursierVersion0 = "2.1.0-RC2" +val coursierVersion0 = "2.1.0-RC3-1" def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString From e4286a011394fbb0999978e252c406cb2190722f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 20 Dec 2022 14:44:08 +0000 Subject: [PATCH 53/96] Update sbt-shading to 2.1.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c6e61afa4..500bc0afd 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.1") -addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.0") +addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.1") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value From 774d6be24ff4b45cd9eb8b5fee0ebbbe12441522 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sun, 1 Jan 2023 22:55:24 -0500 Subject: [PATCH 54/96] Revert "Update slf4j-api to 2.0.3" This reverts commit 8f594cf0f78060019b5a75ee083a8bd35872ca6c. --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 3653d42e7..f60972961 100644 --- a/build.sbt +++ b/build.sbt @@ -192,7 +192,7 @@ lazy val `lm-coursier-shaded` = project "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0", "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded - "org.slf4j" % "slf4j-api" % "2.0.6", // depending on that one so that it doesn't get shaded either + "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.14" % Test ) From d4556bd417f3d9e3e801b61e57e69df7a067b745 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 2 Jan 2023 22:06:46 -0500 Subject: [PATCH 55/96] Pin slf4j-api --- .scala-steward.conf | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .scala-steward.conf diff --git a/.scala-steward.conf b/.scala-steward.conf new file mode 100644 index 000000000..d9a4607f5 --- /dev/null +++ b/.scala-steward.conf @@ -0,0 +1,3 @@ +updates.pin = [ + { groupId = "org.slf4j", artifactId="slf4j-api", version = "1." } +] From 990dea4606f3d55cda87d02696906c30b94ada23 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 23 Jan 2023 09:55:50 +0100 Subject: [PATCH 56/96] Update coursier to 2.1.0-RC5 (#444) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f60972961..c93f89396 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -val coursierVersion0 = "2.1.0-RC3-1" +val coursierVersion0 = "2.1.0-RC5" def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString From 7e9f890e7ce58214b33ab0f0ce33ebd178a15d0d Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 23 Jan 2023 09:56:08 +0100 Subject: [PATCH 57/96] Update scalatest to 3.2.15 (#443) --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index c93f89396..5386d65cd 100644 --- a/build.sbt +++ b/build.sbt @@ -88,7 +88,7 @@ lazy val `lm-coursier` = project // IvySbt#Module (seems DependencyResolutionInterface.moduleDescriptor // is ignored). lmIvy.value, - "org.scalatest" %% "scalatest" % "3.2.14" % Test + "org.scalatest" %% "scalatest" % "3.2.15" % Test ), Test / exportedProducts := { (Test / preTest).value @@ -194,7 +194,7 @@ lazy val `lm-coursier-shaded` = project "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, - "org.scalatest" %% "scalatest" % "3.2.14" % Test + "org.scalatest" %% "scalatest" % "3.2.15" % Test ) ) From e311405bab6850d9e46d5940887c9fd0f3ba84b2 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 23 Jan 2023 09:56:16 +0100 Subject: [PATCH 58/96] Update sbt, scripted-plugin to 1.8.2 (#442) --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 8b9a0b0ab..46e43a97e 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.0 +sbt.version=1.8.2 From 71d4f2c969a94f847ed3ca8e7e98c3bc71a28621 Mon Sep 17 00:00:00 2001 From: adpi2 Date: Thu, 16 Feb 2023 14:53:04 +0100 Subject: [PATCH 59/96] Update coursier to 2.1.0-RC6 (#445) --- build.sbt | 5 ++++- .../src/main/scala/lmcoursier/internal/ResolutionRun.scala | 4 ++-- .../src/main/scala/lmcoursier/internal/Resolvers.scala | 6 +++--- modules/sbt-coursier/src/sbt-test/sbt-coursier/s3/build.sbt | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index 5386d65cd..191a6831b 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -val coursierVersion0 = "2.1.0-RC5" +val coursierVersion0 = "2.1.0-RC6" def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString @@ -80,6 +80,7 @@ lazy val `lm-coursier` = project Mima.lmCoursierFilters, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, + "io.get-coursier" %% "coursier-sbt-maven-repository" % coursierVersion0, "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, // We depend on librarymanagement-ivy rather than just @@ -114,6 +115,7 @@ lazy val `lm-coursier-shaded` = project Compile / sources := (`lm-coursier` / Compile / sources).value, shadedModules ++= Set( "io.get-coursier" %% "coursier", + "io.get-coursier" %% "coursier-sbt-maven-repository", "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" ), validNamespaces += "lmcoursier", @@ -188,6 +190,7 @@ lazy val `lm-coursier-shaded` = project }, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % coursierVersion0, + "io.get-coursier" %% "coursier-sbt-maven-repository" % coursierVersion0, "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0", diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala b/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala index 9ca6942d8..9d16ed49f 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala @@ -4,7 +4,7 @@ import coursier.{Resolution, Resolve} import coursier.cache.loggers.{FallbackRefreshDisplay, ProgressBarRefreshDisplay, RefreshLogger} import coursier.core._ import coursier.ivy.IvyRepository -import coursier.maven.MavenRepository +import coursier.maven.MavenRepositoryLike import coursier.params.rule.RuleResolution import sbt.util.Logger @@ -63,7 +63,7 @@ object ResolutionRun { s"ivy:${r.pattern}" case _: InterProjectRepository => "inter-project" - case r: MavenRepository => + case r: MavenRepositoryLike => r.root case r => // should not happen diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/internal/Resolvers.scala b/modules/lm-coursier/src/main/scala/lmcoursier/internal/Resolvers.scala index a5b0a764a..0cbea970a 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/internal/Resolvers.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/internal/Resolvers.scala @@ -6,7 +6,7 @@ import java.nio.file.Paths import coursier.cache.CacheUrl import coursier.core.{Authentication, Repository} import coursier.ivy.IvyRepository -import coursier.maven.MavenRepository +import coursier.maven.SbtMavenRepository import org.apache.ivy.plugins.resolver.IBiblioResolver import sbt.librarymanagement.{Configuration => _, MavenRepository => _, _} import sbt.util.Logger @@ -32,12 +32,12 @@ object Resolvers { log: Logger, authentication: Option[Authentication], classLoaders: Seq[ClassLoader] - ): Option[MavenRepository] = + ): Option[SbtMavenRepository] = try { CacheUrl.url(root, classLoaders) // ensure root is a URL whose protocol can be handled here val root0 = if (root.endsWith("/")) root else root + "/" Some( - MavenRepository( + SbtMavenRepository( root0, authentication = authentication ) diff --git a/modules/sbt-coursier/src/sbt-test/sbt-coursier/s3/build.sbt b/modules/sbt-coursier/src/sbt-test/sbt-coursier/s3/build.sbt index a62e6a917..4138b0846 100644 --- a/modules/sbt-coursier/src/sbt-test/sbt-coursier/s3/build.sbt +++ b/modules/sbt-coursier/src/sbt-test/sbt-coursier/s3/build.sbt @@ -44,7 +44,7 @@ check := { def containsRepo(repo: String): Boolean = { val accepted = Set(repo, repo.stripSuffix("/")) parsedCoursierResolvers.exists { - case m: coursier.maven.MavenRepository => accepted(m.root) + case m: coursier.maven.MavenRepositoryLike => accepted(m.root) case _ => false } } From 8a921c6872a61d062121df455ba0b9b97e996886 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Fri, 31 Mar 2023 19:15:52 +0200 Subject: [PATCH 60/96] Update sbt-mima-plugin to 1.1.2 (#448) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 500bc0afd..e3f6cb33b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.1") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.2") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.1") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4") From 005f2137d121c6ea62609124403f1f25a71e4d67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 01:57:16 +0000 Subject: [PATCH 61/96] Bump coursier/setup-action from 1.3.0 to 1.3.2 Bumps [coursier/setup-action](https://github.com/coursier/setup-action) from 1.3.0 to 1.3.2. - [Release notes](https://github.com/coursier/setup-action/releases) - [Commits](https://github.com/coursier/setup-action/compare/v1.3.0...v1.3.2) --- updated-dependencies: - dependency-name: coursier/setup-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8503a94a0..45697c954 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: fetch-depth: 0 submodules: true - uses: coursier/cache-action@v6.4 - - uses: coursier/setup-action@v1.3.0 + - uses: coursier/setup-action@v1.3.2 with: jvm: 8 apps: sbt @@ -48,7 +48,7 @@ jobs: fetch-depth: 0 submodules: true - uses: coursier/cache-action@v6.4 - - uses: coursier/setup-action@v1.3.0 + - uses: coursier/setup-action@v1.3.2 with: jvm: 8 apps: sbt From 83b0cb81ba6a242d3f53b69dcc5b783f7aa484e2 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sat, 29 Apr 2023 19:16:07 -0400 Subject: [PATCH 62/96] Update coursier to 2.1.2 **Problem** Coursier bump PR is currently failing due to shading of zstd. **Solution** 1. Rather than updating the shading rule, this excludes zstd out of the transitive since we likely won't need it. 2. Update coursier to 2.1.2. --- build.sbt | 47 ++++++----------------------------------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/build.sbt b/build.sbt index 191a6831b..3cc1ca9c9 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,9 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -val coursierVersion0 = "2.1.0-RC6" +lazy val coursierVersion0 = "2.1.2" +lazy val coursierDep = ("io.get-coursier" %% "coursier" % coursierVersion0) + .exclude("com.github.luben", "zstd-jni") def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString @@ -60,7 +62,7 @@ lazy val definitions = project shared, crossScalaVersions := Seq(scala212, scala213), libraryDependencies ++= Seq( - "io.get-coursier" %% "coursier" % coursierVersion0, + coursierDep, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, lmIvy.value, ), @@ -79,7 +81,7 @@ lazy val `lm-coursier` = project Mima.settings, Mima.lmCoursierFilters, libraryDependencies ++= Seq( - "io.get-coursier" %% "coursier" % coursierVersion0, + coursierDep, "io.get-coursier" %% "coursier-sbt-maven-repository" % coursierVersion0, "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, @@ -127,43 +129,6 @@ lazy val `lm-coursier-shaded` = project "licenses/javolution.license.TXT", "licenses/thoughtworks.TXT", "licenses/", - // zstd files, pulled via plexus-archiver - "darwin/", - "darwin/aarch64/", - "darwin/aarch64/libzstd-jni-1.5.2-5.dylib", - "darwin/x86_64/", - "darwin/x86_64/libzstd-jni-1.5.2-5.dylib", - "freebsd/", - "freebsd/amd64/", - "freebsd/amd64/libzstd-jni-1.5.2-5.so", - "freebsd/i386/", - "freebsd/i386/libzstd-jni-1.5.2-5.so", - "linux/", - "linux/aarch64/", - "linux/aarch64/libzstd-jni-1.5.2-5.so", - "linux/amd64/", - "linux/amd64/libzstd-jni-1.4.9-3.so", - "linux/amd64/libzstd-jni-1.4.9-4.so", - "linux/amd64/libzstd-jni-1.5.2-5.so", - "linux/arm/", - "linux/arm/libzstd-jni-1.5.2-5.so", - "linux/i386/", - "linux/i386/libzstd-jni-1.5.2-5.so", - "linux/loongarch64/", - "linux/loongarch64/libzstd-jni-1.5.2-5.so", - "linux/mips64/", - "linux/mips64/libzstd-jni-1.5.2-5.so", - "linux/ppc64/", - "linux/ppc64/libzstd-jni-1.5.2-5.so", - "linux/ppc64le/", - "linux/ppc64le/libzstd-jni-1.5.2-5.so", - "linux/s390x/", - "linux/s390x/libzstd-jni-1.5.2-5.so", - "win/", - "win/amd64/", - "win/amd64/libzstd-jni-1.5.2-5.dll", - "win/x86/", - "win/x86/libzstd-jni-1.5.2-5.dll", ), shadingRules ++= { val toShade = Seq( @@ -189,7 +154,7 @@ lazy val `lm-coursier-shaded` = project yield ShadingRule.moveUnder(ns, "lmcoursier.internal.shaded") }, libraryDependencies ++= Seq( - "io.get-coursier" %% "coursier" % coursierVersion0, + coursierDep, "io.get-coursier" %% "coursier-sbt-maven-repository" % coursierVersion0, "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, From a810143b9546dcdc9b6edff9e6bd35ae5222d8b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 01:58:00 +0000 Subject: [PATCH 63/96] Bump coursier/setup-action from 1.3.2 to 1.3.3 Bumps [coursier/setup-action](https://github.com/coursier/setup-action) from 1.3.2 to 1.3.3. - [Release notes](https://github.com/coursier/setup-action/releases) - [Commits](https://github.com/coursier/setup-action/compare/v1.3.2...v1.3.3) --- updated-dependencies: - dependency-name: coursier/setup-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45697c954..86f60e5b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: fetch-depth: 0 submodules: true - uses: coursier/cache-action@v6.4 - - uses: coursier/setup-action@v1.3.2 + - uses: coursier/setup-action@v1.3.3 with: jvm: 8 apps: sbt @@ -48,7 +48,7 @@ jobs: fetch-depth: 0 submodules: true - uses: coursier/cache-action@v6.4 - - uses: coursier/setup-action@v1.3.2 + - uses: coursier/setup-action@v1.3.3 with: jvm: 8 apps: sbt From 976266ebeab995668904be40b87ba6f1f3862a29 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Tue, 2 May 2023 01:05:50 +0200 Subject: [PATCH 64/96] Don't specify a patch version of coursier/setup-action --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86f60e5b7..c7f9dc8e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: fetch-depth: 0 submodules: true - uses: coursier/cache-action@v6.4 - - uses: coursier/setup-action@v1.3.3 + - uses: coursier/setup-action@v1.3 with: jvm: 8 apps: sbt @@ -48,7 +48,7 @@ jobs: fetch-depth: 0 submodules: true - uses: coursier/cache-action@v6.4 - - uses: coursier/setup-action@v1.3.3 + - uses: coursier/setup-action@v1.3 with: jvm: 8 apps: sbt From 27c5430f28f69a0965839d347d17d9caa39b0f8c Mon Sep 17 00:00:00 2001 From: Alex Archambault Date: Tue, 2 May 2023 01:10:09 +0200 Subject: [PATCH 65/96] Exclude all the plexus libraries These are used by coursier.cache.ArchiveCache, that is unused in sbt-coursier / lm-coursier --- build.sbt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 3cc1ca9c9..f3e9b7d8f 100644 --- a/build.sbt +++ b/build.sbt @@ -24,9 +24,10 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -lazy val coursierVersion0 = "2.1.2" -lazy val coursierDep = ("io.get-coursier" %% "coursier" % coursierVersion0) - .exclude("com.github.luben", "zstd-jni") +def coursierVersion0 = "2.1.2" +def coursierDep = ("io.get-coursier" %% "coursier" % coursierVersion0) + .exclude("org.codehaus.plexus", "plexus-archiver") + .exclude("org.codehaus.plexus", "plexus-container-default") def dataclassGen(data: Reference) = Def.taskDyn { val root = (ThisBuild / baseDirectory).value.toURI.toString From 4a862056c2e97b6b7339f1e3f00fb4be7ec9537e Mon Sep 17 00:00:00 2001 From: Alex Archambault Date: Tue, 2 May 2023 01:11:04 +0200 Subject: [PATCH 66/96] Add .vscode/ to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 35262b401..43c4b45bb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ target/ .metals/ .bloop/ metals.sbt +.vscode/ # Intellij .idea/ From 4c162df510cb6200f75ec76ffe7cfad80583111f Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 2 May 2023 01:20:06 +0200 Subject: [PATCH 67/96] Update scala-collection-compat to 2.10.0 (#453) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 3cc1ca9c9..0b2b89615 100644 --- a/build.sbt +++ b/build.sbt @@ -158,7 +158,7 @@ lazy val `lm-coursier-shaded` = project "io.get-coursier" %% "coursier-sbt-maven-repository" % coursierVersion0, "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, - "org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0", + "org.scala-lang.modules" %% "scala-collection-compat" % "2.10.0", "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, From 85a4aeb9b7ff455d0dd7dbcefc144c3098c517d7 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 3 May 2023 14:00:48 +0000 Subject: [PATCH 68/96] Update sbt-ci-release to 1.5.12 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index e3f6cb33b..ea42c2853 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.2") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.1") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4") From 1c30872c02380a750800672018bcda7112f62e92 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 5 May 2023 14:51:12 +0000 Subject: [PATCH 69/96] Update coursier, ... to 2.1.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 85be050e8..2c2bea7ad 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -def coursierVersion0 = "2.1.2" +def coursierVersion0 = "2.1.3" def coursierDep = ("io.get-coursier" %% "coursier" % coursierVersion0) .exclude("org.codehaus.plexus", "plexus-archiver") .exclude("org.codehaus.plexus", "plexus-container-default") From 0052d8d99cab780f0e0a773c98105933da85da16 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Thu, 25 May 2023 19:19:01 +0200 Subject: [PATCH 70/96] Update scalatest to 3.2.16 (#463) --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 2c2bea7ad..58dd9535b 100644 --- a/build.sbt +++ b/build.sbt @@ -92,7 +92,7 @@ lazy val `lm-coursier` = project // IvySbt#Module (seems DependencyResolutionInterface.moduleDescriptor // is ignored). lmIvy.value, - "org.scalatest" %% "scalatest" % "3.2.15" % Test + "org.scalatest" %% "scalatest" % "3.2.16" % Test ), Test / exportedProducts := { (Test / preTest).value @@ -163,7 +163,7 @@ lazy val `lm-coursier-shaded` = project "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, - "org.scalatest" %% "scalatest" % "3.2.15" % Test + "org.scalatest" %% "scalatest" % "3.2.16" % Test ) ) From aa6bd3c5156417360245321544d9024ab718c6b0 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Thu, 25 May 2023 19:19:11 +0200 Subject: [PATCH 71/96] Update sbt, scripted-plugin to 1.8.3 (#462) --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 46e43a97e..72413de15 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.2 +sbt.version=1.8.3 From c5aff65f75709e7fec50c1efe3f3c7c8bad9ada6 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Thu, 25 May 2023 19:19:25 +0200 Subject: [PATCH 72/96] Update coursier, ... to 2.1.4 (#461) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 58dd9535b..dafa936ba 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -def coursierVersion0 = "2.1.3" +def coursierVersion0 = "2.1.4" def coursierDep = ("io.get-coursier" %% "coursier" % coursierVersion0) .exclude("org.codehaus.plexus", "plexus-archiver") .exclude("org.codehaus.plexus", "plexus-container-default") From 353b87fd3c02f224bfb511c4d2c790cce7e46b5b Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 20 Jun 2023 13:43:22 +0000 Subject: [PATCH 73/96] Update coursier, ... to 2.1.5 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index dafa936ba..a6fbbf3f3 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -def coursierVersion0 = "2.1.4" +def coursierVersion0 = "2.1.5" def coursierDep = ("io.get-coursier" %% "coursier" % coursierVersion0) .exclude("org.codehaus.plexus", "plexus-archiver") .exclude("org.codehaus.plexus", "plexus-container-default") From b2280e618eee311970d5d9d40376ffbdfc971685 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Thu, 24 Aug 2023 09:41:24 -0400 Subject: [PATCH 74/96] Update Coursier to 2.1.6 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a6fbbf3f3..77b389009 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -def coursierVersion0 = "2.1.5" +def coursierVersion0 = "2.1.6" def coursierDep = ("io.get-coursier" %% "coursier" % coursierVersion0) .exclude("org.codehaus.plexus", "plexus-archiver") .exclude("org.codehaus.plexus", "plexus-container-default") From c75b0acd12acdb18ad2c1e85f8afbf4ae853365f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 10 Sep 2023 13:54:24 +0000 Subject: [PATCH 75/96] Update coursier, ... to 2.1.7 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 77b389009..963d51c85 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -def coursierVersion0 = "2.1.6" +def coursierVersion0 = "2.1.7" def coursierDep = ("io.get-coursier" %% "coursier" % coursierVersion0) .exclude("org.codehaus.plexus", "plexus-archiver") .exclude("org.codehaus.plexus", "plexus-container-default") From 80a9d05aaffc82e52523f3f6d5e7b226430899de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 01:55:09 +0000 Subject: [PATCH 76/96] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7f9dc8e6..66334d7e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: run: | git config --global core.autocrlf false git config --global core.eol lf - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 submodules: true @@ -43,7 +43,7 @@ jobs: if: github.event_name == 'push' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 submodules: true From b15d6130eb89032d2ebb9412dc3f202663a9e3d3 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:53:59 +0100 Subject: [PATCH 77/96] Update coursier, ... to 2.1.8 (#487) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 963d51c85..3b6e983d1 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -def coursierVersion0 = "2.1.7" +def coursierVersion0 = "2.1.8" def coursierDep = ("io.get-coursier" %% "coursier" % coursierVersion0) .exclude("org.codehaus.plexus", "plexus-archiver") .exclude("org.codehaus.plexus", "plexus-container-default") From d0ed477b9316f8a92bf5e7df2805107cb4f95d86 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:54:07 +0100 Subject: [PATCH 78/96] Update utest to 0.8.2 (#486) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 3b6e983d1..f0b17518f 100644 --- a/build.sbt +++ b/build.sbt @@ -174,7 +174,7 @@ lazy val `sbt-coursier-shared` = project .settings( plugin, generatePropertyFile, - libraryDependencies += "com.lihaoyi" %% "utest" % "0.8.1" % Test, + libraryDependencies += "com.lihaoyi" %% "utest" % "0.8.2" % Test, testFrameworks += new TestFramework("utest.runner.Framework") ) From a16308f7e37c5b132f524b1f08a2aa19da016db5 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:54:17 +0100 Subject: [PATCH 79/96] Update sbt-shading to 2.1.3 (#482) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ea42c2853..e53ed21c5 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.2") -addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.1") +addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.3") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value From 818176ec866247fd23a65f066900292f3329cb5a Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:55:48 +0100 Subject: [PATCH 80/96] Update scalatest to 3.2.17 (#477) --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index f0b17518f..f4cd56a18 100644 --- a/build.sbt +++ b/build.sbt @@ -92,7 +92,7 @@ lazy val `lm-coursier` = project // IvySbt#Module (seems DependencyResolutionInterface.moduleDescriptor // is ignored). lmIvy.value, - "org.scalatest" %% "scalatest" % "3.2.16" % Test + "org.scalatest" %% "scalatest" % "3.2.17" % Test ), Test / exportedProducts := { (Test / preTest).value @@ -163,7 +163,7 @@ lazy val `lm-coursier-shaded` = project "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, - "org.scalatest" %% "scalatest" % "3.2.16" % Test + "org.scalatest" %% "scalatest" % "3.2.17" % Test ) ) From b8aedbe98d478d74b12927cc4dfbb7f5748f3c93 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:56:23 +0100 Subject: [PATCH 81/96] Update scala-collection-compat to 2.11.0 (#468) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f4cd56a18..97d288c2b 100644 --- a/build.sbt +++ b/build.sbt @@ -159,7 +159,7 @@ lazy val `lm-coursier-shaded` = project "io.get-coursier" %% "coursier-sbt-maven-repository" % coursierVersion0, "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, - "org.scala-lang.modules" %% "scala-collection-compat" % "2.10.0", + "org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0", "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, From cee6474d2436319c23b8ad137b24ab9eda27ea02 Mon Sep 17 00:00:00 2001 From: Dmitrii Naumenko Date: Mon, 27 Nov 2023 14:57:45 +0100 Subject: [PATCH 82/96] fix condition in Resolvers.mavenCompatibleBaseOpt (use artifactPatterns instead of ivyPatterns) (#484) Before the change Resolvers.mavenCompatibleBaseOpt always returned Some value because `baseIvyPattern == baseArtifactPattern` always was `true`` --- .../src/main/scala/lmcoursier/internal/Resolvers.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/internal/Resolvers.scala b/modules/lm-coursier/src/main/scala/lmcoursier/internal/Resolvers.scala index 0cbea970a..51baf44ca 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/internal/Resolvers.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/internal/Resolvers.scala @@ -17,8 +17,12 @@ object Resolvers { private def mavenCompatibleBaseOpt(patterns: Patterns): Option[String] = if (patterns.isMavenCompatible) { - val baseIvyPattern = patterns.ivyPatterns.head.takeWhile(c => c != '[' && c != '(') - val baseArtifactPattern = patterns.ivyPatterns.head.takeWhile(c => c != '[' && c != '(') + //input : /Users/user/custom/repo/[organisation]/[module](_[scalaVersion])(_[sbtVersion])/[revision]/[artifact]-[revision](-[classifier]).[ext] + //output : /Users/user/custom/repo/ + def basePattern(pattern: String): String = pattern.takeWhile(c => c != '[' && c != '(') + + val baseIvyPattern = basePattern(patterns.ivyPatterns.head) + val baseArtifactPattern = basePattern(patterns.artifactPatterns.head) if (baseIvyPattern == baseArtifactPattern) Some(baseIvyPattern) From b9212554785168a365613db61fe7ad314778efc6 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:15:14 +0100 Subject: [PATCH 83/96] Update scala-xml to 2.2.0 (#472) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 97d288c2b..1692ee9db 100644 --- a/build.sbt +++ b/build.sbt @@ -160,7 +160,7 @@ lazy val `lm-coursier-shaded` = project "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0", - "org.scala-lang.modules" %% "scala-xml" % "2.1.0", // depending on that one so that it doesn't get shaded + "org.scala-lang.modules" %% "scala-xml" % "2.2.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.17" % Test From 9af449ad6753ed98938dc761792085af5d13af53 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:15:31 +0100 Subject: [PATCH 84/96] Update sbt-mima-plugin to 1.1.3 (#473) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index e53ed21c5..ec5423f0a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.2") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.3") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4") From c8a99253009129d0496a0e4685d69550ff8dbb67 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:15:43 +0100 Subject: [PATCH 85/96] Update sbt-scalafix to 0.11.1 (#480) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ec5423f0a..c1777fe16 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.3") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value From dab3f9b9038ba3aab6915f345011f3775df50095 Mon Sep 17 00:00:00 2001 From: Hagai Hillel <13578121+hagay3@users.noreply.github.com> Date: Tue, 28 Nov 2023 15:17:26 +0200 Subject: [PATCH 86/96] Retry mechanism for sbt (#450) --------- Co-authored-by: Hagai Ovadia Co-authored-by: Alexandre Archambault --- .../lmcoursier/CoursierConfiguration.scala | 3 +- .../CoursierDependencyResolution.scala | 1 + .../internal/ResolutionParams.scala | 3 + .../lmcoursier/internal/ResolutionRun.scala | 126 ++++++++++++------ .../scala/lmcoursier/syntax/package.scala | 6 +- .../sbtcoursiershared/SbtCoursierShared.scala | 9 +- .../scala/coursier/sbtcoursier/Keys.scala | 2 +- .../sbtcoursier/ResolutionTasks.scala | 3 + 8 files changed, 107 insertions(+), 46 deletions(-) diff --git a/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala b/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala index 09a7df697..09c5e3349 100644 --- a/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala +++ b/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala @@ -9,7 +9,7 @@ import lmcoursier.definitions.{Authentication, CacheLogger, CachePolicy, FromCou import sbt.librarymanagement.{Resolver, UpdateConfiguration, ModuleID, CrossVersion, ModuleInfo, ModuleDescriptorConfiguration} import xsbti.Logger -import scala.concurrent.duration.Duration +import scala.concurrent.duration.{Duration, FiniteDuration} import java.net.URL import java.net.URLClassLoader @@ -59,4 +59,5 @@ import java.net.URLClassLoader providedInCompile: Boolean = false, // unused, kept for binary compatibility @since protocolHandlerDependencies: Seq[ModuleID] = Vector.empty, + retry: Option[(FiniteDuration, Int)] = None, ) diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala b/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala index 9feba63c4..f6c88c5ba 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala @@ -254,6 +254,7 @@ class CoursierDependencyResolution( .withExclusions(excludeDependencies), strictOpt = conf.strict.map(ToCoursier.strict), missingOk = conf.missingOk, + retry = conf.retry.getOrElse(ResolutionParams.defaultRetry), ) def artifactsParams(resolutions: Map[Configuration, Resolution]): ArtifactsParams = diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionParams.scala b/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionParams.scala index 56a99067a..7e5d27b11 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionParams.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionParams.scala @@ -11,6 +11,7 @@ import lmcoursier.definitions.ToCoursier import coursier.util.Task import scala.collection.mutable +import scala.concurrent.duration.{DurationInt, FiniteDuration} // private[coursier] final case class ResolutionParams( @@ -30,6 +31,7 @@ final case class ResolutionParams( params: coursier.params.ResolutionParams, strictOpt: Option[Strict], missingOk: Boolean, + retry: (FiniteDuration, Int) ) { lazy val allConfigExtends: Map[Configuration, Set[Configuration]] = { @@ -106,4 +108,5 @@ object ResolutionParams { ) ++ sys.props } + val defaultRetry: (FiniteDuration, Int) = (1.seconds, 3) } diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala b/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala index 9d16ed49f..9bb73be6e 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala @@ -1,13 +1,18 @@ package lmcoursier.internal import coursier.{Resolution, Resolve} +import coursier.cache.internal.ThreadUtil import coursier.cache.loggers.{FallbackRefreshDisplay, ProgressBarRefreshDisplay, RefreshLogger} import coursier.core._ +import coursier.error.ResolutionError +import coursier.error.ResolutionError.CantDownloadModule import coursier.ivy.IvyRepository import coursier.maven.MavenRepositoryLike import coursier.params.rule.RuleResolution +import coursier.util.Task import sbt.util.Logger +import scala.concurrent.duration.FiniteDuration import scala.collection.mutable // private[coursier] @@ -79,47 +84,85 @@ object ResolutionRun { if (verbosityLevel >= 2) log.info(initialMessage) - Resolve() - // re-using various caches from a resolution of a configuration we extend - .withInitialResolution(startingResolutionOpt) - .withDependencies( - params.dependencies.collect { - case (config, dep) if configs(config) => - dep - } - ) - .withRepositories(repositories) - .withResolutionParams( - params - .params - .addForceVersion((if (isSandboxConfig) Nil else params.interProjectDependencies.map(_.moduleVersion)): _*) - .withForceScalaVersion(params.autoScalaLibOpt.nonEmpty) - .withScalaVersionOpt(params.autoScalaLibOpt.map(_._2)) - .withTypelevel(params.params.typelevel) - .withRules(rules) - ) - .withCache( - params - .cache - .withLogger( - params.loggerOpt.getOrElse { - RefreshLogger.create( - if (RefreshLogger.defaultFallbackMode) - new FallbackRefreshDisplay() - else - ProgressBarRefreshDisplay.create( - if (printOptionalMessage) log.info(initialMessage), - if (printOptionalMessage || verbosityLevel >= 2) - log.info(s"Resolved ${params.projectName} dependencies") - ) - ) - } - ) - ) - .either() match { - case Left(err) if params.missingOk => Right(err.resolution) - case others => others - } + val resolveTask: Resolve[Task] = { + Resolve() + // re-using various caches from a resolution of a configuration we extend + .withInitialResolution(startingResolutionOpt) + .withDependencies( + params.dependencies.collect { + case (config, dep) if configs(config) => + dep + } + ) + .withRepositories(repositories) + .withResolutionParams( + params + .params + .addForceVersion((if (isSandboxConfig) Nil else params.interProjectDependencies.map(_.moduleVersion)): _*) + .withForceScalaVersion(params.autoScalaLibOpt.nonEmpty) + .withScalaVersionOpt(params.autoScalaLibOpt.map(_._2)) + .withTypelevel(params.params.typelevel) + .withRules(rules) + ) + .withCache( + params + .cache + .withLogger( + params.loggerOpt.getOrElse { + RefreshLogger.create( + if (RefreshLogger.defaultFallbackMode) + new FallbackRefreshDisplay() + else + ProgressBarRefreshDisplay.create( + if (printOptionalMessage) log.info(initialMessage), + if (printOptionalMessage || verbosityLevel >= 2) + log.info(s"Resolved ${params.projectName} dependencies") + ) + ) + } + ) + ) + } + + val (period, maxAttempts) = params.retry + val finalResult: Either[ResolutionError, Resolution] = { + + def retry(attempt: Int, waitOnError: FiniteDuration): Task[Either[ResolutionError, Resolution]] = + resolveTask + .io + .attempt + .flatMap { + case Left(e: ResolutionError) => + val hasConnectionTimeouts = e.errors.exists { + case err: CantDownloadModule => err.perRepositoryErrors.exists(_.contains("Connection timed out")) + case _ => false + } + if (hasConnectionTimeouts) + if (attempt + 1 >= maxAttempts) { + log.error(s"Failed, maximum iterations ($maxAttempts) reached") + Task.point(Left(e)) + } + else { + log.warn(s"Attempt ${attempt + 1} failed: $e") + Task.completeAfter(retryScheduler, waitOnError).flatMap { _ => + retry(attempt + 1, waitOnError * 2) + } + } + else + Task.point(Left(e)) + case Left(ex) => + Task.fail(ex) + case Right(value) => + Task.point(Right(value)) + } + + retry(0, period).unsafeRun()(resolveTask.cache.ec) + } + + finalResult match { + case Left(err) if params.missingOk => Right(err.resolution) + case others => others + } } def resolutions( @@ -164,4 +207,5 @@ object ResolutionRun { } } + private lazy val retryScheduler = ThreadUtil.fixedScheduledThreadPool(1) } diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala b/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala index bb34688dc..34ae75dbb 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala @@ -6,7 +6,7 @@ import lmcoursier.definitions._ import sbt.librarymanagement.{Resolver, UpdateConfiguration, ModuleID, CrossVersion, ModuleInfo, ModuleDescriptorConfiguration} import xsbti.Logger -import scala.concurrent.duration.Duration +import scala.concurrent.duration.{Duration, FiniteDuration} import java.io.File import java.net.URL import java.net.URLClassLoader @@ -74,6 +74,7 @@ package object syntax { sbtClassifiers = false, providedInCompile = false, protocolHandlerDependencies = Vector.empty, + retry = None ) } @@ -107,6 +108,9 @@ package object syntax { def withUpdateConfiguration(conf: UpdateConfiguration): CoursierConfiguration = value.withMissingOk(conf.missingOk) + + def withRetry(retry: (FiniteDuration, Int)): CoursierConfiguration = + value.withRetry(Some((retry._1, retry._2))) } implicit class PublicationOp(value: Publication) { diff --git a/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala b/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala index 11cb03ceb..5b0bd6118 100644 --- a/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala +++ b/modules/sbt-coursier-shared/src/main/scala/coursier/sbtcoursiershared/SbtCoursierShared.scala @@ -12,6 +12,7 @@ import sbt.{AutoPlugin, Classpaths, Compile, Setting, TaskKey, Test, settingKey, import sbt.Keys._ import sbt.librarymanagement.DependencyBuilders.OrganizationArtifactName import sbt.librarymanagement.{ModuleID, Resolver, URLRepository} +import scala.concurrent.duration.FiniteDuration object SbtCoursierShared extends AutoPlugin { @@ -52,6 +53,8 @@ object SbtCoursierShared extends AutoPlugin { val coursierCache = settingKey[File]("") val sbtCoursierVersion = Properties.version + + val coursierRetry = taskKey[Option[(FiniteDuration, Int)]]("Retry for downloading dependencies") } import autoImport._ @@ -71,7 +74,8 @@ object SbtCoursierShared extends AutoPlugin { coursierReorderResolvers := true, coursierKeepPreloaded := false, coursierLogger := None, - coursierCache := CoursierDependencyResolution.defaultCacheLocation + coursierCache := CoursierDependencyResolution.defaultCacheLocation, + coursierRetry := None ) private val pluginIvySnapshotsBase = Resolver.SbtRepositoryRoot.stripSuffix("/") + "/ivy-snapshots" @@ -178,7 +182,8 @@ object SbtCoursierShared extends AutoPlugin { confs ++ extraSources.toSeq ++ extraDocs.toSeq }, mavenProfiles := Set.empty, - versionReconciliation := Seq.empty + versionReconciliation := Seq.empty, + coursierRetry := None ) ++ { if (pubSettings) IvyXmlGeneration.generateIvyXmlSettings diff --git a/modules/sbt-coursier/src/main/scala/coursier/sbtcoursier/Keys.scala b/modules/sbt-coursier/src/main/scala/coursier/sbtcoursier/Keys.scala index 6fe4a8d28..bf6ca9d9a 100644 --- a/modules/sbt-coursier/src/main/scala/coursier/sbtcoursier/Keys.scala +++ b/modules/sbt-coursier/src/main/scala/coursier/sbtcoursier/Keys.scala @@ -9,7 +9,7 @@ import coursier.util.Artifact import sbt.librarymanagement.{GetClassifiersModule, Resolver} import sbt.{InputKey, SettingKey, TaskKey} -import scala.concurrent.duration.Duration +import scala.concurrent.duration.{Duration, FiniteDuration} object Keys { val coursierParallelDownloads = SettingKey[Int]("coursier-parallel-downloads") diff --git a/modules/sbt-coursier/src/main/scala/coursier/sbtcoursier/ResolutionTasks.scala b/modules/sbt-coursier/src/main/scala/coursier/sbtcoursier/ResolutionTasks.scala index ae226cacd..eceb186ce 100644 --- a/modules/sbt-coursier/src/main/scala/coursier/sbtcoursier/ResolutionTasks.scala +++ b/modules/sbt-coursier/src/main/scala/coursier/sbtcoursier/ResolutionTasks.scala @@ -50,6 +50,8 @@ object ResolutionTasks { else Def.task(coursierRecursiveResolvers.value.distinct) + val retrySettings = Def.task(coursierRetry.value) + Def.task { val projectName = thisProjectRef.value.project @@ -169,6 +171,7 @@ object ResolutionTasks { .withExclusions(excludeDeps), strictOpt = strictOpt, missingOk = missingOk, + retry = retrySettings.value.getOrElse(ResolutionParams.defaultRetry) ), verbosityLevel, log From 32a687d15ed11a336f51519140383a1ef01468cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Tue, 16 Jan 2024 00:46:58 +0100 Subject: [PATCH 87/96] Make module name non-empty --- .../main/scala/lmcoursier/CoursierDependencyResolution.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala b/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala index f6c88c5ba..fa4863e71 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala @@ -168,7 +168,7 @@ class CoursierDependencyResolution( val cache = conf.cache.getOrElse(CacheDefaults.location) val cachePolicies = conf.cachePolicies.map(ToCoursier.cachePolicy) val checksums = conf.checksums - val projectName = "" // used for logging only… + val projectName = module0.module.name val ivyProperties = ResolutionParams.defaultIvyProperties(conf.ivyHome) From 5c966f4562883de52364dfcc6940085a26475125 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Mon, 22 Jan 2024 13:28:19 +0100 Subject: [PATCH 88/96] Add a `sameVersions` paramter to CoursierConfiguration Expose coursier's `SameVersion` rule to allow pinning libraries to the same version. --- .../lmcoursier/CoursierConfiguration.scala | 7 ++++--- .../CoursierDependencyResolution.scala | 3 ++- .../lmcoursier/definitions/ToCoursier.scala | 19 +++++++++++++++---- .../lmcoursier/internal/ResolutionRun.scala | 4 ++-- .../scala/lmcoursier/syntax/package.scala | 3 ++- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala b/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala index 09c5e3349..357a11a72 100644 --- a/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala +++ b/modules/definitions/src/main/scala/lmcoursier/CoursierConfiguration.scala @@ -1,12 +1,12 @@ package lmcoursier import java.io.File - -import dataclass.{ data, since } +import dataclass.{data, since} import coursier.cache.CacheDefaults +import coursier.params.rule.{Rule, RuleResolution} import lmcoursier.credentials.Credentials import lmcoursier.definitions.{Authentication, CacheLogger, CachePolicy, FromCoursier, Module, ModuleMatchers, Project, Reconciliation, Strict} -import sbt.librarymanagement.{Resolver, UpdateConfiguration, ModuleID, CrossVersion, ModuleInfo, ModuleDescriptorConfiguration} +import sbt.librarymanagement.{CrossVersion, InclExclRule, ModuleDescriptorConfiguration, ModuleID, ModuleInfo, Resolver, UpdateConfiguration} import xsbti.Logger import scala.concurrent.duration.{Duration, FiniteDuration} @@ -60,4 +60,5 @@ import java.net.URLClassLoader @since protocolHandlerDependencies: Seq[ModuleID] = Vector.empty, retry: Option[(FiniteDuration, Int)] = None, + sameVersions: Seq[Set[InclExclRule]] = Nil, ) diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala b/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala index f6c88c5ba..f1a4bf2ea 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala @@ -251,7 +251,8 @@ class CoursierDependencyResolution( .withForceVersion(conf.forceVersions.map { case (k, v) => (ToCoursier.module(k), v) }.toMap) .withTypelevel(typelevel) .withReconciliation(ToCoursier.reconciliation(conf.reconciliation)) - .withExclusions(excludeDependencies), + .withExclusions(excludeDependencies) + .withRules(ToCoursier.sameVersions(conf.sameVersions)), strictOpt = conf.strict.map(ToCoursier.strict), missingOk = conf.missingOk, retry = conf.retry.getOrElse(ResolutionParams.defaultRetry), diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/ToCoursier.scala b/modules/lm-coursier/src/main/scala/lmcoursier/definitions/ToCoursier.scala index 1d47c3d85..2edaf65d8 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/definitions/ToCoursier.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/definitions/ToCoursier.scala @@ -1,6 +1,7 @@ package lmcoursier.definitions import lmcoursier.credentials.{Credentials, DirectCredentials, FileCredentials} +import sbt.librarymanagement.InclExclRule // TODO Make private[lmcoursier] // private[coursier] @@ -31,11 +32,14 @@ object ToCoursier { .withHttpsOnly(authentication.httpsOnly) .withPassOnRedirect(authentication.passOnRedirect) - def module(module: Module): coursier.core.Module = + def module(mod: Module): coursier.core.Module = + module(mod.organization.value, mod.name.value, mod.attributes) + + def module(organization: String, name: String, attributes: Map[String, String] = Map.empty): coursier.core.Module = coursier.core.Module( - coursier.core.Organization(module.organization.value), - coursier.core.ModuleName(module.name.value), - module.attributes + coursier.core.Organization(organization), + coursier.core.ModuleName(name), + attributes ) def moduleMatchers(matcher: ModuleMatchers): coursier.util.ModuleMatchers = @@ -61,6 +65,13 @@ object ToCoursier { Vector[(coursier.util.ModuleMatchers, coursier.core.Reconciliation)] = rs map { case (m, r) => (moduleMatchers(m), reconciliation(r)) } + def sameVersions(sv: Seq[Set[InclExclRule]]): + Seq[(coursier.params.rule.SameVersion, coursier.params.rule.RuleResolution)] = + sv.map { libs => + val matchers = libs.map(rule => coursier.util.ModuleMatcher(module(rule.organization, rule.name))) + coursier.params.rule.SameVersion(matchers) -> coursier.params.rule.RuleResolution.TryResolve + } + def dependency(dependency: Dependency): coursier.core.Dependency = coursier.core.Dependency( module(dependency.module), diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala b/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala index 9bb73be6e..91e30dbbf 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/internal/ResolutionRun.scala @@ -39,7 +39,7 @@ object ResolutionRun { params.mainRepositories ++ params.fallbackDependenciesRepositories - val rules = params.strictOpt.map(s => Seq((s, RuleResolution.Fail))).getOrElse(Nil) + val rules = params.params.rules ++ params.strictOpt.map(s => Seq((s, RuleResolution.Fail))).getOrElse(Nil) val printOptionalMessage = verbosityLevel >= 0 && verbosityLevel <= 1 @@ -182,7 +182,7 @@ object ResolutionRun { SbtCoursierCache.default.resolutionOpt(params.resolutionKey).map(Right(_)).getOrElse { val resOrError = Lock.maybeSynchronized(needsLock = params.loggerOpt.nonEmpty || !RefreshLogger.defaultFallbackMode) { - var map = new mutable.HashMap[Configuration, Resolution] + val map = new mutable.HashMap[Configuration, Resolution] val either = params.orderedConfigs.foldLeft[Either[coursier.error.ResolutionError, Unit]](Right(())) { case (acc, (config, extends0)) => for { diff --git a/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala b/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala index 34ae75dbb..c4c3755b6 100644 --- a/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala +++ b/modules/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala @@ -74,7 +74,8 @@ package object syntax { sbtClassifiers = false, providedInCompile = false, protocolHandlerDependencies = Vector.empty, - retry = None + retry = None, + sameVersions = Nil, ) } From 2de922e468d09dfa42d28aa846d27be24e8baf51 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 19 Feb 2024 17:01:41 +0000 Subject: [PATCH 89/96] Update coursier, ... to 2.1.9 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 1692ee9db..fe18025fa 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ inThisBuild(List( Global / excludeLintKeys += scriptedBufferLog Global / excludeLintKeys += scriptedLaunchOpts -def coursierVersion0 = "2.1.8" +def coursierVersion0 = "2.1.9" def coursierDep = ("io.get-coursier" %% "coursier" % coursierVersion0) .exclude("org.codehaus.plexus", "plexus-archiver") .exclude("org.codehaus.plexus", "plexus-container-default") From 6de76349c9320246f49b3ebb71e4590bb536b3d5 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 19 Feb 2024 17:01:44 +0000 Subject: [PATCH 90/96] Update scalatest to 3.2.18 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 1692ee9db..3168db353 100644 --- a/build.sbt +++ b/build.sbt @@ -92,7 +92,7 @@ lazy val `lm-coursier` = project // IvySbt#Module (seems DependencyResolutionInterface.moduleDescriptor // is ignored). lmIvy.value, - "org.scalatest" %% "scalatest" % "3.2.17" % Test + "org.scalatest" %% "scalatest" % "3.2.18" % Test ), Test / exportedProducts := { (Test / preTest).value @@ -163,7 +163,7 @@ lazy val `lm-coursier-shaded` = project "org.scala-lang.modules" %% "scala-xml" % "2.2.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, - "org.scalatest" %% "scalatest" % "3.2.17" % Test + "org.scalatest" %% "scalatest" % "3.2.18" % Test ) ) From 594d35e8779443e6785e6cf3dce16f3ee472f7a0 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 15 Apr 2024 14:31:30 +0000 Subject: [PATCH 91/96] Update utest to 0.8.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 14d5f3425..375240019 100644 --- a/build.sbt +++ b/build.sbt @@ -174,7 +174,7 @@ lazy val `sbt-coursier-shared` = project .settings( plugin, generatePropertyFile, - libraryDependencies += "com.lihaoyi" %% "utest" % "0.8.2" % Test, + libraryDependencies += "com.lihaoyi" %% "utest" % "0.8.3" % Test, testFrameworks += new TestFramework("utest.runner.Framework") ) From 4e56e4626d06c4872db661919f08dcf555149eba Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 17 Apr 2024 14:24:17 +0000 Subject: [PATCH 92/96] Update scala-collection-compat to 2.12.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 375240019..ba76cf519 100644 --- a/build.sbt +++ b/build.sbt @@ -159,7 +159,7 @@ lazy val `lm-coursier-shaded` = project "io.get-coursier" %% "coursier-sbt-maven-repository" % coursierVersion0, "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, - "org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0", + "org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0", "org.scala-lang.modules" %% "scala-xml" % "2.2.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, From 9af025d757ce38c432d1aeea508803a304ac0ea3 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 17 Apr 2024 14:24:19 +0000 Subject: [PATCH 93/96] Update scala-xml to 2.3.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 375240019..ef862ad14 100644 --- a/build.sbt +++ b/build.sbt @@ -160,7 +160,7 @@ lazy val `lm-coursier-shaded` = project "io.get-coursier.jniutils" % "windows-jni-utils-lmcoursier" % jniUtilsVersion, "net.hamnaberg" %% "dataclass-annotation" % dataclassScalafixV % Provided, "org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0", - "org.scala-lang.modules" %% "scala-xml" % "2.2.0", // depending on that one so that it doesn't get shaded + "org.scala-lang.modules" %% "scala-xml" % "2.3.0", // depending on that one so that it doesn't get shaded "org.slf4j" % "slf4j-api" % "1.7.36", // depending on that one so that it doesn't get shaded either lmIvy.value, "org.scalatest" %% "scalatest" % "3.2.18" % Test From a6a4c995209ee1c390d18fc0155f2c36f0d153be Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 5 May 2024 06:42:42 +0000 Subject: [PATCH 94/96] Update sbt-scalafix to 0.12.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c1777fe16..2956eb4cf 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.3") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value From 0736e78f72a6f7b835abafd4bc01728c88d39750 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 7 May 2024 16:29:32 +0000 Subject: [PATCH 95/96] Update sbt-shading to 2.1.4 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 2956eb4cf..c8ff48220 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") -addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.3") +addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.4") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value From e8990e2fa515e32b50b4f1039848df3434f2e86b Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 25 May 2024 13:35:35 +0000 Subject: [PATCH 96/96] Update sbt-shading to 2.1.5 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c8ff48220..d1948a370 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") -addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.4") +addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.5") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value