Skip to content

Commit

Permalink
Fix loss of 9.2 GHC version
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpj committed Jun 20, 2024
1 parent 512fa5c commit e217112
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 1,200 deletions.
1 change: 0 additions & 1 deletion ghcide/test/exe/CompletionTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ nonLocalCompletionTests =
where
brokenForWinGhc = knownBrokenOnWindows "Windows has strange things in scope for some reason"
brokenForWinOldGhc =
knownBrokenInSpecificEnv [HostOS Windows, GhcVer GHC92] "Windows (GHC == 9.2) has strange things in scope for some reason"
. knownBrokenInSpecificEnv [HostOS Windows, GhcVer GHC94] "Windows (GHC == 9.4) has strange things in scope for some reason"
. knownBrokenInSpecificEnv [HostOS Windows, GhcVer GHC96] "Windows (GHC == 9.6) has strange things in scope for some reason"
. knownBrokenInSpecificEnv [HostOS Windows, GhcVer GHC98] "Windows (GHC == 9.8) has strange things in scope for some reason"
Expand Down
6 changes: 2 additions & 4 deletions ghcide/test/exe/CradleTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ tests = testGroup "cradle"
,testGroup "ignore-fatal" [ignoreFatalWarning]
,testGroup "loading" [loadCradleOnlyonce, retryFailedCradle]
,testGroup "multi" (multiTests "multi")
,ignoreForGhcVersions [GHC92] "multiple units not supported on 9.2"
$ testGroup "multi-unit" (multiTests "multi-unit")
,testGroup "multi-unit" (multiTests "multi-unit")
,testGroup "sub-directory" [simpleSubDirectoryTest]
,ignoreForGhcVersions [GHC92] "multiple units not supported on 9.2"
$ testGroup "multi-unit-rexport" [multiRexportTest]
,testGroup "multi-unit-rexport" [multiRexportTest]
]

loadCradleOnlyonce :: TestTree
Expand Down
2 changes: 0 additions & 2 deletions hie-compat/hie-compat.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ library
Compat.HieDebug
Compat.HieUtils

