diff options
author | Eduardo Julian | 2021-07-12 22:51:25 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-12 22:51:25 -0400 |
commit | 86bcfadb774618defaa27bbb9361a93d288fb985 (patch) | |
tree | 48c8422b872ec21d60810a88e47f38c9583f6333 /stdlib/source/program/aedifex/command | |
parent | 86df87512966e8038d70624ab654262ce14a915c (diff) |
A bit more clarity for Licentia licenses.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/command/auto.lux | 6 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/build.lux | 20 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/test.lux | 57 |
3 files changed, 44 insertions, 39 deletions
diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index 398fb26cf..ee2ab4bbd 100644 --- a/stdlib/source/program/aedifex/command/auto.lux +++ b/stdlib/source/program/aedifex/command/auto.lux @@ -12,7 +12,7 @@ ["." set]]] [world [program (#+ Program)] - [shell (#+ Shell)] + [shell (#+ Exit Shell)] [console (#+ Console)] ["." file ["." watch (#+ Watcher)]]]] @@ -45,8 +45,8 @@ (def: #export (do! delay watcher command) (All [a] (-> Nat (Watcher Promise) - (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command a)) - (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command Any)))) + (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command [Exit a])) + (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command [Exit Any])))) (function (_ console program fs shell resolution) (function (_ profile) (with_expansions [<call> ((command console program fs shell resolution) profile)] diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 2f603dbc1..34351f636 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -23,7 +23,7 @@ [world ["." program (#+ Program)] ["." file (#+ Path)] - ["." shell (#+ Process Shell)] + ["." shell (#+ Exit Process Shell)] ["." console (#+ Console)] [net ["." uri]]]] @@ -169,7 +169,7 @@ ) (def: #export (do! console program fs shell resolution) - (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command [Compiler Path])) + (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command [Exit Compiler Path])) (function (_ profile) (let [target (get@ #///.target profile)] (case (get@ #///.program profile) @@ -186,13 +186,14 @@ #let [[[command compiler_params] output] (case compiler (^template [<tag> <runtime> <program>] [(<tag> dependency) - [(<runtime> (..path fs home dependency)) + [(///runtime.for (get@ <runtime> profile) + (..path fs home dependency)) <program>]]) - ([#JVM ///runtime.java "program.jar"] - [#JS ///runtime.node "program.js"] - [#Python ///runtime.java "program.py"] - [#Lua ///runtime.java "program.lua"] - [#Ruby ///runtime.java "program.rb"])) + ([#JVM #///.java "program.jar"] + [#JS #///.js "program.js"] + [#Python #///.java "program.py"] + [#Lua #///.java "program.lua"] + [#Ruby #///.java "program.rb"])) / (\ fs separator) cache_directory (format working_directory / target)] _ (console.write_line ..start console) @@ -212,5 +213,6 @@ ..success ..failure) console)] - (wrap [compiler + (wrap [exit + compiler (format cache_directory / output)]))))))) diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux index 0ccc0cfb2..55614ba80 100644 --- a/stdlib/source/program/aedifex/command/test.lux +++ b/stdlib/source/program/aedifex/command/test.lux @@ -14,7 +14,7 @@ [world ["." program (#+ Program)] ["." file] - ["." shell (#+ Shell)] + ["." shell (#+ Exit Shell)] ["." console (#+ Console)]]] ["." // #_ ["#." build] @@ -31,32 +31,35 @@ (def: #export failure "[TEST FAILED]") (def: #export (do! console program fs shell resolution profile) - (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command Any)) + (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command [Exit Any])) (do promise.monad [environment (program.environment promise.monad program) #let [working_directory (\ program directory)]] - (do ///action.monad - [[compiler program] (//build.do! console program fs shell resolution - (set@ #///.program (get@ #///.test profile) profile)) - _ (console.write_line ..start console) - #let [[compiler_command compiler_parameters] (case compiler - (^template [<tag> <runtime>] - [(<tag> artifact) - (<runtime> program)]) - ([#//build.JVM ///runtime.java] - [#//build.JS ///runtime.node] - [#//build.Python ///runtime.python] - [#//build.Lua ///runtime.lua] - [#//build.Ruby ///runtime.ruby]))] - process (\ shell execute [environment - working_directory - compiler_command - compiler_parameters]) - _ (//build.log_output! console process) - _ (//build.log_error! console process) - exit (\ process await []) - _ (console.write_line (if (i.= shell.normal exit) - ..success - ..failure) - console)] - (wrap [])))) + (do {! ///action.monad} + [[build_exit compiler program] (//build.do! console program fs shell resolution + (set@ #///.program (get@ #///.test profile) profile))] + (if (i.= shell.normal build_exit) + (do ! + [_ (console.write_line ..start console) + #let [[compiler_command compiler_parameters] (case compiler + (^template [<tag> <runtime>] + [(<tag> artifact) + (///runtime.for (get@ <runtime> profile) program)]) + ([#//build.JVM #///.java] + [#//build.JS #///.js] + [#//build.Python #///.python] + [#//build.Lua #///.lua] + [#//build.Ruby #///.ruby]))] + process (\ shell execute [environment + working_directory + compiler_command + compiler_parameters]) + _ (//build.log_output! console process) + _ (//build.log_error! console process) + exit (\ process await []) + _ (console.write_line (if (i.= shell.normal exit) + ..success + ..failure) + console)] + (wrap [exit []])) + (wrap [build_exit []]))))) |