Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up unused, undeclared, and conflicting dependencies #201

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
afef326
Run release workflow on this branch
Feb 4, 2022
b3ae53d
Show developers in ci-publish
Feb 4, 2022
c39e469
spelling
Feb 4, 2022
54400bb
turn on debug
Feb 4, 2022
8146821
less debug
Feb 4, 2022
a1183f7
don't actually need to do the release
Feb 4, 2022
09dce55
is debug the problem? does it hate it?
Feb 4, 2022
07f3d97
more debug printing
Feb 4, 2022
77b177a
Adds at least one developer (#200)
juanpedromoreno Feb 7, 2022
6304785
Update documentation, and other files [skip ci]
juanpedromoreno Feb 7, 2022
73156d7
Upgrade scalatest
Feb 8, 2022
a1dbc19
Add dependency scheme to sbt-test projects
Feb 8, 2022
b94ba7a
Merge branch 'main' into test/js/release-on-this-branch
Feb 8, 2022
64b6570
Exclude updated scala-xml dep
Feb 9, 2022
56629c5
Remove library schema setting from scripted tests
Feb 9, 2022
3c9099f
restore release yml to prior (managed) state
Feb 9, 2022
2db957b
Remove dependency tree plugin
Feb 9, 2022
af86dad
wip
Feb 10, 2022
da82008
Back to 1.6.1
Feb 10, 2022
846f9e9
Wait is collection-compat GOOD actually
Feb 10, 2022
89e7c04
Remove explicit collection-compat dep
Feb 10, 2022
1cdc8b7
Declare all dependencies
Feb 10, 2022
e6bf356
don't tail???
Feb 10, 2022
a3ad2f8
include basedir name
Feb 10, 2022
2c72537
Add sbt-explicit-dependencies and sbt-missinglink
Feb 10, 2022
0e7c1c7
Remove dependency tree plugin
Feb 10, 2022
14ca1e9
Add dependency override to test projects
Feb 10, 2022
ed1631e
test in macos to verify filesystem differences
Feb 10, 2022
faea8c3
Revert "test in macos to verify filesystem differences"
Feb 10, 2022
b37046a
confirm this would be fine if filesystems agreed
Feb 10, 2022
9bf6675
Add just one more dependency override to test projects
Feb 10, 2022
6c100ac
remove unused
Feb 11, 2022
7ddc52b
restore lib x-publication for scala 212
Feb 11, 2022
7c1e48e
add scala-xml dep override to plugin project
Feb 11, 2022
2311631
remove commented tail of deps
Feb 14, 2022
ee35a77
actually jsut remove that if it doesn't do anything
Feb 14, 2022
ae8efdc
wip -- stashing to compare with main
Feb 21, 2022
869164d
pin to lower scala-xml
Mar 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 50 additions & 20 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,49 +14,61 @@ addCommandAlias("ci-publish", ";github; ci-release")

lazy val V = new {
val cats: String = "2.7.0"
val collectioncompat: String = "2.6.0"
val catsEffect: String = "3.3.4"
val github4s: String = "0.30.0"
val http4s: String = "0.23.8"
val runtime: String = "0.7.0"
val sbtIO = "1.6.0"
val scala: String = "2.13.8"
val scala212: String = "2.12.15"
val scalacheck: String = "1.15.4"
val scalacheckShapeless: String = "1.3.0"
val scalamacros: String = "2.1.1"
val scalariform: String = "0.2.10"
val scalatest: String = "3.2.10"
val scalatest: String = "3.2.11"
val scalaXml: String = "2.0.1"
val shapeless: String = "2.3.7"
}

lazy val definitions = (project in file("definitions"))
.settings(name := "definitions")
.settings(
crossScalaVersions := Seq(V.scala212, V.scala),
crossScalaVersions := Seq(V.scala, V.scala212),
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % V.cats,
"org.scalatest" %% "scalatest" % V.scalatest,
"org.scalacheck" %% "scalacheck" % V.scalacheck,
"com.github.alexarchambault" %% "scalacheck-shapeless_1.15" % V.scalacheckShapeless
)
"com.github.alexarchambault" %% "scalacheck-shapeless_1.15" % V.scalacheckShapeless,
"org.scalatest" %% "scalatest-core" % V.scalatest,
"com.chuusai" %% "shapeless" % V.shapeless
),
dependencyOverrides += "org.scala-lang.modules" %% "scala-xml" % "2.0.1"
)

