Skip to content

Commit c34d1bd

Browse files
jbertholdgeo2a
authored andcommitted
Invert --no-fallback-simplify and --no-post-exec-simplify (new default: no simplification)
* Introduces options `--fallback-simplify` and `--post-exec-simplify` to perform said simplifications (before fallbacks and after execute) in `kore-rpc-booster` * The old `--no-fallback-simplify` and `--no-post-exec-simplify` options are still accepted but not doing anything any more.
1 parent 82f2798 commit c34d1bd

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

booster/tools/booster/Server.hs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ data CLProxyOptions = CLProxyOptions
408408
{ clOptions :: CLOptions
409409
, proxyOptions :: ProxyOptions
410410
}
411+
deriving stock (Show)
411412

412413
data ProxyOptions = ProxyOptions
413414
{ forceFallback :: Maybe Depth
@@ -421,6 +422,7 @@ data ProxyOptions = ProxyOptions
421422
, simplifyBeforeFallback :: Bool
422423
-- ^ whether to run a simplification before fall-back execute requests
423424
}
425+
deriving stock (Show)
424426

425427
parserInfoModifiers :: InfoMod options
426428
parserInfoModifiers =
@@ -458,17 +460,23 @@ clProxyOptionsParser =
458460
<> help "Halt reasons for which requests should be re-executed with kore-rpc"
459461
<> showDefaultWith (intercalate "," . map show)
460462
)
461-
<*> flag
462-
True
463-
False
464-
( long "no-post-exec-simplify"
465-
<> help "disable post-exec simplification"
463+
<*> ( switch (long "post-exec-simplify" <> help "simplify after execution")
464+
<|> ( flag
465+
True
466+
False
467+
( long "no-post-exec-simplify"
468+
<> help "Deprecated: used to disable post-exec simplification (which is now the default)"
469+
)
470+
)
466471
)
467-
<*> flag
468-
True
469-
False
470-
( long "no-fallback-simplify"
471-
<> help "disable simplification before fallback requests"
472+
<*> ( switch (long "fallback-simplify" <> help "run a simplification before fallback requests")
473+
<|> ( flag
474+
True
475+
False
476+
( long "no-fallback-simplify"
477+
<> help "Deprecated: used to disable simplification before fallback requests (now the default)"
478+
)
479+
)
472480
)
473481

474482
reasonReader :: String -> Either String HaltReason

0 commit comments

Comments
 (0)