Skip to content

Delete library ghcide test utils #4274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions ghcide/ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -265,21 +265,3 @@ executable ghcide

if !flag(executable)
buildable: False

library ghcide-test-utils
import: warnings
visibility: public
default-language: GHC2021

hs-source-dirs: test/cabal
exposed-modules:
Development.IDE.Test.Runfiles

build-depends:
base > 4.9 && < 5

default-extensions:
LambdaCase
OverloadedStrings
RecordWildCards
ViewPatterns
25 changes: 13 additions & 12 deletions ghcide/test/exe/NonLspCommandLine.hs
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@

module NonLspCommandLine (tests) where

import Control.Monad ((>=>))
import Data.Foldable (for_)
import Development.IDE.Test.Runfiles
import Development.Shake (getDirectoryFilesIO)
import System.Directory (copyFile,
createDirectoryIfMissing)
import System.Directory.Extra (canonicalizePath)
import System.Environment.Blank (setEnv)
import System.Exit (ExitCode (ExitSuccess))
import System.FilePath (takeDirectory, (</>))
import Control.Monad ((>=>))
import Data.Foldable (for_)
import Development.Shake (getDirectoryFilesIO)
import System.Directory (copyFile, createDirectoryIfMissing)
import System.Directory.Extra (canonicalizePath)
import System.Environment.Blank (setEnv)
import System.Exit (ExitCode (ExitSuccess))
import System.FilePath (takeDirectory, (</>))
import qualified System.IO.Extra
import System.Process.Extra (CreateProcess (cwd), proc,
readCreateProcessWithExitCode)
import System.Process.Extra (CreateProcess (cwd), proc,
readCreateProcessWithExitCode)
import Test.Tasty
import Test.Tasty.HUnit

Expand All @@ -33,6 +31,9 @@ tests = testGroup "ghcide command line"
ec @?= ExitSuccess
]

locateGhcideExecutable :: IO FilePath
locateGhcideExecutable = pure "ghcide"

-- | Version of 'System.IO.Extra.withTempDir' that canonicalizes the path
-- Which we need to do on macOS since the $TMPDIR can be in @/private/var@ or
-- @/var@
Expand Down
3 changes: 1 addition & 2 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2109,7 +2109,6 @@ test-suite ghcide-tests
, filepath
, fuzzy
, ghcide
, ghcide:ghcide-test-utils
, hls-plugin-api
, lens
, list-t
Expand Down Expand Up @@ -2237,7 +2236,7 @@ library ghcide-bench-lib
directory,
extra,
filepath,
ghcide:{ghcide, ghcide-test-utils},
ghcide:{ghcide},
hashable,
lens,
lsp-test,
Expand Down
Loading