Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
litlep-nibbyt committed Feb 3, 2025
1 parent 4e4fc6e commit dbe2ab9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
Binary file modified apps/choo/bootstrap/choo.jam
Binary file not shown.
10 changes: 8 additions & 2 deletions apps/choo/bootstrap/kernel.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
==
+$ choo-state state-1
::
++ moat (keep choo-state versioned-state)
++ moat (keep choo-state)
+$ cause
$% [%build pat=cord tex=cord directory=(list [cord cord]) arbitrary=?]
[%file %write path=@t contents=@ success=?]
Expand Down Expand Up @@ -67,14 +67,20 @@
++ load
|= old=versioned-state
^- choo-state
?+ -.old ~& >> %no-upgrade old
?~ ((soft versioned-state) old)
~& >> "choo: +load old state does not nest under versioned-state" !!
?- -.old
%0
~& >> %upgrade-0-to-1
:* %1
cached-hoon.old
*build-cache
*parse-cache
==
::
%1
~& >> %no-upgrade
old
==
::
:: +peek: external inspect
Expand Down
24 changes: 10 additions & 14 deletions apps/hoon-deps/lib/wrapper.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,18 @@
+$ input [eny=@ our=@ux now=@da cause=*]
::
++ keep
|* [inner=mold versioned=mold]
|* inner=mold
=>
|%
+$ inner-state inner
+$ load-state
$% [%0 desk-hash=(unit @uvI) internal=versioned]
==
+$ outer-state
$% [%0 desk-hash=(unit @uvI) internal=inner]
==
+$ outer-fort
$_ ^|
|_ outer-state
++ load
|~ arg=load-state
|~ arg=outer-state
**
++ peek
|~ arg=path
Expand All @@ -35,9 +32,9 @@
::
+$ fort
$_ ^|
|_ state=inner-state
|_ state=inner
++ load
|~ arg=versioned
|~ arg=inner
*inner-state
++ peek
|~ arg=path
Expand All @@ -53,14 +50,13 @@
|= hash=@uvI
=< .(desk-hash.outer `hash)
|_ outer=outer-state
+* inner-fort ~(. inner internal.outer)
++ load
|= arg=*
=/ arg ((soft load-state) arg)
?~ arg
~& >>> "+load: failed to soft state" !!
=/ new-internal (load:inner-fort internal.u.arg)
..load(internal.outer new-internal)
|= old=outer-state
?+ -.old ~&("+load: invalid old state" !!)
%0
=/ new-internal (load:inner-fort internal.old)
..load(internal.outer new-internal)
==
::
++ peek
|= arg=path
Expand Down

0 comments on commit dbe2ab9

Please sign in to comment.