Skip to content

sbt logger does super weird stuff with string context without interpolation #4371

@mriehl

Description

@mriehl

steps

scala> sbt.internal.util.ConsoleLogger().info(s"\t")
[info] \t

scala> sbt.internal.util.ConsoleLogger().info(s"\t${"wtf"}")
[info]  wtf

scala> sbt.internal.util.ConsoleLogger().info("\tfoo")
[info]  foo

problem

s"" should be simplified to "" at runtime, but the sbt logger somehow escapes the contents additionally.

expectation

s"" should behave like a regular string w.r.t. escaping.
See

scala> s"\t"
res8: String = "        "

notes

sbt version:
1.0 works fine
1.2.1 has this issue
1.2.3 has this issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions