goad: make startup resilient to errors

By not running the risky %goad card in on-init.  Also includes some qol
fixes.
This commit is contained in:
Philip Monk 2019-12-13 18:40:12 -08:00
parent 9aa3591e91
commit bfd2e533a1
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
3 changed files with 17 additions and 8 deletions

View File

@ -24,12 +24,12 @@
==
:: bootstrapping to get %goad started OTA
::
++ on-save !>(%1)
++ on-save !>(%2)
++ on-load
|= old-state=vase
=/ old !<(?(~ %1) old-state)
=/ old !<(?(~ %1 %2) old-state)
=^ cards this
?. ?=(~ old)
?: ?=(%2 old)
`this
:_ this :_ ~
[%pass /behn %arvo %b %wait +(now.bowl)]

View File

@ -12,7 +12,8 @@
[%pass /behn %arvo %b %wait +(now.bowl)]
::
++ goad
:~ [%pass /gall %arvo %g %goad | ~]
|= force=?
:~ [%pass /gall %arvo %g %goad force ~]
==
--
::
@ -22,11 +23,18 @@
++ on-init
:: subscribe to /sys and do initial goad
::
[[(warp bowl) goad] this]
[[(warp bowl) (wait bowl) ~] this]
::
++ on-save on-save:def
++ on-load on-load:def
++ on-poke on-poke:def
++ on-poke
|= [=mark =vase]
?: ?=([%noun * %go] +<)
[(goad |) this]
?: ?=([%noun * %force] +<)
[(goad &) this]
(on-poke:def mark vase)
::
++ on-watch on-watch:def
++ on-leave on-leave:def
++ on-peek on-peek:def
@ -50,7 +58,8 @@
?^ error.sign-arvo
:_ this :_ ~
[%pass /dill %arvo %d %flog %crud %goad-fail u.error.sign-arvo]
[goad this]
%- (slog leaf+"goad: recompiling all apps" ~)
[(goad |) this]
==
::
++ on-fail on-fail:def

View File

@ -10,4 +10,4 @@
|= $: {now/@da eny/@uvJ bec/beak}
{arg/~ ~}
==
[%helm-reload ~[%z %a %b %c %d %f %g %j %l]]
[%helm-reload ~[%z %a %b %c %d %e %f %g %i %j]]