Skip to content

Commit c6eed44

Browse files
committed
Update README.md with debugging instructions
1 parent 08c6439 commit c6eed44

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,35 @@ unusedCompileDependenciesFilter -= moduleFilter("org.scalaz", "scalaz")
115115
Note: If you're filtering things out because you think the plugin is returning
116116
false-positive results, please open a GitHub issue.
117117

118+
## Debugging
119+
120+
You can pass `-debug` flag to sbt or set logLevel to debug to understand how the plugin computes compile depndencies
121+
122+
```
123+
sbt:example> set logLevel := Level.Debug
124+
sbt:example> unusedCompileDependencies
125+
...
126+
[debug] Source to library relations:
127+
[debug] sbt-explicit-dependencies/example/src/main/scala/foo/MyCaseClass.scala -> /Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-effect_2.12/0.10.1/cats-effect_2.12-0.10.1.jar
128+
[debug] sbt-explicit-dependencies/example/src/main/scala/foo/Example.scala -> /Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-core_2.12/1.2.0/cats-core_2.12-1.2.0.jar
129+
...
130+
[debug] Library dependencies:
131+
[debug] /Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-effect_2.12/0.10.1/cats-effect_2.12-0.10.1.jar
132+
[debug] /Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-core_2.12/1.2.0/cats-core_2.12-1.2.0.jar
133+
...
134+
[debug] jarFile: cats-effect_2.12-0.10.1.jar -> "org.typelevel" %% "cats-effect" % "0.10.1"
135+
[debug] jarFile: cats-core_2.12-1.2.0.jar -> "org.typelevel" %% "cats-core" % "1.2.0"
136+
...
137+
[debug] Compile depends on:
138+
[debug] "org.typelevel" %% "cats-effect" % "0.10.1"
139+
[debug] "org.typelevel" %% "cats-core" % "1.2.0"
140+
...
141+
[debug] Declared dependencies:
142+
[debug] "org.http4s" %% "http4s-blaze-server" % "0.18.16"
143+
[debug] "org.http4s" %% "http4s-circe" % "0.18.16"
144+
...
145+
```
146+
118147
## Example project
119148

120149
There is an example sbt project in the `example` folder so you can see the

0 commit comments

Comments
 (0)