-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Line numbers from TASTy #6542
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
Comments
I vote for this, but I think we should make the source an optional section of the tasty such that we can still produce some output without crashing if it's stripped for some reason (e.g., proprietary code). |
As discussed in the meeting, we take the first approach:
|
Storing ranges or even source files would require big refactoring of the TASTY infrastructure, as now TASTY chunks are associated with top-level classes. There is no infrastructure to uniquely identify source files and share data (content/line ranges). The simplest thing to do seems to convert the representation of Span to Any ideas @nicolasstucki @smarter ? |
I had a branch where I added an extra section with the sizes of the lines of the source file. This was not too difficult. |
In your branch, do you share the line ranges for the same source file across library boundaries? |
The lines of the same source. We need to avoid duplication. |
Scala3doc is affected since we've got infrastructure ready to link to line in source file however we are getting |
Fix #6542: Pickle line sizes in TASTy
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:
So far the most robust solutions that we have are:
Which solution should be implemented?
The text was updated successfully, but these errors were encountered: