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

Position refactor #364

Merged
merged 11 commits into from
Sep 14, 2023
Merged

Position refactor #364

merged 11 commits into from
Sep 14, 2023

Conversation

scohen
Copy link
Collaborator

@scohen scohen commented Sep 12, 2023

@zachallaun and I realized that if you track the line that a position occurs on, you no longer need the document to do conversions. Watch this space.

scohen and others added 10 commits September 13, 2023 09:26
This will help with conversions
In order to get tests passing, I wrote an assert_normalized macro that
normalizes both sides of an assertion before calling assert. This
prevents spurious failures when using PositionSupport and comparing
different positions' line and valid? fields, since building these via
PositionSupport won't set those fields properly
@scohen scohen marked this pull request as ready for review September 13, 2023 16:43
Copy link
Collaborator

@zachallaun zachallaun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty confident in this. As you mentioned, there may be more we can do by looking further into errors.ex, but I think these changes are a good start and we're going to be building on them imminently, so there will be more opportunity to surface any weird behavior.

@scohen
Copy link
Collaborator Author

scohen commented Sep 14, 2023

agreed, @zachallaun. I built this branch and have been using it as my main LSP for a couple days. No issues so far.

@scohen scohen merged commit 506c3f0 into main Sep 14, 2023
@scohen scohen deleted the position-refactor branch September 14, 2023 15:02
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.

3 participants