Skip to content

Commit

Permalink
Remove EventFileValidation
Browse files Browse the repository at this point in the history
We never actually emit this event so it’s pretty much useless. If we
do want to add progress reporting at some point, we should go with the
recently added official support for that in LSP
microsoft/language-server-protocol#70 (comment).
  • Loading branch information
cocreature committed Jun 11, 2019
1 parent 319e042 commit 9393143
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
3 changes: 0 additions & 3 deletions compiler/haskell-ide-core/src/Development/IDE/Types/LSP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,4 @@ data Event
-- resource @resource@ changed to @contents
-- NOTE(JM,MH): Keep the contents lazy as we rely on it in
-- 'manageOpenVRs'.
| EventFileValidation Int Int
-- ^ @EventFileValidation finishedValidations totalValidations @
-- How many validations have we finished of how many total.
deriving Show
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,6 @@ data VirtualResourceChangedParams = VirtualResourceChangedParams
deriveDAToJSON "_vrcp" ''VirtualResourceChangedParams
deriveDAFromJSON "_vrcp" ''VirtualResourceChangedParams

-- | Information regarding validations done for a DAML workspace.
workspaceValidationsNotification :: T.Text
workspaceValidationsNotification = "daml/workspace/validations"

-- | Parameters to update the client about the number of files that have been updated.
data WorkspaceValidationsParams = WorkspaceValidationsParams
{ _wvpFinishedValidations :: !Int
-- ^ Tracks the number of validations we have already finished.
, _wvpTotalValidations :: !Int
-- ^ Tracks the number of total validation steps we need to perform.
}

deriveDAToJSON "_wvp" ''WorkspaceValidationsParams

------------------------------------------------------------------------
-- Request handlers
------------------------------------------------------------------------
Expand Down Expand Up @@ -288,9 +274,3 @@ eventSlinger eventChan notifChan =
$ CustomNotification virtualResourceChangedNotification
$ Aeson.toJSON
$ VirtualResourceChangedParams (Compiler.virtualResourceToUri vr) content

Compiler.EventFileValidation finishedValidations totalValidations -> do
writeTChan notifChan
$ CustomNotification workspaceValidationsNotification
$ Aeson.toJSON
$ WorkspaceValidationsParams finishedValidations totalValidations

0 comments on commit 9393143

Please sign in to comment.