summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorewy <ewy0@protonmail.com>2026-06-02 15:07:59 +0200
committerewy <ewy0@protonmail.com>2026-06-02 15:07:59 +0200
commitf77fc4ef5f2df96c6bba3cd6c7d88a77d61a5a80 (patch)
treebdead2d2b245407aaa20e71c433d7c8f757d7049 /main.go
parent6d607f114f63184a43237a3ff80aee622401ee23 (diff)
add .wants and .includesHEADmaster
.wants adds potential out-of-tree sources to your state (for monorepos, for example) .includes adds targets from another source to this one, adding inheritance
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.go b/main.go
index 496d09b..89d90e6 100644
--- a/main.go
+++ b/main.go
@@ -148,9 +148,9 @@ func pik() spool.ExitCode {
var st *model.State
var stateErrors []error
- var c *cache.Cache
+ var c cache.Cache
if !*flags.All {
- st, stateErrors = model.NewState(fs, locs, indexers, runners)
+ st, stateErrors = model.NewState(fs, locs, pikdex.Indexer.Data, indexers, runners)
go func() {
if len(stateErrors) > 0 {
return
@@ -162,12 +162,12 @@ func pik() spool.ExitCode {
}()
} else {
- c, err = cache.LoadFile(fs, paths.ContextsFile.String()[1:])
+ c, err = cache.Get()
if err != nil {
_, _ = spool.Warn("%v\n", err)
return spool.CacheReadFailure
}
- st, stateErrors = cache.LoadState(fs, c, indexers, runners)
+ st, stateErrors = cache.LoadState(fs, pikdex.Indexer.Data, c, indexers, runners)
}
if stateErrors != nil {
_, _ = spool.Warn("%v\n", stateErrors)
@@ -212,7 +212,7 @@ func pik() spool.ExitCode {
// TODO: Move auto-all logic into Search?
if !*flags.All && result.Target == nil && len(result.Args) > 0 && SourcesWithoutResults == nil && !ForceConfirm {
ForceConfirm = true
- SourcesWithoutResults = c
+ SourcesWithoutResults = &c
return pik()
}