scala-dev icon indicating copy to clipboard operation
scala-dev copied to clipboard

Improve line number information

Open retronym opened this issue 10 years ago • 11 comments
trafficstars

Ensure that standard line number information is kept when inlining from the same file, eliminated otherwise. Write tests.

Next step: add support for JSR-45 debugging info, which allows

  • line numbers of multiple source files within one classfile
  • full (project-relative?) path of source file, not only the file name, should help debuggers in when not using Java's package/directory convention for sources

retronym avatar Aug 05 '15 04:08 retronym

also https://issues.scala-lang.org/browse/SI-7518

lrytz avatar May 17 '16 21:05 lrytz

Would this be appropriate for a scala center proposal?

fommil avatar Mar 07 '17 15:03 fommil

btw, we already (in ensime) handle the source file lookup issue in ensime using our indexer.

Does this JSR-45 support include information such as expanding line numbers to source ranges? The problem faced when writing a debugger is that we only get line number info, but we want to highlight the block of code (rangepos) that is being evaluated.

Of course, stacktrace demangling is another issue...

fommil avatar Mar 07 '17 15:03 fommil

Relatedly https://issues.scala-lang.org/browse/SI-8526 for macro API.

som-snytt avatar Mar 12 '17 08:03 som-snytt

This has gone a bit cold, could somebody please help me with technical input to write a proposal?

fommil avatar Mar 12 '17 08:03 fommil

GSoC needs a mentor, which would be hard for this. We also have a debugging proposal already :-)

Scala Center is ideal for this if Lightbend's customers aren't prepared to directly fund it, because it really needs somebody working closely with EPFL or core scala team.

fommil avatar Mar 12 '17 08:03 fommil

I've put together a draft SC proposal here if anybody has any comments: https://gist.github.com/fommil/1867119e7f184d36342bd5e4b34c7bfe

fommil avatar Mar 22 '17 16:03 fommil

Scala Center proposals in this area:

  • SCP-011 was accepted in 2017, but never really happened
  • SCP-022 proposes resuming work on it (and targeting Scala 3 as well)

SethTisue avatar Dec 16 '19 17:12 SethTisue

further on SCP-022: https://contributors.scala-lang.org/t/improving-the-scala-debugging-experience/4264

cc @errikos, who might not know about this ticket

SethTisue avatar Jul 01 '20 19:07 SethTisue

@errikos does your work on JSR 45 (https://github.com/scala/scala/pull/9121) cover this as well, do you think?

dwijnand avatar Oct 22 '20 15:10 dwijnand

Hello. Sorry for the late reply.

Yes, it covers both bullets. For the second one, we store the fully qualified class name, so not project relative path exactly.

errikos avatar Nov 16 '20 15:11 errikos