File tree 3 files changed +15
-6
lines changed
cabal-testsuite/src/Test/Cabal 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1
1
{-# LANGUAGE CPP #-}
2
2
module Distribution.Compat.Process (
3
3
-- * Redefined functions
4
- createProcess ,
5
4
proc ,
6
- runInteractiveProcess ,
7
- rawSystem ,
8
5
-- * Additions
9
6
enableProcessJobs ,
7
+ -- * Deprecated
8
+ createProcess ,
9
+ runInteractiveProcess ,
10
+ rawSystem ,
10
11
) where
11
12
12
13
import System.Exit (ExitCode (.. ))
@@ -68,19 +69,22 @@ proc path args = enableProcessJobs (Process.proc path args) { Process.delegate_c
68
69
69
70
-- | 'System.Process.createProcess' with process jobs enabled when appropriate.
70
71
-- See 'enableProcessJobs'.
72
+ {-# DEPRECATED createProcess "use proc with System.Process.createProcess instead" #-}
71
73
createProcess :: CreateProcess
72
74
-> IO (Maybe Handle , Maybe Handle , Maybe Handle , ProcessHandle )
73
75
createProcess = Process. createProcess . enableProcessJobs
74
76
75
77
-- | 'System.Process.rawSystem' with process jobs enabled when appropriate.
76
78
-- See 'enableProcessJobs'.
79
+ {-# DEPRECATED rawSystem "use one of the functions exported by Distribution.Simple.Utils instead" #-}
77
80
rawSystem :: FilePath -> [String ] -> IO ExitCode
78
81
rawSystem path args = do
79
82
(_,_,_,p) <- Process. createProcess (proc path args)
80
83
Process. waitForProcess p
81
84
82
85
-- | 'System.Process.runInteractiveProcess' with process jobs enabled when
83
86
-- appropriate. See 'enableProcessJobs'.
87
+ {-# DEPRECATED runInteractiveProcess "use one of the functions exported by Distribution.Simple.Utils instead" #-}
84
88
runInteractiveProcess
85
89
:: FilePath -- ^ Filename of the executable (see 'RawCommand' for details)
86
90
-> [String ] -- ^ Arguments to pass to the executable
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ module Distribution.Simple.Utils (
38
38
debug , debugNoWrap ,
39
39
chattyTry ,
40
40
annotateIO ,
41
- printRawCommandAndArgs , printRawCommandAndArgsAndEnv ,
41
+ logCommand ,
42
42
withOutputMarker ,
43
43
44
44
-- * exceptions
@@ -55,7 +55,6 @@ module Distribution.Simple.Utils (
55
55
rawSystemStdInOut ,
56
56
rawSystemIOWithEnv ,
57
57
rawSystemIOWithEnvAndAction ,
58
- createProcessWithEnv ,
59
58
fromCreatePipe ,
60
59
maybeExit ,
61
60
xargs ,
@@ -175,6 +174,10 @@ module Distribution.Simple.Utils (
175
174
-- * FilePath stuff
176
175
isAbsoluteOnAnyPlatform ,
177
176
isRelativeOnAnyPlatform ,
177
+
178
+ -- * Deprecated
179
+ printRawCommandAndArgs , printRawCommandAndArgsAndEnv ,
180
+ createProcessWithEnv ,
178
181
) where
179
182
180
183
import Prelude ()
@@ -735,10 +738,12 @@ maybeExit cmd = do
735
738
exitcode <- cmd
736
739
unless (exitcode == ExitSuccess ) $ exitWith exitcode
737
740
741
+ {-# DEPRECATED printRawCommandAndArgs "use logCommand" #-}
738
742
printRawCommandAndArgs :: Verbosity -> FilePath -> [String ] -> IO ()
739
743
printRawCommandAndArgs verbosity path args = withFrozenCallStack $ do
740
744
logCommand verbosity (proc path args)
741
745
746
+ {-# DEPRECATED printRawCommandAndArgsAndEnv "use logCommand" #-}
742
747
printRawCommandAndArgsAndEnv :: Verbosity
743
748
-> FilePath
744
749
-> [String ]
@@ -888,6 +893,7 @@ rawSystemIOWithEnvAndAction verbosity path args mcwd menv action inp out err = w
888
893
mbToStd :: Maybe Handle -> Process. StdStream
889
894
mbToStd = maybe Process. Inherit Process. UseHandle
890
895
896
+ {-# DEPRECATED createProcessWithEnv "use System.Process.createProcess with Distribution.Compat.Process.proc instead" #-}
891
897
createProcessWithEnv ::
892
898
Verbosity
893
899
-> FilePath
Original file line number Diff line number Diff line change @@ -226,7 +226,6 @@ startServer chan senv = do
226
226
std_out = CreatePipe ,
227
227
std_err = CreatePipe
228
228
}
229
- -- printRawCommandAndArgsAndEnv (runnerVerbosity senv) (programPath prog) ghc_args Nothing
230
229
when (verbosity >= verbose) $
231
230
writeChan chan (ServerLogMsg AllServers (showCommandForUser (programPath prog) ghc_args))
232
231
(Just hin, Just hout, Just herr, proch) <- createProcess proc_spec
You can’t perform that action at this time.
0 commit comments