resolve is the implementation of Package.resolve, where it is wrapped in a sync.OnceValue function. It should not be called directly.
(pkg *Package)
| 167 | // resolve is the implementation of Package.resolve, where it is wrapped in a |
| 168 | // sync.OnceValue function. It should not be called directly. |
| 169 | func 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 | |
| 184 | func (p *Package) setInstallable(i flake.Installable, projectDir string) { |
| 185 | if i.Ref.Type == flake.TypePath && !filepath.IsAbs(i.Ref.Path) { |
no test coverage detected