Execute /!mark/ in scaffolds

This commit is contained in:
Elliot Glaysher 2018-05-23 14:20:49 -07:00
parent 0e1a2686eb
commit a80123dac6
2 changed files with 99 additions and 4 deletions

View File

@ -92,6 +92,7 @@
test-core-fsbr
test-core-fsbr-out-of-options
test-plan-fszp-as-noun
test-core-fszp-as-mark
test-core-fscl-fszp
test-core-fscm
test-plan-fsbc
@ -4560,6 +4561,83 @@
(expect-ford-empty ford ~nul)
==
::
++ test-core-fszp-as-mark
:- `tank`leaf+"test-core-fszp-as-mark"
::
::
=/ ford *ford-gate
::
=/ hoon-src-type=type [%atom %$ ~]
=/ scry-results=(map [term beam] cage)
%- my :~
:- [%cx [[~nul %home %da ~1234.5.6] /hoon/program/gen]]
:- %hoon
:- hoon-src-type
'''
/= data /: /===/lib/other
/!somemark/
data
'''
::
:- [%cx [[~nul %home %da ~1234.5.6] /hoon/somemark/mar]]
:- %hoon
:- hoon-src-type
'''
|_ [word=tape num=@]
++ grab
|%
+= noun [tape @]
--
--
'''
::
:- [%cx [[~nul %home %da ~1234.5.6] /hoon/other/lib]]
:- %hoon
:- hoon-src-type
'''
["five" 5]
'''
==
::
=^ results1 ford
%- test-ford-call-with-comparator :*
ford
now=~1234.5.6
scry=(scry-with-results scry-results)
::
^= call-args
:* duct=~[/path] type=~ %make ~nul
%pin ~1234.5.6
%core [[~nul %home] /hoon/program/gen]
==
::
^= comparator
|= moves=(list move:ford-gate)
::
?> =(1 (lent moves))
?> ?=(^ moves)
?> ?=([* %give %made @da %complete %success %pin *] i.moves)
=/ result result.p.card.i.moves
=/ pin-result build-result.result
?> ?=([%success %core *] build-result.pin-result)
::
=/ =vase vase.build-result.pin-result
::
%+ weld
%- expect-eq !>
:- ["five" 5]
q.vase
::
%- expect-eq !>
:- &
(~(nest ut p.vase) | -:!>(["five" 5]))
==
::
;: weld
results1
(expect-ford-empty ford ~nul)
==
::
++ test-core-fscl-fszp
:- `tank`leaf+"test-core-fscl-fszp"
::

View File

@ -3819,9 +3819,6 @@
++ run-fszp
|= =mark
^- compose-cranes
:: TODO: We'll need to allow other marks in time.
::
?> =(%noun mark)
::
=/ hoon-path=rail
=, path-to-render
@ -3844,8 +3841,28 @@
?: ?=([~ %error *] plan-result)
[[%error [leaf+"/! failed: " message.u.plan-result]] ..run-crane]
?> ?=([~ %success %plan *] plan-result)
:: if :mark is %noun, don't perform mark translation; just return
::
:: If we were to verify the product type with %noun, this would
:: cast to *, which would overwrite :vase.u.plan-result's actual
:: product type
::
?: =(%noun mark)
[[%subject vase.u.plan-result] ..run-crane]
::
=/ vale-build=^build
:- date.build
[%vale disc.source-rail.scaffold mark q.vase.u.plan-result]
=^ vale-result accessed-builds (depend-on vale-build)
?~ vale-result
[[%block [vale-build]~] ..run-crane]
?: ?=([~ %error *] vale-result)
[[%error [leaf+"/! failed: " message.u.vale-result]] ..run-crane]
?> ?=([~ %success %vale *] vale-result)
:: TODO: Right now, we're converting to a mark, but then stripping
:: the mark off the front. This is almost certainly wrong long term.
::
[[%subject q.cage.u.vale-result] ..run-crane]
--
:: +gather-path-builds: produce %path builds to resolve import paths
::