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 ensureStateIsUpToDate] split into two modes for when to recompute state (#1723)
## Summary
Refactor the implementation of `ensureStateIsUpToDate` as per the
suggestion in this comment:
#1692 (comment)
1. Split `lockfile.Save` into `lockfile.Save` and
`lockfile.UpdateAndSaveStateHash`
2. For now, regardless of `recomputeState` (boolean variable), we always
call `recomputeState` (the function). In the next PR, this will change.
NOTE:
In `pluginManager.create`, I only do `lockfile.Save` and not
`lockfile.UpdateAndSaveLocal` (as before), because:
When I do `devbox add php81Extensions.ds` then the `lockfile.Save` in
`pluginManager.Create` here is resulting in the `local.lock` being
up-to-date so that the next `devbox run` is thinking everything is up to
date and early returning in `ensureStateIsUpToDate`.
## How was it tested?
```
devbox shell
devbox add hello
devbox rm hello
```
tests should pass.
0 commit comments