-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve old
FSIExtraParameters
; pick reasonable options
Bring the old `FSIExtraParameters` option back to not break existing clients. Implement logic to mimic old behavior if the old option is used, warning if the old option is mixed with either of the new. Introduce a new private helper method `AdaptiveFSharpLspServer.oldOrNewExtraParams` for use in RPC calls that parse config options: `Initialize` and `DidChangeConfiguration`. This helper ensures that any clients using the old parameter get the expected behavior from before this PR. Both RPC methods will send a warning to the client if they mix parameters. In the future, we can update warnings to support deprecation in that helper function. The signature of the helper is not the best, and to work with the CEs where the RPC happens, we need to have our message sent at the top level of the CE, so we can use `do!`. This means that we read the Dto, then break our pipeline so we can consume the message, then have a second pipeline that consumes the fixed up Dto. Given that this is in support of a to-be-deprecated option, and that upon deprecation we can remove the helper, it seems okay to have this ugliness.
- Loading branch information
Showing
5 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters