-
-
Notifications
You must be signed in to change notification settings - Fork 412
Wingman: Fix TODO(sandy) when performing subsequent actions #2580
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
Conversation
| deriving stock (Eq, Ord, Show, Generic) | ||
| deriving anyclass (A.ToJSON, A.FromJSON) | ||
|
|
||
| deriving anyclass instance A.ToJSON NormalizedFilePath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is pretty obvious when you look at these :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there should be an instance TypeError "Do not do this" => ToJSON NormalizedFilePath definition in the lsp package where NormalizedFilePath is defined, to prevent this weird bug from happening again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to add that - what goes wrong with it OOI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember anymore. Presumably the derived instances are not roundtripping, i.e. fromJSON . receiveLSP . sendLSP . toJSON /= id, because of the embedded hashes.
jneira
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks both for the fix
This PR fixes #2448, by using
Uriinternally instead ofNormalizedFilePath. It's not clear why it fixes it, since all the functions involved are pure, but who knows. Huge shoutouts to @pepeiborra for tracking down the issue in the first place.