sbt / sbt-dependency-graph

sbt plugin to create a dependency graph for your project
Apache License 2.0
1.24k stars 113 forks source link

::toFile task variants should ignore terminal width #182

Open matmannion opened 5 years ago

matmannion commented 5 years ago

I'm trying to get around a problem with our dependency tree being truncated as part of a CI task that doesn't have an interactive terminal, so uses the 80-character default and is truncating dependency versions (#173). This can be replicated pretty easily from the command line:

➜  stty cols 70 && sbt dependencyTree | grep jsr310
[info]   +-com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2..

Unfortunately the terminal width also affects the output to file, which I don't think is intentional:

➜  stty cols 70 && sbt 'dependencyTree::toFile dependencies.txt'
...
[info] Wrote dependencyTree to 'dependencies.txt'
[success] Total time: 0 s, completed 05-Aug-2019 10:17:59
➜  grep jsr310 dependencies.txt 
  +-com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2..
jrudolph commented 5 years ago

Thanks, @matmannion. That cropping is indeed a bit useless for toFile. I'll see if I can do something for the next release.