Skip to content
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

Fix line numbers once and for all #47

Merged
merged 10 commits into from
Sep 5, 2024
Merged

Fix line numbers once and for all #47

merged 10 commits into from
Sep 5, 2024

Conversation

knocte
Copy link
Member

@knocte knocte commented Sep 5, 2024

No description provided.

Previous fixes for line numbers were introducing empty
commented lines. This refactoring allows the lines to
actually have the real content they were carrying, but
commented out.
There were still some issues with line numbers when reporting
errors so I discovered that in some cases we were swallowing
some lines instead of generating LineKind.Normal or .Commented
for them.
To be reverted temporarily, this commit just prints
the F# autogenerated sources for debugging purposes.
This reverts commit a8662ee
because it was actually duplicating the line (these actions
were already being printed as a comment).
The last issue with bad line numbers reported is our
need to inject this fsi stub. Let's at least make it
as small as possible.
The bin folder could be extracted anyway from the .Directory
property of the returned FileInfo instance.
Tiny DRY-respect improvement.
This way we will not add 3 extra lines to the beginning
of the file, which would make line numbers to be off in
case of errors.
This reverts commit 0c2150c
because we don't need the debug output anymore.
@knocte knocte merged commit 6158a3a into master Sep 5, 2024
30 checks passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant