@@ -30,8 +30,6 @@ import Distribution.Client.CmdErrorMessages
30
30
import Distribution.Client.TargetProblem
31
31
( TargetProblem (.. ) )
32
32
33
- import Distribution.Client.CmdRun.ClientRunFlags
34
-
35
33
import Distribution.Client.NixStyleOptions
36
34
( NixStyleFlags (.. ), nixStyleOptions , defaultNixStyleFlags )
37
35
import Distribution.Client.Setup
@@ -53,6 +51,8 @@ import Distribution.Simple.Utils
53
51
import Distribution.Client.ProjectConfig
54
52
( ProjectConfig (.. ), ProjectConfigShared (.. )
55
53
, withProjectOrGlobalConfig )
54
+ import Distribution.Client.ProjectFlags
55
+ ( flagIgnoreProject )
56
56
import Distribution.Client.ProjectPlanning
57
57
( ElaboratedConfiguredPackage (.. )
58
58
, ElaboratedInstallPlan , binDirectoryFor )
@@ -110,7 +110,7 @@ import System.FilePath
110
110
( (</>) , isValid , isPathSeparator , takeExtension )
111
111
112
112
113
- runCommand :: CommandUI (NixStyleFlags ClientRunFlags )
113
+ runCommand :: CommandUI (NixStyleFlags () )
114
114
runCommand = CommandUI
115
115
{ commandName = " v2-run"
116
116
, commandSynopsis = " Run an executable."
@@ -146,8 +146,8 @@ runCommand = CommandUI
146
146
++ " Build with '-O2' and run the program, passing it extra arguments.\n\n "
147
147
148
148
++ cmdCommonHelpTextNewBuildBeta
149
- , commandDefaultFlags = defaultNixStyleFlags defaultClientRunFlags
150
- , commandOptions = nixStyleOptions clientRunOptions
149
+ , commandDefaultFlags = defaultNixStyleFlags ()
150
+ , commandOptions = nixStyleOptions ( const [] )
151
151
}
152
152
153
153
-- | The @run@ command runs a specified executable-like component, building it
@@ -158,8 +158,8 @@ runCommand = CommandUI
158
158
-- For more details on how this works, see the module
159
159
-- "Distribution.Client.ProjectOrchestration"
160
160
--
161
- runAction :: NixStyleFlags ClientRunFlags -> [String ] -> GlobalFlags -> IO ()
162
- runAction flags@ NixStyleFlags {extraFlags = clientRunFlags, .. } targetStrings globalFlags = do
161
+ runAction :: NixStyleFlags () -> [String ] -> GlobalFlags -> IO ()
162
+ runAction flags@ NixStyleFlags {.. } targetStrings globalFlags = do
163
163
globalTmp <- getTemporaryDirectory
164
164
tmpDir <- createTempDirectory globalTmp " cabal-repl."
165
165
@@ -298,7 +298,7 @@ runAction flags@NixStyleFlags {extraFlags=clientRunFlags, ..} targetStrings glob
298
298
handleDoesNotExist () (removeDirectoryRecursive tmpDir)
299
299
where
300
300
verbosity = fromFlagOrDefault normal (configVerbosity configFlags)
301
- ignoreProject = crunIgnoreProject clientRunFlags
301
+ ignoreProject = flagIgnoreProject projectFlags
302
302
cliConfig = commandLineFlagsToProjectConfig globalFlags flags mempty -- ClientInstallFlags, not needed here
303
303
globalConfigFlag = projectConfigConfigFile (projectConfigShared cliConfig)
304
304
0 commit comments