You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"@main def main = println(util.Properties.versionMsg)"> test.scala
scala -nocompdaemon test.scala
This code is part of a docker build on a amazon amazoncorretto:17.0.4 base image
see sbt/docker-sbt#207
Output
tput: terminal attributes: No such device or address
Exception in thread "main" java.lang.NumberFormatException:For input string: ""
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:678)
at java.base/java.lang.Integer.parseInt(Integer.java:786)
at scala.collection.StringOps$.toInt$extension(StringOps.scala:915)
at dotty.tools.dotc.config.ScalaSettings$.defaultPageWidth(ScalaSettings.scala:39)
at dotty.tools.dotc.config.CommonScalaSettings.$init$(ScalaSettings.scala:105)
at dotty.tools.dotc.config.ScalaSettings.<init>(ScalaSettings.scala:14)
at dotty.tools.dotc.core.Contexts$ContextBase.<init>(Contexts.scala:850)
at dotty.tools.dotc.Driver.initCtx(Driver.scala:59)
at dotty.tools.scripting.ScriptingDriver.compileAndRun(ScriptingDriver.scala:17)
at dotty.tools.scripting.Main$.main(Main.scala:45)
at dotty.tools.MainGenericRunner$.run$1(MainGenericRunner.scala:249)
at dotty.tools.MainGenericRunner$.main(MainGenericRunner.scala:268)
at dotty.tools.MainGenericRunner.main(MainGenericRunner.scala)
Compiler version
3.1.3
Minimized code
This code is part of a docker build on a amazon
amazoncorretto:17.0.4
base imagesee sbt/docker-sbt#207
Output
Expectation
This runs fine and prints the scala version
More info
introduced in #10304
https://github.com/lampepfl/dotty/blob/1130c52a6476d473b41a598e23f0415e0f8d76dc/dist/bin/common#L31-L34
for reference eclipse temurin
Fix
Probably this should default to 80 or not set COLUMNS in case tput fails?
see https://docs.scala-lang.org/scala3/guides/migration/options-new.html
Workaround
looks like
-pagewidth 80
4f803eb was applied to tests to fix a similar issueThe text was updated successfully, but these errors were encountered: