mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 22:33:06 +03:00
ota: works on my machine
This commit is contained in:
parent
d395c2711d
commit
3914c0c0dd
@ -53,10 +53,9 @@
|
||||
=-(?>(?=(%kiln -<) ->) (~(got by lac.old) %kiln))
|
||||
==
|
||||
==
|
||||
=/ ver -.state
|
||||
=^ d drum.state (on-load:drum-core ver drum.tup)
|
||||
=^ h helm.state (on-load:helm-core ver helm.tup)
|
||||
=^ k kiln.state (on-load:kiln-core ver kiln.tup)
|
||||
=^ d drum.state (on-load:drum-core -.old drum.tup)
|
||||
=^ h helm.state (on-load:helm-core -.old helm.tup)
|
||||
=^ k kiln.state (on-load:kiln-core -.old kiln.tup)
|
||||
[:(weld d h k) this]
|
||||
::
|
||||
++ on-poke
|
||||
@ -95,13 +94,14 @@
|
||||
[%helm *] =^(c helm.state (take-agent:helm-core +<) [c this])
|
||||
[%kiln *] =^(c kiln.state (take-agent:kiln-core +<) [c this])
|
||||
==
|
||||
:: TODO: symmetry between adding and stripping wire prefixes
|
||||
::
|
||||
++ on-arvo
|
||||
|= [=wire =sign-arvo]
|
||||
|= [=wire syn=sign-arvo]
|
||||
^- step:agent:gall
|
||||
?+ wire ~|([%hood-bad-wire wire] !!)
|
||||
[%drum *] =^(c drum.state (take-arvo:drum-core +<) [c this])
|
||||
[%helm *] =^(c helm.state (take-arvo:helm-core +<) [c this])
|
||||
[%kiln *] =^(c kiln.state (take-arvo:kiln-core +<) [c this])
|
||||
[%drum *] =^(c drum.state (take-arvo:drum-core t.wire syn) [c this])
|
||||
[%helm *] =^(c helm.state (take-arvo:helm-core t.wire syn) [c this])
|
||||
[%kiln *] =^(c kiln.state (take-arvo:kiln-core t.wire syn) [c this])
|
||||
==
|
||||
--
|
||||
|
@ -19,8 +19,27 @@
|
||||
tid=(map tid yarn)
|
||||
==
|
||||
::
|
||||
+$ clean-slate-any
|
||||
$^ clean-slate-ket
|
||||
$% clean-slate-sig
|
||||
clean-slate
|
||||
==
|
||||
::
|
||||
+$ clean-slate
|
||||
$: starting=(map yarn [=trying =vase])
|
||||
$: %1
|
||||
starting=(map yarn [=trying =vase])
|
||||
running=(list yarn)
|
||||
tid=(map tid yarn)
|
||||
==
|
||||
::
|
||||
+$ clean-slate-ket
|
||||
$: starting=(map yarn [trying=?(%build %find %none) =vase])
|
||||
running=(list yarn)
|
||||
tid=(map tid yarn)
|
||||
==
|
||||
::
|
||||
+$ clean-slate-sig
|
||||
$: starting=~
|
||||
running=(list yarn)
|
||||
tid=(map tid yarn)
|
||||
==
|
||||
@ -117,12 +136,17 @@
|
||||
++ on-init on-init:def
|
||||
++ on-save clean-state:sc
|
||||
++ on-load
|
||||
|^
|
||||
|= old-state=vase
|
||||
=+ !<(=clean-slate old-state)
|
||||
=. tid.state tid.clean-slate
|
||||
=+ !<(any=clean-slate-any old-state)
|
||||
=? any ?=(^ -.any) (old-to-1 any)
|
||||
=? any ?=(~ -.any) (old-to-1 any)
|
||||
?> ?=(%1 -.any)
|
||||
::
|
||||
=. tid.state tid.any
|
||||
=/ yarns=(list yarn)
|
||||
%+ welp running.clean-slate
|
||||
~(tap in ~(key by starting.clean-slate))
|
||||
%+ welp running.any
|
||||
~(tap in ~(key by starting.any))
|
||||
|- ^- (quip card _this)
|
||||
?~ yarns
|
||||
`this
|
||||
@ -131,6 +155,12 @@
|
||||
=^ cards-2 this
|
||||
$(yarns t.yarns)
|
||||
[(weld cards-1 cards-2) this]
|
||||
::
|
||||
++ old-to-1
|
||||
|= old=clean-slate-ket
|
||||
^- clean-slate
|
||||
1+old(starting (~(run by starting.old) |=([* v=vase] none+v)))
|
||||
--
|
||||
::
|
||||
++ on-poke
|
||||
|= [=mark =vase]
|
||||
@ -350,9 +380,13 @@
|
||||
::
|
||||
++ thread-fail-not-running
|
||||
|= [=tid =term =tang]
|
||||
^- (quip card ^state)
|
||||
=/ =yarn (~(got by tid.state) tid)
|
||||
:- (thread-say-fail tid term tang)
|
||||
state(starting (~(del by starting.state) yarn))
|
||||
:_ state(starting (~(del by starting.state) yarn))
|
||||
=/ moz (thread-say-fail tid term tang)
|
||||
?. ?=([~ %build *] (~(get by starting.state) yarn))
|
||||
moz
|
||||
:_(moz [%pass /build/[tid] %arvo %c %warp our.bowl %home ~])
|
||||
::
|
||||
++ thread-say-fail
|
||||
|= [=tid =term =tang]
|
||||
@ -440,5 +474,5 @@
|
||||
::
|
||||
++ clean-state
|
||||
!> ^- clean-slate
|
||||
state(running (turn (tap-yarn running.state) head))
|
||||
1+state(running (turn (tap-yarn running.state) head))
|
||||
--
|
||||
|
@ -1,17 +1,9 @@
|
||||
/- *sole
|
||||
/+ sole
|
||||
|%
|
||||
+$ any-state $%(state [%1 pith-1])
|
||||
+$ any-state $%(state)
|
||||
+$ state [%2 pith-2]
|
||||
::
|
||||
++ pith-1
|
||||
%+ cork pith-2 ::
|
||||
|:($:pith-2 +<(bin ((map bone source-1)))) ::
|
||||
:: ::
|
||||
++ source-1 ::
|
||||
%+ cork source ::
|
||||
|:($:source +<(mir ((pair @ud (list @c))))) :: style-less mir
|
||||
:: ::
|
||||
++ pith-2 ::
|
||||
$: eel/(set gill:gall) :: connect to
|
||||
ray/(set well:gall) ::
|
||||
@ -212,9 +204,10 @@
|
||||
==
|
||||
::
|
||||
++ on-load
|
||||
|= [hood-version=?(%7) old=any-state]
|
||||
|= [hood-version=?(%1 %2 %3 %4 %5 %6 %7) old=any-state]
|
||||
=< se-abet =< se-view
|
||||
=. ..on-load
|
||||
=. sat old
|
||||
=? ..on-load (lte hood-version %4)
|
||||
=< (se-born | %home %goad)
|
||||
=< (se-born | %home %metadata-store)
|
||||
=< (se-born | %home %metadata-hook)
|
||||
|
@ -35,7 +35,7 @@
|
||||
?~(caz this $(caz t.caz, this (emit i.caz)))
|
||||
::
|
||||
++ on-load
|
||||
|= [hood-version=?(%7) old=any-state]
|
||||
|= [hood-version=?(%1 %2 %3 %4 %5 %6 %7) old=any-state]
|
||||
=< abet
|
||||
=? old ?=(%0 -.old) (state-0-to-1 old)
|
||||
?> ?=(%1 -.old)
|
||||
|
@ -77,7 +77,7 @@
|
||||
~[leaf+"from {<sud>}" leaf+"on {<who>}" leaf+"to {<syd>}"]
|
||||
::
|
||||
++ on-load
|
||||
|= [hood-version=?(%7) old=any-state]
|
||||
|= [hood-version=?(%1 %2 %3 %4 %5 %6 %7) old=any-state]
|
||||
=< abet
|
||||
=? . ?=(%0 -.old)
|
||||
=/ recognized-ota=(unit [syd=desk her=ship sud=desk])
|
||||
|
@ -150,6 +150,9 @@
|
||||
^- [(list move) _adult-gate]
|
||||
~> %slog.[0 leaf+"gall: molting"]
|
||||
~< %slog.[0 leaf+"gall: molted"]
|
||||
:: +molt should never notify its client about agent changes
|
||||
::
|
||||
=- [(skip -< |=(move ?=([* %give %onto *] +<))) ->]
|
||||
=/ adult adult-core
|
||||
=. state.adult
|
||||
[%6 system-duct outstanding contacts yokes=~ blocked]:spore
|
||||
@ -1277,7 +1280,7 @@
|
||||
(ap-install(agent.current-agent agent) `old-state)
|
||||
?~ error
|
||||
ap-core
|
||||
(ap-error %load-failed u.error)
|
||||
(mean >%load-failed< u.error)
|
||||
:: +ap-subscribe-as: apply %watch-as.
|
||||
::
|
||||
++ ap-subscribe-as
|
||||
|
Loading…
Reference in New Issue
Block a user