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
135
135
-> FileDiagnostic
136
136
-> HandlerM Config (Maybe ChangeSignature )
137
137
diagnosticToChangeSig recorder decls diagnostic = runMaybeT $ do
138
+ -- Extract expected, actual, and extra error info
138
139
(expectedType, actualType, errInfo) <- hoistMaybe $ do
139
140
msg <- diagnostic ^. fdStructuredMessageL ^? _SomeStructuredMessage
140
141
tcRnMsg <- msg ^. msgEnvelopeErrorL ^? _TcRnMessage
@@ -146,15 +147,17 @@ diagnosticToChangeSig recorder decls diagnostic = runMaybeT $ do
146
147
147
148
pure (showType expectedType, showType actualType, errInfo)
148
149
149
- logWith recorder Development.IDE. Warning (LogErrInfoCtxt errInfo)
150
+ logWith recorder Debug (LogErrInfoCtxt errInfo)
150
151
152
+ -- Extract the declName from the extra error text
151
153
declName <- hoistMaybe (matchingDiagnostic errInfo)
152
154
155
+ -- Look up location of declName. If it fails, log it
153
156
declSrcSpan <-
154
157
case findSigLocOfStringDecl decls expectedType (T. unpack declName) of
155
158
Just x -> pure x
156
159
Nothing -> do
157
- logWith recorder Development.IDE. Warning (LogFindSigLocFailure declName)
160
+ logWith recorder Debug (LogFindSigLocFailure declName)
158
161
hoistMaybe Nothing
159
162
160
163
pure ChangeSignature {.. }
You can’t perform that action at this time.
0 commit comments