mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-21 23:47:35 +03:00
ford: add state version and perform flush on migration between versions
This commit is contained in:
parent
f7aa1298bb
commit
09b381e8c6
@ -173,15 +173,11 @@
|
||||
== ==
|
||||
--
|
||||
|%
|
||||
:: +axle: overall ford state
|
||||
:: +axle: overall ford state, tagged by version
|
||||
::
|
||||
+= axle
|
||||
$: :: date: date at which ford's state was updated to this data structure
|
||||
::
|
||||
date=%~2018.12.13
|
||||
:: state: all persistent state
|
||||
::
|
||||
state=ford-state
|
||||
$% [%~2018.12.13 state=ford-state]
|
||||
[%~2020.2.21 state=ford-state]
|
||||
==
|
||||
:: +ford-state: all state that ford maintains
|
||||
::
|
||||
@ -6336,16 +6332,25 @@
|
||||
::
|
||||
$(ducts t.ducts, moves (weld moves duct-moves))
|
||||
--
|
||||
:: +load: flush old state (called on vane reload)
|
||||
:: +load: either flush or migrate old state (called on vane reload)
|
||||
::
|
||||
:: This is a temporary measure for the OS1 %publish update. We can flush all
|
||||
:: build state like this because only gall and %publish use ford live builds
|
||||
:: currently. :goad will handle remaking builds for gall, and the new
|
||||
:: %publish does not use ford.
|
||||
:: If it has the old state version, flush the ford state. Otherwise trim
|
||||
:: build results in case a change to our code invalidated an old build
|
||||
:: result.
|
||||
::
|
||||
:: Flushing state of the old version is a temporary measure for the OS1
|
||||
:: %publish update. We can flush all build state like this because only gall
|
||||
:: and %publish use ford live builds currently. :goad will handle remaking
|
||||
:: builds for gall, and the new %publish does not use ford.
|
||||
::
|
||||
++ load
|
||||
|= old=axle
|
||||
^+ ford-gate
|
||||
?: =(%~2018.12.13 -.old)
|
||||
=. -.ax %~2020.2.21
|
||||
ford-gate
|
||||
=. ax [%~2020.2.21 state.old]
|
||||
=. ford-gate +:(call ~[/ford-load-self] *type %trim 0)
|
||||
ford-gate
|
||||
:: +stay: produce current state
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user