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
[lockfile] Use lockfile for legacy packages (#964)
## Summary
This changes saves legacy packages to lockfile. It does not save
absolute flake references to lockfile (e.g. `github:/my/flake#foo`) but
we could in the future.
Merging legacy and versioned packages let's us simplify the code quite a
bit. Specifically now all inputs are treated like flakes (either
explicit or resolved).
One complication this exposes is the php and haskell planners.
Specifically, each planner creates definitions must be included as
packages. As a quick hack I just include the definitions as is at the
top of the list. This ensures these take precedence over any other
package. It also means that packages can show up twice if these planners
are activated. That doesn't break the functionality, it just looks weird
in the flake.nix
@Lagoja are there any example that exercises the Haskell planner?
A few possible follow ups:
- [ ] We only create lockfile when packages need to be resolved. This
may lead to some perf issues is people use an existing project on a read
only platform (e.g. CICD) because not having a lockfile makes things a
bit slower.
- [ ] Out flake.nix is a bit ugly because now it has multiple duplicate
inputs. We can clean this up.
## How was it tested?
Need to do a lot more testing but what I did:
```
devbox rm go_1_20 && devbox add go_1_20
rm -rf .devbox
devbox install
devbox run echo 5
devbox add [email protected]
devbox run "python --version"
devbox shell
```
Need to test:
- [x] LOCKFILE flag off on legacy project
- [x] LOCKFILE flag on on legacy project
- [x] LOCKFILE flag off on project with lockfile
- [x] LOCKFILE flag on on project with lockfile
0 commit comments