Skip to content

Commit 688c575

Browse files
fridewaldfendor
authored andcommitted
add better warning text
1 parent 4dcb7ba commit 688c575

File tree

1 file changed

+2
-1
lines changed
  • plugins/hls-cabal-plugin/src/Ide/Plugin

1 file changed

+2
-1
lines changed

plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,13 @@ cabalRules recorder plId = do
252252
-- We don't support the cabal version, this should not be an error, as the
253253
-- user did not do anything wrong. Instead we cast it to a warning
254254
regex = "Unsupported cabal-version [0-9]+.[0-9]*"
255+
unsupportedCabalHelpText = "\nThe used cabal version is not fully supported by hls. This means that some functionallity might not work as expected.\nIf you face any issues try to downgrade to a supported cabal version."
255256
errorDiags =
256257
NE.toList $
257258
NE.map
258259
( \pe@(PError pos text) ->
259260
if text =~ regex
260-
then Diagnostics.warningDiagnostic file (Syntax.PWarning Syntax.PWTOther pos text)
261+
then Diagnostics.warningDiagnostic file (Syntax.PWarning Syntax.PWTOther pos (text <> unsupportedCabalHelpText))
261262
else Diagnostics.errorDiagnostic file pe
262263
)
263264
pErrorNE

0 commit comments

Comments
 (0)