From 0205e5146b50ab066d152fccda0fc8cef4eef852 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 3 Dec 2020 02:09:57 -0400 Subject: Detect duplicate files coming from dependencies. --- stdlib/source/program/aedifex/command/build.lux | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'stdlib/source/program/aedifex/command/build.lux') diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 85210fd36..be20d2e29 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -24,7 +24,8 @@ [world [environment (#+ Environment)] ["." file (#+ Path)] - ["." shell (#+ Shell)]]] + ["." shell (#+ Shell)] + ["." console (#+ Console)]]] ["." /// #_ ["#" profile] ["#." action] @@ -118,8 +119,12 @@ (-> Text (List Text) (List Text)) (|>> (list\map (|>> (list name))) list.concat)) -(def: #export (do! environment fs shell resolution profile) - (-> Environment (file.System Promise) (Shell Promise) Resolution (Command [Compiler Path])) +(def: #export start "[BUILD STARTED]") +(def: #export success "[BUILD ENDED]") +(def: #export failure "[BUILD FAILED]") + +(def: #export (do! console environment fs shell resolution profile) + (-> (Console Promise) Environment (file.System Promise) (Shell Promise) Resolution (Command [Compiler Path])) (case [(get@ #///.program profile) (get@ #///.target profile)] [#.None _] @@ -140,7 +145,7 @@ [(format compiler " build") output]) / (\ fs separator) cache-directory (format working-directory / target)] - #let [_ (log! "[BUILD STARTED]")] + _ (console.write-line ..start console) process (!.use (\ shell execute) [environment working-directory @@ -150,8 +155,9 @@ (..singular "--target" cache-directory) (..singular "--module" program)))]) exit (!.use (\ process await) []) - #let [_ (log! (if (i.= shell.normal exit) - "[BUILD ENDED]" - "[BUILD FAILED]"))]] + _ (console.write-line (if (i.= shell.normal exit) + ..success + ..failure) + console)] (wrap [compiler (format cache-directory / output)])))) -- cgit v1.2.3