Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions internal/devpkg/narinfo_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import (
"fmt"
"io"
"net/http"
"os"
"sync"
"time"

"github.com/pkg/errors"
"go.jetpack.io/devbox/internal/boxcli/featureflag"
"go.jetpack.io/devbox/internal/debug"
"go.jetpack.io/devbox/internal/lock"
"go.jetpack.io/devbox/internal/nix"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -53,7 +51,6 @@ func (p *Package) IsInBinaryCache() (bool, error) {
// package in the list, and caches the result.
// Callers of IsInBinaryCache may call this function first as a perf-optimization.
func FillNarInfoCache(ctx context.Context, packages ...*Package) error {
defer debug.FunctionTimer().End()
if !featureflag.RemoveNixpkgs.Enabled() {
return nil
}
Expand Down Expand Up @@ -148,11 +145,6 @@ func (p *Package) fetchNarInfoStatus(outputName string) (bool, error) {

outputInCache := map[string]bool{} // key = output name, value = in cache
for _, output := range outputs {
// if store path exists locally, then it is equivalent to being in the cache.
if _, err := os.Stat(output.Path); err == nil {
outputInCache[output.Name] = true
continue
}
pathParts := nix.NewStorePathParts(output.Path)
reqURL := BinaryCache + "/" + pathParts.Hash + ".narinfo"
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
Expand Down