Skip to content

LsSeq's pretty-printing doesn't follow height-truncation rules #209

@lihaoyi

Description

@lihaoyi

This is probably because we're pushing the truncation logic deep into each pprinter, rather than just having it performed by the final printing of the resultantIterator[String], allowing individual pprinters to misbehave

haoyi-cache@ Seq.fill(100)(100)
res5: Seq[Int] = List(
  100,
  100,
  100,
  100,
  100,
  100,
  100,
  100,
  100,
  100,
  100,
...
haoyi-cache@ ls!
res6: LsSeq =
'aopalliance
'asm
"com.chuusai"
"com.github.scopt"
"com.google"
"com.google.guava"
"com.google.inject"
"com.jcraft"
"com.jsuereth"
"com.lihaoyi"
"com.scalatags"
"com.thoughtworks.paranamer"
"com.typesafe"
"com.typesafe.akka"
"commons-codec"
"commons-io"
"commons-logging"
"io.spray"
"javax.annotation"
"javax.enterprise"
"javax.inject"
'jline
"net.databinder"
"org.apache"
"org.apache.ant"
"org.apache.commons"
"org.apache.httpcomponents"
"org.apache.ivy"
"org.apache.maven"
"org.apache.sshd"
"org.bouncycastle"
"org.codehaus"
"org.codehaus.plexus"
"org.eclipse.aether"
"org.eclipse.sisu"
"org.fusesource.jansi"
"org.jboss"
"org.jboss.interceptor"
"org.jboss.weld"
"org.json4s"
"org.reactivestreams"
"org.scala-lang"
"org.scala-lang.modules"
"org.scala-sbt"
"org.scala-sbt.ivy"
"org.scala-tools.sbinary"
"org.scalacheck"
"org.scalactic"
"org.scalamacros"
"org.scalatest"
"org.slf4j"
"org.sonatype.forge"
"org.sonatype.oss"
"org.sonatype.plexus"
"org.sonatype.sisu"
"org.sonatype.sisu.inject"
"org.sonatype.spice"
"org.spire-math"
"org.tukaani"
"org.vafer"
"org.webjars"
"resolved-com.lihaoyi-ammonite-shell_2.10-caller-working.properties"
"resolved-com.lihaoyi-ammonite-shell_2.10-caller-working.xml"
"resolved-com.lihaoyi-ammonite-shell_2.11-caller-working.properties"
"resolved-com.lihaoyi-ammonite-shell_2.11-caller-working.xml"
"scala_2.10"

haoyi-cache@

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions