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

Function resolve

internal/devpkg/package.go:169–182  ·  view source on GitHub ↗

resolve is the implementation of Package.resolve, where it is wrapped in a sync.OnceValue function. It should not be called directly.

(pkg *Package)

Source from the content-addressed store, hash-verified

167// resolve is the implementation of Package.resolve, where it is wrapped in a
168// sync.OnceValue function. It should not be called directly.
169func resolve(pkg *Package) error {
170 resolved, err := pkg.lockfile.Resolve(pkg.LockfileKey())
171 if err != nil {
172 return err
173 }
174 parsed, err := flake.ParseInstallable(resolved.Resolved)
175 if err != nil {
176 return err
177 }
178 parsed.Outputs = strings.Join(pkg.outputs.selectedNames, ",")
179
180 pkg.setInstallable(parsed, pkg.lockfile.ProjectDir())
181 return nil
182}
183
184func (p *Package) setInstallable(i flake.Installable, projectDir string) {
185 if i.Ref.Type == flake.TypePath && !filepath.IsAbs(i.Ref.Path) {

Callers 2

devboxReopenFunction · 0.85
newPackageFunction · 0.85

Calls 5

ParseInstallableFunction · 0.92
setInstallableMethod · 0.80
ResolveMethod · 0.65
LockfileKeyMethod · 0.65
ProjectDirMethod · 0.65

Tested by

no test coverage detected