Fix confused and outdated 'chelonia/contract/sync' situation #2298
Labels
App:Frontend
Kind:Bug
Kind:Core
Anything that changes or affects the fundamental core data structures & design of the application.
Kind:Documentation
Note:Contracts
Issues involving modifications to contracts
Priority:High
Problem
Our
Information-Flow.md
documentation is outdated for how to sync a contract.It currently says that developers should use
'chelonia/contract/sync'
, but that's wrong, as they're supposed to use'cheloina/contract/retain'
along with'chelonia/contract/release'
.A separate problem is this code inside of
'chelonia/contract/sync'
:It's unclear to me what this code is doing, and it should be clearly commented.
Solution
'chelonia/contract/sync'
with'chelonia/contract/retain'
(andrelease
).'chelonia/contract/forceSync'
), or change the behavior of'chelonia/contract/sync'
so that it does force syncing. Be careful if you pick the "change behavior" route, since if any old versions of contracts that call that expecting the old behavior to be there, then the behavior shouldn't be changed (since those are deployed for life now). My preference would be to change the behavior for'chelonia/contract/sync'
, so thatforceSync
istrue
by default, and tell developers to call this on contracts upon logging in (or coming back online). Go through the app and search for places where we need to explicitly setforceSync: false
.retain
most of the time, andsync
upon login).The text was updated successfully, but these errors were encountered: