-
Notifications
You must be signed in to change notification settings - Fork 26
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
Better stack trace #599
Better stack trace #599
Conversation
d37c377
to
9e45477
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a big one 👏
Just to be sure, you use SAM for Single Abstract Method ?
...ckler/src/main/scala/ch/epfl/scala/debugadapter/internal/javareflect/JavaReflectLoader.scala
Show resolved
Hide resolved
modules/unpickler/src/main/scala/ch/epfl/scala/debugadapter/internal/jdi/JdiMethod.scala
Outdated
Show resolved
Hide resolved
modules/unpickler/src/main/scala/ch/epfl/scala/debugadapter/internal/jdi/JdiReferenceType.scala
Show resolved
Hide resolved
...s/unpickler/src/main/scala/ch/epfl/scala/debugadapter/internal/stacktrace/BinarySymbol.scala
Outdated
Show resolved
Hide resolved
modules/unpickler/src/main/scala/ch/epfl/scala/debugadapter/internal/binary/Symbol.scala
Outdated
Show resolved
Hide resolved
...npickler/src/main/scala/ch/epfl/scala/debugadapter/internal/stacktrace/Scala3Unpickler.scala
Outdated
Show resolved
Hide resolved
...npickler/src/main/scala/ch/epfl/scala/debugadapter/internal/stacktrace/Scala3Unpickler.scala
Outdated
Show resolved
Hide resolved
...npickler/src/main/scala/ch/epfl/scala/debugadapter/internal/stacktrace/Scala3Unpickler.scala
Outdated
Show resolved
Hide resolved
...npickler/src/main/scala/ch/epfl/scala/debugadapter/internal/stacktrace/Scala3Unpickler.scala
Outdated
Show resolved
Hide resolved
...npickler/src/main/scala/ch/epfl/scala/debugadapter/internal/stacktrace/Scala3Unpickler.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting better! Was it able to find some of the "not found" methods ?
I wonder if it's possible to group all the case classes by "kind" or by a property (maybe with several traits?) to reduce the number of case
. There seems to be some patterns but can't tell if it's just a particular case or not
modules/unpickler/src/main/scala/ch/epfl/scala/debugadapter/internal/binary/Method.scala
Show resolved
Hide resolved
...npickler/src/main/scala/ch/epfl/scala/debugadapter/internal/stacktrace/Scala3Unpickler.scala
Outdated
Show resolved
Hide resolved
modules/unpickler/src/main/scala/ch/epfl/scala/debugadapter/internal/binary/Symbol.scala
Outdated
Show resolved
Hide resolved
...ickler/src/main/scala/ch/epfl/scala/debugadapter/internal/javareflect/JavaReflectClass.scala
Outdated
Show resolved
Hide resolved
modules/unpickler/src/main/scala/ch/epfl/scala/debugadapter/internal/jdi/JdiReferenceType.scala
Outdated
Show resolved
Hide resolved
method match | ||
case ByNameArgProxy() => None | ||
case DefaultArg(_) => None | ||
case _ => method.extractFromDecodedNames("(.+)\\$\\d+".r)(_(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use triple quotes, so you don't need to put this much \ 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
...npickler/src/main/scala/ch/epfl/scala/debugadapter/internal/stacktrace/Scala3Unpickler.scala
Outdated
Show resolved
Hide resolved
...npickler/src/main/scala/ch/epfl/scala/debugadapter/internal/stacktrace/Scala3Unpickler.scala
Outdated
Show resolved
Hide resolved
...npickler/src/main/scala/ch/epfl/scala/debugadapter/internal/stacktrace/Scala3Formatter.scala
Outdated
Show resolved
Hide resolved
case BinaryMethod(_, sym) => formatName(sym) | ||
case BinaryLocalLazyInit(_, sym) => formatName(sym).dot("<lazy init>") | ||
case BinaryLazyInit(_, sym) => formatName(sym).dot("<lazy init>") | ||
case BinaryTraitParamAccessor(_, sym) => formatName(sym) | ||
case BinaryMixinForwarder(_, target) => formatName(target).dot("<mixin forwarder>") | ||
case BinaryTraitStaticForwarder(target) => formatName(target).dot("<static forwarder>") | ||
case _: BinaryOuter => "<outer>" | ||
case BinarySuperArg(_, init, _) => formatName(init).dot("<super arg>") | ||
case BinaryLiftedTry(_, _) => "<try>" | ||
case _: BinaryByNameArg => "<by-name arg>" | ||
case BinaryMethodBridge(target, _) => formatName(target).dot("<bridge>") | ||
case BinaryAnonOverride(_, overridden, _) => formatName(overridden) | ||
case BinaryStaticForwarder(_, target, _) => formatName(target).dot("<static forwarder>") | ||
case _: BinaryDeserializeLambda => "$deserializeLambda$" | ||
case BinarySetter(_, sym, _) => if sym.isMethod then formatName(sym) else formatName(sym) + "_=" | ||
case BinarySuperAccessor(_, sym, _) => formatName(sym).dot("<super>") | ||
case BinarySpecializedMethod(_, sym) => formatName(sym).dot("<specialized>") | ||
case BinaryInlineAccessor(_, target) => s"<inline ${formatOwner(target).dot(formatName(target))}>" | ||
case BinaryAdaptedFun(target) => formatName(target).dot("<adapted>") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about having a field stackTraceInfo = "<adapted" | "<lazy init>" |...
in BinaryMethodSymbol
Maybe with some trait LocalMethodSymbol
and XXXMethodSymbol
you could do something like
case m: LocalMethodSymbol => formatQualifiedName(m) // <=> formatQualifiedName(TermSymbol, String)
case m: XXXMethodSymbol => formatQualifiedName(m) // <=> formatQualifiedName(BinaryClassSymbol, TermSymbol, String)
case m: // other special cases such as BinaryOuter
4971473
to
8a3ab78
Compare
ed4be7a
to
078f0c3
Compare
b259168
to
0991ca3
Compare
ec0fd47
to
1e76685
Compare
1e76685
to
627ccc7
Compare
No description provided.