if (impl(ghc >= 9.2) && impl(ghc < 9.3))
hs-source-dirs: src-ghc92 src-reexport-ghc9
if (impl(ghc >= 9.4))
hs-source-dirs: src-reexport-ghc92
2 changes: 1 addition & 1 deletion plugins/hls-change-type-signature-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test :: TestTree
test = testGroup "changeTypeSignature" [
testRegexes
, codeActionTest "TExpectedActual" 4 11
, knownBrokenForGhcVersions [GHC92 .. GHC910] "Error Message in 9.2+ does not provide enough info" $
, knownBrokenForGhcVersions [GHC94 .. GHC910] "Error Message in 9.2+ does not provide enough info" $
codeActionTest "TRigidType" 4 14
, codeActionTest "TRigidType2" 4 6
, codeActionTest "TLocalBinding" 7 22
Expand Down
1 change: 0 additions & 1 deletion plugins/hls-eval-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ tests =
GHC98 -> "ghc98.expected"
GHC96 -> "ghc96.expected"
GHC94 -> "ghc94.expected"
GHC92 -> "ghc92.expected"
, goldenWithEval "Prelude has no special treatment, it is imported as stated in the module" "TPrelude" "hs"
, goldenWithEval "Don't panic on {-# UNPACK #-} pragma" "TUNPACK" "hs"
, goldenWithEval "Can handle eval inside nested comment properly" "TNested" "hs"
Expand Down

This file was deleted.

10 changes: 3 additions & 7 deletions plugins/hls-refactor-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1347,8 +1347,7 @@ extendImportTests = testGroup "extend import actions"
, "b :: A"
, "b = ConstructorFoo"
])
, brokenForGHC92 "On GHC 9.2, the error doesn't contain \"perhaps you want ...\" part from which import suggestion can be extracted." $
testSession "extend single line import in presence of extra parens" $ template
, testSession "extend single line import in presence of extra parens" $ template
[]
("Main.hs", T.unlines
[ "import Data.Monoid (First)"
Expand Down Expand Up @@ -1534,7 +1533,7 @@ extendImportTests = testGroup "extend import actions"
, "import A (pattern Some)"
, "k (Some x) = x"
])
, ignoreForGhcVersions [GHC92, GHC94] "Diagnostic message has no suggestions" $
, ignoreForGhcVersions [GHC94] "Diagnostic message has no suggestions" $
testSession "type constructor name same as data constructor name" $ template
[("ModuleA.hs", T.unlines
[ "module ModuleA where"
Expand Down Expand Up @@ -3222,7 +3221,7 @@ exportUnusedTests = testGroup "export unused actions"
]
(R 2 0 2 11)
"Export ‘bar’"
, ignoreForGhcVersions [GHC92, GHC94] "Diagnostic message has no suggestions" $
, ignoreForGhcVersions [GHC94] "Diagnostic message has no suggestions" $
testSession "type is exported but not the constructor of same name" $ templateNoAction
[ "{-# OPTIONS_GHC -Wunused-top-binds #-}"
, "module A (Foo) where"
Expand Down Expand Up @@ -3850,6 +3849,3 @@ withTempDir f = System.IO.Extra.withTempDir $ \dir ->

brokenForGHC94 :: String -> TestTree -> TestTree
brokenForGHC94 = knownBrokenForGhcVersions [GHC94]

brokenForGHC92 :: String -> TestTree -> TestTree
brokenForGHC92 = knownBrokenForGhcVersions [GHC92]
9 changes: 3 additions & 6 deletions plugins/hls-rename-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ tests = testGroup "Rename"
rename doc (Position 0 15) "Op"
, goldenWithRename "Exported function" "ExportedFunction" $ \doc ->
rename doc (Position 2 1) "quux"
, ignoreForGhcVersions [GHC92] recordConstructorIssue $
goldenWithRename "Field Puns" "FieldPuns" $ \doc ->
, goldenWithRename "Field Puns" "FieldPuns" $ \doc ->
rename doc (Position 7 13) "bleh"
, goldenWithRename "Function argument" "FunctionArgument" $ \doc ->
rename doc (Position 3 4) "y"
Expand All @@ -45,8 +44,7 @@ tests = testGroup "Rename"
rename doc (Position 3 8) "baz"
, goldenWithRename "Import hiding" "ImportHiding" $ \doc ->
rename doc (Position 0 22) "hiddenFoo"
, ignoreForGhcVersions [GHC92] recordConstructorIssue $
goldenWithRename "Indirect Puns" "IndirectPuns" $ \doc ->
, goldenWithRename "Indirect Puns" "IndirectPuns" $ \doc ->
rename doc (Position 4 23) "blah"
, goldenWithRename "Let expression" "LetExpression" $ \doc ->
rename doc (Position 5 11) "foobar"
Expand All @@ -58,8 +56,7 @@ tests = testGroup "Rename"
rename doc (Position 3 12) "baz"
, goldenWithRename "Realigns do block indentation" "RealignDo" $ \doc ->
rename doc (Position 0 2) "fooBarQuux"
, ignoreForGhcVersions [GHC92] recordConstructorIssue $
goldenWithRename "Record field" "RecordField" $ \doc ->
, goldenWithRename "Record field" "RecordField" $ \doc ->
rename doc (Position 6 9) "number"
, goldenWithRename "Shadowed name" "ShadowedName" $ \doc ->
rename doc (Position 1 1) "baz"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,8 @@ semanticTokensTests =
goldenWithSemanticTokensWithDefaultConfig "type family" "TTypefamily",
goldenWithSemanticTokensWithDefaultConfig "TUnicodeSyntax" "TUnicodeSyntax",
goldenWithSemanticTokensWithDefaultConfig "TQualifiedName" "TQualifiedName"
goldenWithSemanticTokensWithDefaultConfig "TDoc" "TDoc"
]
-- not supported in ghc92
++ [goldenWithSemanticTokensWithDefaultConfig "TDoc" "TDoc" | ghcVersion > GHC92]

semanticTokensDataTypeTests :: TestTree
semanticTokensDataTypeTests =
Expand Down
2 changes: 1 addition & 1 deletion test/functional/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ main :: IO ()
main = defaultTestRunner $ testGroup "haskell-language-server"
[ Config.tests
, ConfigSchema.tests
, ignoreInEnv [HostOS Windows, GhcVer GHC92] "Tests gets stuck in ci" $ Format.tests
, ignoreInEnv [HostOS Windows] "Tests gets stuck in ci" $ Format.tests
, FunctionalBadProject.tests
, HieBios.tests
, ignoreInEnv [HostOS Windows] "Tests gets stuck in ci" $ Progress.tests
Expand Down
153 changes: 0 additions & 153 deletions test/testdata/schema/ghc92/default-config.golden.json

This file was deleted.

Loading

0 comments on commit e217112

Please sign in to comment.