Closed
Description
When we have a position on a tree the was loaded from TASTy we have no way to compute line numbers and columns as we only have the offset but no source file.
We have identified the following scenarios where we require the line numbers from TASTy files:
- Error reporting on code inlined from a library for which we do not have the sources (see Error reporting for inlined code now depends on source code of library #6538 and Fix #6371: Make error message rendering resilient to missing sources #6412)
- Recompiling from TASTy without sources available. The line numbers are required for the bytecode stack trace information.
So far the most robust solutions that we have are:
- Keep the line sizes in the TASTy file. Has a small memory footprint.
- Keep the actual source in the TASTy file. This would have a large footprint but would also give the possibility of printing better errors for inlined positions.
Which solution should be implemented?