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

Method recomputeState

internal/devbox/packages.go:406–419  ·  view source on GitHub ↗

recomputeState updates the local state comprising of: - plugins directories - devbox.lock file - the generated flake - the nix-profile

(ctx context.Context)

Source from the content-addressed store, hash-verified

404// - the generated flake
405// - the nix-profile
406func (d *Devbox) recomputeState(ctx context.Context) error {
407 defer debug.FunctionTimer().End()
408 if err := shellgen.GenerateForPrintEnv(ctx, d); err != nil {
409 return err
410 }
411
412 // TODO: should this be moved into GenerateForPrintEnv?
413 // OR into a plugin.GenerateFiles() along with d.pluginManager().Create()?
414 if err := plugin.RemoveInvalidSymlinks(d.projectDir); err != nil {
415 return err
416 }
417
418 return d.syncNixProfileFromFlake(ctx)
419}
420
421func (d *Devbox) profilePath() (string, error) {
422 absPath := filepath.Join(d.projectDir, nix.ProfilePath)

Callers 1

ensureStateIsUpToDateMethod · 0.95

Calls 5

FunctionTimerFunction · 0.92
GenerateForPrintEnvFunction · 0.92
RemoveInvalidSymlinksFunction · 0.92
EndMethod · 0.80

Tested by

no test coverage detected