From 577ec24459c2f16cf7545822af8418bd301b9477 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Wed, 15 Sep 2021 22:57:08 +0300 Subject: [PATCH] kiln: WIP listen to %warp's too --- pkg/arvo/lib/hood/kiln.hoon | 32 +++++++++++++++++++++++--------- pkg/base-dev/sur/hood.hoon | 2 +- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/pkg/arvo/lib/hood/kiln.hoon b/pkg/arvo/lib/hood/kiln.hoon index d0806a841..453edd821 100644 --- a/pkg/arvo/lib/hood/kiln.hoon +++ b/pkg/arvo/lib/hood/kiln.hoon @@ -366,6 +366,8 @@ =/ =aeon (dec aeon.rail.rak) %+ clay-card %merge-kids [%merg %kids ship.rail.rak desk.rail.rak ud+aeon germ] + ++ listen + (clay-card %listen %warp our loc `[%next %z da+now /]) ++ clay-card |= [step=@tas =task:clay] ^- card:agent:gall @@ -419,7 +421,7 @@ rak [[paused=| her rem *aeon] next=~ rein:(fall got *arak)] == ~> %slog.0^leaf/"kiln: beginning install into {here}" - (emit find:pass) + (emit listen:pass find:pass) :: +reset: resync after failure :: ++ reset @@ -582,6 +584,7 @@ %find (take-find syn) %sync (take-sync syn) %download (take-download syn) + %listen (take-listen syn) %merge-main (take-merge-main syn) %merge-kids (take-merge-kids syn) == @@ -688,6 +691,24 @@ (emil ~[merge-main sync-ud]:pass) -- :: + ++ take-listen + |= syn=sign-arvo + ^+ vats + ?> ?=([@ %writ ~ *] syn) + =. vats (emit listen:pass) + take-commit + :: + ++ take-commit + ^+ vats + ~> %slog.0^leaf/"kiln: commit detected at {here}" + =. vats (emit (diff:give %commit loc rak)) + =? vats liv.rein.rak + (update-running-apps (get-apps-diff our loc now rein.rak)) + ?. =(%base loc) + vats + ~> %slog.0^leaf/"kiln: merging %base into %kids at {<[- +]:weft:(head next.rak)>}" + (emit merge-kids:pass) + :: ++ take-merge-main |= syn=sign-arvo ^+ vats @@ -702,14 +723,7 @@ %- (slog leaf/- p.p.syn) =. vats (emit (diff:give %merge-fail loc rak p.p.syn)) vats - ~> %slog.0^leaf/"kiln: merge into {here} succeeded" - =. vats (emit (diff:give %merge loc rak)) - =? vats liv.rein.rak - (update-running-apps (get-apps-diff our loc now rein.rak)) - ?. =(%base loc) - vats - ~> %slog.0^leaf/"kiln: bumping {}" :: TODO print next - (emit merge-kids:pass) + take-commit :: ++ take-merge-kids |= syn=sign-arvo diff --git a/pkg/base-dev/sur/hood.hoon b/pkg/base-dev/sur/hood.hoon index 6de54e571..5ee46f3a2 100644 --- a/pkg/base-dev/sur/hood.hoon +++ b/pkg/base-dev/sur/hood.hoon @@ -7,7 +7,7 @@ +$ diff $% [%block =desk =arak =weft blockers=(set desk)] [%reset =desk =arak] - [%merge =desk =arak] + [%commit =desk =arak] [%merge-sunk =desk =arak =tang] [%merge-fail =desk =arak =tang] [%suspend =desk =arak]