aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/build.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-12-03 02:09:57 -0400
committerEduardo Julian2020-12-03 02:09:57 -0400
commit0205e5146b50ab066d152fccda0fc8cef4eef852 (patch)
treeda2d89132da8f09344e26db78d0e43ca1095ee7f /stdlib/source/program/aedifex/command/build.lux
parent28c724857d76afdc40b5b036f415cc151eb66263 (diff)
Detect duplicate files coming from dependencies.
Diffstat (limited to 'stdlib/source/program/aedifex/command/build.lux')
-rw-r--r--stdlib/source/program/aedifex/command/build.lux20
1 files changed, 13 insertions, 7 deletions
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)]))))