-
-
Notifications
You must be signed in to change notification settings - Fork 389
Wingman: Fix TODO(sandy) when performing subsequent actions #2580
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
, fc_range :: Maybe (Tracked 'Current Range) | ||
-- ^ For code actions, this is 'Just'. For code lenses, you'll get | ||
-- a 'Nothing' in the request, and a 'Just' in the response. | ||
} | ||
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.
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
Uri
internally 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.