Skip to content

Commit

Permalink
Invert --no-fallback-simplify and --no-post-exec-simplify (new de…
Browse files Browse the repository at this point in the history
…fault: 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.
  • Loading branch information
jberthold authored and geo2a committed Aug 12, 2024
1 parent 934a30e commit b2c3850
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions booster/tools/booster/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ data CLProxyOptions = CLProxyOptions
{ clOptions :: CLOptions
, proxyOptions :: ProxyOptions
}
deriving stock (Show)

data ProxyOptions = ProxyOptions
{ forceFallback :: Maybe Depth
Expand All @@ -421,6 +422,7 @@ data ProxyOptions = ProxyOptions
, simplifyBeforeFallback :: Bool
-- ^ whether to run a simplification before fall-back execute requests
}
deriving stock (Show)

parserInfoModifiers :: InfoMod options
parserInfoModifiers =
Expand Down Expand Up @@ -458,17 +460,23 @@ clProxyOptionsParser =
<> help "Halt reasons for which requests should be re-executed with kore-rpc"
<> showDefaultWith (intercalate "," . map show)
)
<*> flag
True
False
( long "no-post-exec-simplify"
<> help "disable post-exec simplification"
<*> ( switch (long "post-exec-simplify" <> help "simplify after execution")
<|> ( flag
True
False
( long "no-post-exec-simplify"
<> help "Deprecated: used to disable post-exec simplification (which is now the default)"
)
)
)
<*> flag
True
False
( long "no-fallback-simplify"
<> help "disable simplification before fallback requests"
<*> ( switch (long "fallback-simplify" <> help "run a simplification before fallback requests")
<|> ( flag
True
False
( long "no-fallback-simplify"
<> help "Deprecated: used to disable simplification before fallback requests (now the default)"
)
)
)

reasonReader :: String -> Either String HaltReason
Expand Down

0 comments on commit b2c3850

Please sign in to comment.