lazy val compiler = (project in file("compiler"))
.settings(name := "exercise-compiler")
.settings(
exportJars := true,
crossScalaVersions := Seq(V.scala212, V.scala),
crossScalaVersions := Seq(V.scala, V.scala212),
scalacOptions -= "-Xfatal-warnings",
libraryDependencies ++= Seq(
"org.scala-exercises" %% "runtime" % V.runtime exclude ("org.scala-lang.modules", "scala-collection-compat"),
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
"org.scala-lang.modules" %% "scala-collection-compat" % V.collectioncompat,
"org.typelevel" %% "cats-core" % V.cats % Compile,
"org.http4s" %% "http4s-blaze-client" % V.http4s,
"org.http4s" %% "http4s-circe" % V.http4s,
"com.47deg" %% "github4s" % V.github4s,
"org.scalariform" %% "scalariform" % V.scalariform,
"org.typelevel" %% "cats-laws" % V.cats % Test,
"org.scalatest" %% "scalatest" % V.scalatest % Test
)
"org.scala-exercises" %% "runtime" % V.runtime,
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.scala-lang.modules" %% "scala-xml" % V.scalaXml,
"org.typelevel" %% "cats-core" % V.cats % Compile,
"org.http4s" %% "http4s-blaze-client" % V.http4s,
"org.http4s" %% "http4s-client" % V.http4s,
"com.47deg" %% "github4s" % V.github4s,
"org.scalariform" %% "scalariform" % V.scalariform,
"org.typelevel" %% "cats-kernel" % V.cats,
"org.typelevel" %% "cats-laws" % V.cats % Test,
"org.typelevel" %% "cats-effect" % V.catsEffect,
"org.typelevel" %% "cats-effect-kernel" % V.catsEffect,
"org.scalatest" %% "scalatest-core" % V.scalatest % Test,
"org.scalatest" %% "scalatest" % V.scalatest % Test
),
dependencyOverrides += "org.scala-lang.modules" %% "scala-xml" % "2.0.1",
unusedCompileDependenciesFilter -= moduleFilter("org.scala-lang", "scala-compiler")
)
.dependsOn(definitions)

