internal/pkg: consolidate cache attributes
Test / Create distribution (push) Successful in 54s
Test / Sandbox (push) Successful in 2m58s
Test / ShareFS (push) Successful in 3m56s
Test / Hakurei (push) Successful in 3m59s
Test / Sandbox (race detector) (push) Successful in 5m31s
Test / Hakurei (race detector) (push) Successful in 6m38s
Test / Flake checks (push) Successful in 1m5s

This makes the interface stable.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-07-09 09:30:56 +09:00
parent 3f8e111d1c
commit 2f1534853a
9 changed files with 88 additions and 88 deletions
+4 -4
View File
@@ -203,11 +203,11 @@ func main() {
"v", command.BoolFlag(false),
"Do not suppress verbose output from init",
).Flag(
&cm.cures,
&cm.attr.Cures,
"cures", command.IntFlag(0),
"Maximum number of dependencies to cure at any given time",
).Flag(
&cm.jobs,
&cm.attr.Jobs,
"jobs", command.IntFlag(0),
"Preferred number of jobs to run, when applicable",
).Flag(
@@ -934,8 +934,8 @@ func main() {
return fmt.Errorf("unknown artifact %q", args[1])
}
if !a.IsExclusive() && cm.jobs < 1 {
cm.jobs = runtime.NumCPU()/n + 1
if !a.IsExclusive() && cm.attr.Jobs < 1 {
cm.attr.Jobs = runtime.NumCPU()/n + 1
}
res := make([]unique.Handle[pkg.Checksum], n)