From 9224e54bf175ebe13c3fae42f04b649413c737e7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 7 Apr 2022 03:27:59 -0400 Subject: De-sigil-ification: & --- stdlib/source/program/aedifex/command/build.lux | 63 +++++++++++++------------ 1 file changed, 34 insertions(+), 29 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 4538a2834..4ff240f96 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -143,7 +143,7 @@ (implementation: version_order (Order Version) - (def: &equivalence + (def: equivalence text.equivalence) (def: (< left right) @@ -218,7 +218,8 @@ {try.#Failure error} (if (exception.match? shell.no_more_output error) (write! {try.#Success []}) - (async.upon! write! (console.write_line error console))) + (async.upon! write! (is (Async (Try Any)) + (console.write_line error console)))) {try.#Success line} (async.upon! (function (_ outcome) @@ -229,7 +230,8 @@ {try.#Success _} (async.upon! again (# process [])))) - (console.write_line line console))))) + (is (Async (Try Any)) + (console.write_line line console)))))) io.run!)] read!))] @@ -269,9 +271,9 @@ _ (revised ///runtime.#parameters - (|>> (list& "-cp" (..jvm_class_path host_dependencies) - "--add-opens" "java.base/java.lang=ALL-UNNAMED" - "-Xss16m")) + (|>> (partial_list "-cp" (..jvm_class_path host_dependencies) + "--add-opens" "java.base/java.lang=ALL-UNNAMED" + "-Xss16m")) runtime))) (def: .public (do! console program fs shell resolution) @@ -290,26 +292,28 @@ (do ///action.monad [[resolution lux] (async#in (..lux resolution (the ///.#lux profile))) .let [host_dependencies (..host_dependencies fs home resolution) - [[command lux_params] output] (case lux - {#JVM dependency} - [(|> (the ///.#java profile) - (has ///runtime.#parameters (list "program._")) - (with_jvm_class_path {.#Item (..path fs home dependency) host_dependencies})) - "program.jar"] - - (^.template [ ] - [{ dependency} - [(|> dependency - (..path fs home) - (///runtime.for (the profile))) - ]]) - ([#JS ///.#js "program.js"] - [#Python ///.#java "program.py"] - [#Lua ///.#java "program.lua"] - [#Ruby ///.#java (file.rooted fs "program" ruby_packager.main_file)])) + [[command_environment command lux_params] output] + (case lux + {#JVM dependency} + [(|> (the ///.#java profile) + (has ///runtime.#parameters (list "program._")) + (with_jvm_class_path {.#Item (..path fs home dependency) host_dependencies})) + "program.jar"] + + (^.template [ ] + [{ dependency} + [(|> dependency + (..path fs home) + (///runtime.for (the profile))) + ]]) + ([#JS ///.#js "program.js"] + [#Python ///.#java "program.py"] + [#Lua ///.#java "program.lua"] + [#Ruby ///.#java (file.rooted fs "program" ruby_packager.main_file)])) / (# fs separator) cache_directory (format working_directory / target)] - _ (console.write_line ..start console) + _ (is (Async (Try Any)) + (console.write_line ..start console)) .let [full_parameters (list.together (list lux_params (list "build") (..plural "--library" (..libraries fs home resolution)) @@ -319,17 +323,18 @@ (..singular "--target" cache_directory) (..singular "--module" program_module) (..singular "--configuration" (configuration.format (the ///.#configuration profile)))))] - process (# shell execute [environment + process (# shell execute [(dictionary.composite command_environment environment) working_directory command full_parameters]) _ (..log_output! console process) _ (..log_error! console process) exit (# process await []) - _ (console.write_line (if (i.= shell.normal exit) - ..success - ..failure) - console)] + _ (is (Async (Try Any)) + (console.write_line (if (i.= shell.normal exit) + ..success + ..failure) + console))] (in [exit lux (format cache_directory / output)]))))))) -- cgit v1.2.3