Skip to content

REPL stack trace not truncated on head #12920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
som-snytt opened this issue Jun 23, 2021 · 2 comments · Fixed by #12921
Closed

REPL stack trace not truncated on head #12920

som-snytt opened this issue Jun 23, 2021 · 2 comments · Fixed by #12921

Comments

@som-snytt
Copy link
Contributor

Compiler version

➜ dotty git:(4e2c2a2) ./bin/scalac -version
Scala compiler version 3.0.1-RC2-bin-SNAPSHOT-git-4e2c2a2 -- Copyright 2002-2021, LAMP/EPFL

Minimized code

  dotty git:(review/migrate-scala2-7671) scala
scala> ???
scala.NotImplementedError: an implementation is missing
  at scala.Predef$.$qmark$qmark$qmark(Predef.scala:345)
  ... 28 elided

scala>
  dotty git:(4e2c2a2c68) ./bin/scala
Building Dotty...
scala> ???
scala.NotImplementedError: an implementation is missing
  at scala.Predef$.$qmark$qmark$qmark(Predef.scala:344)
  at repl$.rs$line$1$.<clinit>(rs$line$1:1)
  at repl$.rs$line$1.res0(rs$line$1)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.base/java.lang.reflect.Method.invoke(Method.java:567)
  at dotty.tools.repl.Rendering.$anonfun$3(Rendering.scala:115)
  at scala.Option.map(Option.scala:242)
  at dotty.tools.repl.Rendering.valueOf(Rendering.scala:115)
  at dotty.tools.repl.Rendering.renderVal(Rendering.scala:152)
  at dotty.tools.repl.ReplDriver.$anonfun$13(ReplDriver.scala:323)
  at scala.collection.immutable.List.flatMap(List.scala:293)
  at scala.collection.immutable.List.flatMap(List.scala:79)
  at dotty.tools.repl.ReplDriver.extractAndFormatMembers$1(ReplDriver.scala:323)
  at dotty.tools.repl.ReplDriver.renderDefinitions$$anonfun$2(ReplDriver.scala:346)
  at scala.Option.map(Option.scala:242)
  at dotty.tools.repl.ReplDriver.renderDefinitions(ReplDriver.scala:349)
  at dotty.tools.repl.ReplDriver.compile$$anonfun$2(ReplDriver.scala:268)
  at scala.util.Either.fold(Either.scala:189)
  at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:285)
  at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:212)
  at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:146)
  at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:149)
  at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:168)
  at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:149)
  at dotty.tools.repl.ReplDriver.tryRunning(ReplDriver.scala:115)
  at dotty.tools.repl.Main$.main(Main.scala:6)
  at dotty.tools.repl.Main.main(Main.scala)

Output

Shows full stack trace.

Expectation

Truncated stack trace.

I'll take a look in a short while.

@som-snytt
Copy link
Contributor Author

Actually a bug. I didn't add a test for the test to inspect the stack, so naturally it regressed.

@griggt
Copy link
Contributor

griggt commented Jun 23, 2021

Thanks, I didn't think to look there when I added package wrapping. Tests are good. :)

@Kordyjan Kordyjan added this to the 3.0.2 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants