Skip to content

Clean up unused, undeclared, and conflicting dependencies #201

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

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Changes from 17 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
20 changes: 12 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ lazy val V = new {
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"
}

lazy val definitions = (project in file("definitions"))
.settings(name := "definitions")
.settings(
crossScalaVersions := Seq(V.scala212, V.scala),
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % "1.2.0",
"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 exclude ("org.scala-lang.modules", "scala-xml_2.12") exclude ("org.scala-lang.modules", "scala-xml_2.13"),
"org.scalatest" %% "scalatest" % V.scalatest exclude ("org.scala-lang.modules", "scala-xml_2.12") exclude ("org.scala-lang.modules", "scala-xml_2.13")
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine like this, but just as a tip, if I need to nuke a certain dependency from my classpath I often use map to add the exclude rule to every single entry in libraryDependencies. That reduces the risk of the unwanted transitive dependency slipping through the cracks, e.g. when you add more dependencies to your project later.

libraryDependencies ++= Seq(
   ...
   ...
).map(_ exclude ("org.foo", "bar"))

)

Expand All @@ -46,16 +48,18 @@ lazy val compiler = (project in file("compiler"))
crossScalaVersions := Seq(V.scala212, V.scala),
scalacOptions -= "-Xfatal-warnings",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % "1.2.0",
"org.scala-exercises" %% "runtime" % V.runtime exclude ("org.scala-lang.modules", "scala-collection-compat"),
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
"org.scala-lang" % "scala-compiler" % scalaVersion.value exclude ("org.scala-lang.modules", "scala-xml"),
"org.scala-lang.modules" %% "scala-collection-compat" % V.collectioncompat,
"org.typelevel" %% "cats-core" % V.cats % Compile,
"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.scalariform" %% "scalariform" % V.scalariform exclude ("org.scala-lang.modules", "scala-xml"),
"org.typelevel" %% "cats-laws" % V.cats % Test,
"org.scalatest" %% "scalatest-core" % V.scalatest % Test exclude ("org.scala-lang.modules", "scala-xml_2.12"),
"org.scalatest" %% "scalatest" % V.scalatest % Test exclude ("org.scala-lang.modules", "scala-xml_2.12")
)
)
.dependsOn(definitions)
Expand Down