You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[refactor] move nix.Package to devpkg.Package (#1239)
## Summary
This PR moves `nix.Package` to `devpkg` package.
`devpkg.Package` depends on `nix` and `lock`, which is okay.
I needed to introduce a small package called `devpkgutil` to resolve
some gnarly cycles.
- `lock/lockfile.go` calls these utilities.
- `nix/search.go` calls these utilities.
This `devpkgutil` is definitely a workaround, and I spent a lot of time
trying to make alternate paths work:
- tried refactoring `lockfile.Resolve` to not depend on
`devpkg.ParseVersionedPackage`
- tried refactoring `nix/search.go` to a `nixsearch` package (similar to
`nixprofile`), but that wouldn't help in this case.
Open to hear alternative solutions.
UPDATE:
- moved 2 of the 3 `devpkgutil` functions to `nix` package in
`nix/nixpkgs.go`
- one function remains: `ParseVersionedPackage`. Will tackle in follow
up to remove `devpkgsutil`
## How was it tested?
---------
Co-authored-by: Mike Landau <[email protected]>
0 commit comments