Closed anatoliykmetyuk closed 1 year ago
https://github.com/lampepfl/dotty/pull/15684/files#diff-dedc82431ec1fb02535bbab3742b2313abf87721d05295a14e29a93950853be1R251 – this is where an assumption gets broken.
Trees store information about their positions and source file location. JSR-45 changes this information as early as in the Inliner phase. It turns out, some downstream phases rely on this information – e.g. the Constructors phase. If the source file is changed, certain asserts may no longer work, since they may check for consistency in source file locations.
This project has been implemented by Théo Abel (@Tetchki). You can find the corresponding PR at lampepfl/dotty#17055. Théo managed to fix all the regressions introduced by the previous work and to clean up the implementation. Before we can merge his contribution we still need to:
We may post another student project description for those remaining tasks.
Debugging inlined calls in Scala 3 is tricky since they may come from a different file, and the information stored in the class files is insufficient to locate that other file. JSR-45 is a class file extension format used by other JVM-based languages to solve this problem. This project aims to add information necessary to debug inlined calls in Scala using JSR-45.
Some work was already done around project: #15684.
The work is incomplete though: in most cases, it works, but it breaks certain assumptions inside the compiler which makes it fail in corner cases. Those cases need to be investigated, and the solution proposed in that PR needs to be modified to take them into account.
As part of this project, you will:
The project will be interesting to anyone looking to get familiar with the Scala 3 compiler.