Expand All @@ -67,8 +79,26 @@ lazy val `sbt-exercise` = (project in file("sbt-exercise"))
.settings(
scalacOptions -= "-Xfatal-warnings",
scalacOptions += "-Ypartial-unification",
libraryDependencies += "org.typelevel" %% "cats-core" % V.cats % Compile,
addCompilerPlugin("org.scalamacros" % "paradise" % V.scalamacros cross CrossVersion.full),
libraryDependencies ++= Seq(
"org.scala-sbt" %% "actions" % sbtVersion.value,
"org.scala-sbt" %% "collections" % sbtVersion.value,
"org.scala-sbt" % "compiler-interface" % sbtVersion.value,
"org.scala-sbt" %% "core-macros" % sbtVersion.value,
"org.scala-sbt" %% "io" % V.sbtIO,
"org.scala-sbt" %% "librarymanagement-core" % sbtVersion.value,
"org.scala-sbt" %% "main" % sbtVersion.value,
"org.scala-sbt" %% "main-settings" % sbtVersion.value,
"org.scala-sbt" % "sbt" % sbtVersion.value,
"org.scala-sbt" %% "task-system" % sbtVersion.value,
"org.scala-sbt" %% "util-logging" % sbtVersion.value,
"org.scala-sbt" %% "util-position" % sbtVersion.value,
"org.scala-sbt" %% "zinc-apiinfo" % sbtVersion.value,
"org.scala-sbt" %% "zinc-classpath" % sbtVersion.value,
"org.scala-sbt" %% "zinc-core" % sbtVersion.value,
"org.typelevel" %% "cats-core" % V.cats,
"org.typelevel" %% "cats-kernel" % V.cats
),
dependencyOverrides += "org.scala-lang.modules" %% "scala-xml" % "1.0.6",
// Leverage build info to populate compiler classpath--
compilerClasspath := { (compiler / Compile / fullClasspath) }.value,
buildInfoObject := "Meta",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import java.io.File
import org.scalaexercises.exercises.compiler.CompilerSettings

import scala.annotation.tailrec
import scala.collection.compat._
import scala.reflect.internal.util.BatchSourceFile
import scala.tools.nsc._
import scala.tools.nsc.doc.{Settings => _, _}
Expand Down Expand Up @@ -91,7 +90,7 @@ class SourceTextExtraction {
val rawImports = extraction.imports
val paths = rawImports.map(expandPath)

val imports = paths.groupBy(_._1).view.mapValues(_.map(_._2)).toMap
val imports = paths.groupBy(_._1).mapValues(_.map(_._2)).toMap

val methods = extraction.methods.map(expandPath).map { case (k, v) =>
lazy val methodImports = k
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.6.1
sbt.version=1.6.1
24 changes: 14 additions & 10 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.24")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("com.alejandrohdezma" % "sbt-github" % "0.11.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.11.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.11.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-remove-test-from-pom" % "0.1.0")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.24")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("com.alejandrohdezma" % "sbt-github" % "0.11.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.11.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.11.2")
addSbtPlugin("com.alejandrohdezma" % "sbt-remove-test-from-pom" % "0.1.0")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20")
addSbtPlugin("ch.epfl.scala" % "sbt-missinglink" % "0.3.3")
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")

libraryDependencies += "com.spotify" % "missinglink-core" % "0.2.5"
13 changes: 8 additions & 5 deletions sbt-exercise/src/sbt-test/sbt-exercise/basic/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ lazy val content = (project in file("content"))
Resolver.defaultLocal
),
libraryDependencies ++= Seq(
"org.scala-exercises" %% "runtime" % "0.6.0",
"org.scala-exercises" %% "runtime" % "0.7.0",
"org.scala-exercises" %% "exercise-compiler" % pluginVersion changing (),
"org.scala-exercises" %% "definitions" % pluginVersion changing ()
)
),
dependencyOverrides += "org.scala-lang.modules" %% "scala-xml" % "2.0.1"
)

lazy val contentInPackages = (project in file("contentinpackages"))
Expand All @@ -26,10 +27,11 @@ lazy val contentInPackages = (project in file("contentinpackages"))
Resolver.defaultLocal
),
libraryDependencies ++= Seq(
"org.scala-exercises" %% "runtime" % "0.6.0",
"org.scala-exercises" %% "runtime" % "0.7.0",
"org.scala-exercises" %% "exercise-compiler" % pluginVersion changing (),
"org.scala-exercises" %% "definitions" % pluginVersion changing ()
)
),
dependencyOverrides += "org.scala-lang.modules" %% "scala-xml" % "2.0.1"
)

lazy val check = (project in file("check"))
Expand All @@ -39,5 +41,6 @@ lazy val check = (project in file("check"))
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.defaultLocal
)
),
dependencyOverrides += "org.scala-lang.modules" %% "scala-xml" % "2.0.1"
)
3 changes: 2 additions & 1 deletion sbt-exercise/src/sbt-test/sbt-exercise/scalariform/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ lazy val root = (project in file("."))
),
libraryDependencies ++= Seq(
"org.scala-exercises" %% "exercise-compiler" % pluginVersion changing ()
)
),
dependencyOverrides += "org.scala-lang.modules" %% "scala-xml" % "2.0.1"
)
.enablePlugins(ExerciseCompilerPlugin)