FullPackageAttributePath returns the attribute path for a package. It is not always normalized which means it should not be used to compare packages. During happy paths (devbox packages and nix flakes that contains a fragment) it is much faster than NormalizedPackageAttributePath
()
| 353 | // During happy paths (devbox packages and nix flakes that contains a fragment) |
| 354 | // it is much faster than NormalizedPackageAttributePath |
| 355 | func (p *Package) FullPackageAttributePath() (string, error) { |
| 356 | if p.IsDevboxPackage { |
| 357 | reference, err := p.NormalizedDevboxPackageReference() |
| 358 | if err != nil { |
| 359 | return "", err |
| 360 | } |
| 361 | _, fragment, _ := strings.Cut(reference, "#") |
| 362 | return fragment, nil |
| 363 | } |
| 364 | return p.NormalizedPackageAttributePath() |
| 365 | } |
| 366 | |
| 367 | // NormalizedPackageAttributePath returns an attribute path normalized by nix |
| 368 | // search. This is useful for comparing different attribute paths that may |
no test coverage detected