Merge branch 'ford-turbo' of github.com:urbit/arvo into ford-turbo

This commit is contained in:
Elliot Glaysher 2018-05-09 10:19:39 -07:00
commit f84eadaa45
2 changed files with 91 additions and 1 deletions

View File

@ -56,6 +56,7 @@
test-cache-reclamation-live-promote
test-five-oh-cache-reclamation
test-reef
test-plan-direct-hoon
==
++ test-is-schematic-live
~& %test-is-schematic-live
@ -2919,6 +2920,59 @@
(expect-ford-empty ford ~nul)
==
::
++ test-plan-direct-hoon
~& %test-plan-direct-hoon
::
=/ ford *ford-gate
::
=/ =hoon (ream '`@tas`%constant')
::
=^ results1 ford
%- test-ford-call-with-comparator :*
ford
now=~1234.5.6
scry=scry-is-forbidden
::
^= call-args
:* duct=~[/plan] type=~ %make ~nul
%pin ~1234.5.6
%plan
source-path=[[~nul %desk] /bar/foo]
query-string=`coin`[%$ *dime]
zuse-version=309
structures=~
libraries=~
cranes=~
sources=[%direct hoon]~
==
::
^= comparator
|= moves=(list move:ford-gate)
^- tang
::
?> =(1 (lent moves))
?> ?=(^ moves)
?> ?=([* %give %made *] i.moves)
=/ result result.p.card.i.moves
?> ?=(%complete -.result)
?> ?=([%success %pin @da %success %plan *] +.result)
::
=/ =vase |5:+.result
::
%+ weld
%- expect-eq !>
:- &
(~(nest ut p.vase) | -:!>(*@tas))
::
%- expect-eq !>
[%constant q.vase]
==
::
;: weld
results1
(expect-ford-empty ford ~nul)
==
::
:: |utilities: helper arms
::
::+| utilities

View File

@ -2452,7 +2452,7 @@
%mute !!
%pact !!
%path !!
%plan !!
%plan (plan [source-path query-string scaffold]:schematic.build)
%reef reef
%ride (ride [formula subject]:schematic.build)
%same (same schematic.schematic.build)
@ -2590,6 +2590,42 @@
[build [%build-result %error message] accessed-builds |]
==
::
++ plan
|= [source-path=rail query-string=coin =scaffold]
^- build-receipt
:: TODO: support cranes
:: TODO: support query-string
:: TODO: support source-path
:: TODO: support indirect hoons
::
=/ hoon-stack=(list hoon)
%+ turn sources.scaffold
|= =brick ?>(?=(%direct -.brick) source.brick)
:: combine hoons into one: =~(hoon1 hoon2 ...)
:: TODO: why flop?
::
=/ combined-hoon=hoon [%tssg (flop hoon-stack)]
:: compile :combined-hoon against the kernel subject
::
=/ compile=^build [date.build [%ride combined-hoon [%reef ~]]]
::
=^ compiled accessed-builds (depend-on compile)
:: compilation blocked; produce block on sub-build
::
?~ compiled
[build [%blocks ~[compile] ~] accessed-builds |]
:: compilation failed; error out
::
?: ?=(%error -.u.compiled)
=/ message=tang
[[%leaf "%plan failed: "] message.u.compiled]
::
[build [%build-result %error message] accessed-builds |]
:: compilation succeeded: produce resulting :vase
::
=/ =vase q:(result-to-cage u.compiled)
[build [%build-result %success %plan vase] accessed-builds |]
::
++ reef
^- build-receipt
[build [%build-result %success %reef pit] ~ |]