MCPcopy Index your code
hub / github.com/jetify-com/devbox / Tidy

Method Tidy

internal/lock/lockfile.go:206–212  ·  view source on GitHub ↗

Tidy ensures that the lockfile has the set of packages corresponding to the devbox.json config. It gets rid of older packages that are no longer needed.

()

Source from the content-addressed store, hash-verified

204// Tidy ensures that the lockfile has the set of packages corresponding to the devbox.json config.
205// It gets rid of older packages that are no longer needed.
206func (f *File) Tidy() {
207 keep := f.devboxProject.AllPackageNamesIncludingRemovedTriggerPackages()
208 keep = append(keep, f.devboxProject.Stdenv().String())
209 maps.DeleteFunc(f.Packages, func(key string, pkg *Package) bool {
210 return !slices.Contains(keep, key)
211 })
212}
213
214// IsUpToDateAndInstalled returns true if the lockfile is up to date and the
215// local hashes match, which generally indicates all packages are correctly

Callers 1

updateLockfileMethod · 0.80

Calls 3

StdenvMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected