From 9af671a34728b35c48bff2ba163c371dc5084946 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 10 Dec 2020 22:29:32 -0400 Subject: Render XML to text in an indented form for human readability. --- stdlib/source/program/aedifex/command/build.lux | 13 +++++++------ 1 file changed, 7 insertions(+), 6 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 8960d9c75..de8ceb991 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -101,11 +101,11 @@ _ (exception.throw ..no-available-compiler []))) -(def: (libraries fs) - (All [!] (-> (file.System !) Resolution (List Path))) +(def: (libraries fs home) + (All [!] (-> (file.System !) Path Resolution (List Path))) (|>> dictionary.keys (list.filter (|>> (get@ #///dependency.type) (text\= ///artifact/type.lux-library))) - (list\map (|>> (get@ #///dependency.artifact) (///local.path fs))))) + (list\map (|>> (get@ #///dependency.artifact) (///local.path fs home))))) (def: (singular name) (-> Text Text (List Text)) @@ -132,13 +132,14 @@ [(#.Some program-module) (#.Some target)] (do promise.monad [environment (\ program environment []) + home (\ program home []) working-directory (\ program directory [])] (do ///action.monad [[resolution compiler] (promise\wrap (..compiler resolution)) #let [[command output] (let [[compiler output] (case compiler - (#JVM artifact) [(///runtime.java (///local.path fs artifact)) + (#JVM artifact) [(///runtime.java (///local.path fs home artifact)) "program.jar"] - (#JS artifact) [(///runtime.node (///local.path fs artifact)) + (#JS artifact) [(///runtime.node (///local.path fs home artifact)) "program.js"])] [(format compiler " build") output]) / (\ fs separator) @@ -148,7 +149,7 @@ [environment working-directory command - (list.concat (list (..plural "--library" (..libraries fs resolution)) + (list.concat (list (..plural "--library" (..libraries fs home resolution)) (..plural "--source" (set.to-list (get@ #///.sources profile))) (..singular "--target" cache-directory) (..singular "--module" program-module)))]) -- cgit v1.2.3