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
{{ message }}
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
There are three basic things that dep writes to disk:
Manifest
Lock
Dep source code (i.e. vendor)
One component of correct operation of the tool is keeping these three states in sync. Or, at minimum, not letting them go out of sync unintentionally. That basically entails taking a transaction-style approach to state changes:
If writing one of the states to disk, the existing state should be preserved until the last possible moment, and rolled back to if any error occurs
If writing multiple states to disk, it is safe to assume that correctness of the overall operation is predicated on all the writes succeeding. So, we need to be expand the transaction to cover all the write ops - if one fails, they all fail, and all pre-existing disk states are restored.
This isn't a super-simple thing to do, so I might say we could defer a bit while we work on higher-priority areas. However, I already implemented this for glide, and the use pattern for us is mostly the same. So, I can do some slapdash work to adapt that for our purposes here.
Having a contained API for this would reduce some cognitive load when implementing commands anyway, which is useful - there's already plenty to think about with what's going on there.
The text was updated successfully, but these errors were encountered:
There are three basic things that dep writes to disk:
vendor
)One component of correct operation of the tool is keeping these three states in sync. Or, at minimum, not letting them go out of sync unintentionally. That basically entails taking a transaction-style approach to state changes:
This isn't a super-simple thing to do, so I might say we could defer a bit while we work on higher-priority areas. However, I already implemented this for glide, and the use pattern for us is mostly the same. So, I can do some slapdash work to adapt that for our purposes here.
Having a contained API for this would reduce some cognitive load when implementing commands anyway, which is useful - there's already plenty to think about with what's going on there.
The text was updated successfully, but these errors were encountered: