File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
plugins/hls-change-type-signature-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ diagnosticToChangeSig
135135 -> FileDiagnostic
136136 -> HandlerM Config (Maybe ChangeSignature )
137137diagnosticToChangeSig recorder decls diagnostic = runMaybeT $ do
138+ -- Extract expected, actual, and extra error info
138139 (expectedType, actualType, errInfo) <- hoistMaybe $ do
139140 msg <- diagnostic ^. fdStructuredMessageL ^? _SomeStructuredMessage
140141 tcRnMsg <- msg ^. msgEnvelopeErrorL ^? _TcRnMessage
@@ -146,15 +147,17 @@ diagnosticToChangeSig recorder decls diagnostic = runMaybeT $ do
146147
147148 pure (showType expectedType, showType actualType, errInfo)
148149
149- logWith recorder Development.IDE. Warning (LogErrInfoCtxt errInfo)
150+ logWith recorder Debug (LogErrInfoCtxt errInfo)
150151
152+ -- Extract the declName from the extra error text
151153 declName <- hoistMaybe (matchingDiagnostic errInfo)
152154
155+ -- Look up location of declName. If it fails, log it
153156 declSrcSpan <-
154157 case findSigLocOfStringDecl decls expectedType (T. unpack declName) of
155158 Just x -> pure x
156159 Nothing -> do
157- logWith recorder Development.IDE. Warning (LogFindSigLocFailure declName)
160+ logWith recorder Debug (LogFindSigLocFailure declName)
158161 hoistMaybe Nothing
159162
160163 pure ChangeSignature {.. }
You can’t perform that action at this time.
0 commit comments