aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/mbf/main.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-04-03 16:15:50 +0900
committerOphestra <cat@gensokyo.uk>2026-04-03 16:16:55 +0900
commit5093a06026b0f4abe6b16ccf5381a19caf594166 (patch)
treec68bfce417b1ba13b3f0d01ba8849086ec5eb36d /cmd/mbf/main.go
parent50c1d7f8806de519161bbc07bbc6f73b69f6bece (diff)
internal/pkg: cache flags
This is cleaner for extending the API. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/mbf/main.go')
-rw-r--r--cmd/mbf/main.go24
1 files changed, 5 insertions, 19 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index c5a8868b..17ae1b05 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -69,11 +69,10 @@ func main() {
}()
var (
- flagQuiet bool
- flagCures int
- flagBase string
- flagTShift int
- flagIdle bool
+ flagQuiet bool
+ flagCures int
+ flagBase string
+ flagIdle bool
)
c := command.New(os.Stderr, log.Printf, "mbf", func([]string) (err error) {
msg.SwapVerbose(!flagQuiet)
@@ -89,16 +88,7 @@ func main() {
} else if base, err = check.NewAbs(flagBase); err != nil {
return
}
- if cache, err = pkg.Open(ctx, msg, flagCures, base); err == nil {
- if flagTShift < 0 {
- cache.SetThreshold(0)
- } else if flagTShift > 31 {
- cache.SetThreshold(1 << 31)
- } else {
- cache.SetThreshold(1 << flagTShift)
- }
- }
-
+ cache, err = pkg.Open(ctx, msg, 0, flagCures, base)
if flagIdle {
pkg.SetSchedIdle = true
}
@@ -117,10 +107,6 @@ func main() {
"d", command.StringFlag("$MBF_CACHE_DIR"),
"Directory to store cured artifacts",
).Flag(
- &flagTShift,
- "tshift", command.IntFlag(-1),
- "Dependency graph size exponent, to the power of 2",
- ).Flag(
&flagIdle,
"sched-idle", command.BoolFlag(false),
"Set SCHED_IDLE scheduling policy",