aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command
diff options
context:
space:
mode:
authorEduardo Julian2021-07-02 03:11:36 -0400
committerEduardo Julian2021-07-02 03:11:36 -0400
commit5cf4efa861075f8276f43a2516f5beacaf610b44 (patch)
treee21cf528d960c29d22cbc7e41180fa09e62f16d6 /stdlib/source/program/aedifex/command
parent744ee69630de59ca3ba660b0aab6361cd17ce1b4 (diff)
No longer employing the capabilities model on the lux/world/* modules.
Capabilities should be opt-in, but using them in the standard library makes them mandatory.
Diffstat (limited to 'stdlib/source/program/aedifex/command')
-rw-r--r--stdlib/source/program/aedifex/command/auto.lux10
-rw-r--r--stdlib/source/program/aedifex/command/build.lux29
-rw-r--r--stdlib/source/program/aedifex/command/clean.lux12
-rw-r--r--stdlib/source/program/aedifex/command/install.lux4
-rw-r--r--stdlib/source/program/aedifex/command/pom.lux4
-rw-r--r--stdlib/source/program/aedifex/command/test.lux15
6 files changed, 30 insertions, 44 deletions
diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux
index f74d3069a..5f3d95631 100644
--- a/stdlib/source/program/aedifex/command/auto.lux
+++ b/stdlib/source/program/aedifex/command/auto.lux
@@ -5,9 +5,7 @@
[control
["." try (#+ Try)]
[concurrency
- ["." promise (#+ Promise)]]
- [security
- ["!" capability]]]
+ ["." promise (#+ Promise)]]]
[data
[collection
["." list]
@@ -29,14 +27,14 @@
(def: (targets fs path)
(-> (file.System Promise) Path (Promise (List Path)))
(do {! promise.monad}
- [?root (!.use (\ fs directory) [path])]
+ [?root (\ fs directory [path])]
(case ?root
(#try.Success root)
(loop [root root]
(do !
[subs (\ ! map (|>> (try.default (list)))
- (!.use (\ root directories) []))]
- (\ ! map (|>> list.concat (list& (!.use (\ root scope) [])))
+ (\ root directories []))]
+ (\ ! map (|>> list.concat (list& (\ root scope)))
(monad.map ! recur subs))))
(#try.Failure error)
diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux
index 6d61475d0..572ebf0f0 100644
--- a/stdlib/source/program/aedifex/command/build.lux
+++ b/stdlib/source/program/aedifex/command/build.lux
@@ -7,9 +7,7 @@
["." exception (#+ exception:)]
["." io (#+ IO)]
[concurrency
- ["." promise (#+ Promise) ("#\." monad)]]
- [security
- ["!" capability]]]
+ ["." promise (#+ Promise) ("#\." monad)]]]
[data
["." product]
["." maybe]
@@ -140,7 +138,7 @@
(let [[read! write!] (: [(Promise (Try Any))
(promise.Resolver (Try Any))]
(promise.promise []))
- _ (|> (!.use (\ process <capability>) [])
+ _ (|> (\ process <capability> [])
(promise.await (function (recur ?line)
(case ?line
(#try.Failure error)
@@ -156,7 +154,7 @@
(#try.Success _)
(promise.await recur
- (!.use (\ process <capability>) []))))
+ (\ process <capability> []))))
(console.write_line line console)))))
io.run)]
read!))]
@@ -188,19 +186,18 @@
/ (\ fs separator)
cache_directory (format working_directory / target)]
_ (console.write_line ..start console)
- process (!.use (\ shell execute)
- [environment
- working_directory
- command
- (list.concat (list compiler_params
- (list "build")
- (..plural "--library" (..libraries fs home resolution))
- (..plural "--source" (set.to_list (get@ #///.sources profile)))
- (..singular "--target" cache_directory)
- (..singular "--module" program_module)))])
+ process (\ shell execute [environment
+ working_directory
+ command
+ (list.concat (list compiler_params
+ (list "build")
+ (..plural "--library" (..libraries fs home resolution))
+ (..plural "--source" (set.to_list (get@ #///.sources profile)))
+ (..singular "--target" cache_directory)
+ (..singular "--module" program_module)))])
_ (..log_output! console process)
_ (..log_error! console process)
- exit (!.use (\ process await) [])
+ exit (\ process await [])
_ (console.write_line (if (i.= shell.normal exit)
..success
..failure)
diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux
index b966fe85e..142451113 100644
--- a/stdlib/source/program/aedifex/command/clean.lux
+++ b/stdlib/source/program/aedifex/command/clean.lux
@@ -5,8 +5,6 @@
[control
["." try (#+ Try)]
["." exception]
- [security
- ["!" capability]]
[concurrency
["." promise (#+ Promise)]]]
[data
@@ -24,9 +22,9 @@
(-> (Directory Promise) (Promise (Try Any)))
(do {! ///action.monad}
[nodes (: (Promise (Try (List (File Promise))))
- (!.use (\ root files) []))
+ (\ root files []))
_ (monad.map ! (function (_ node)
- (!.use (\ node delete) []))
+ (\ node delete []))
nodes)]
(wrap [])))
@@ -39,7 +37,7 @@
(do promise.monad
[#let [target (get@ #///.target profile)]
root (: (Promise (Try (Directory Promise)))
- (!.use (\ fs directory) target))]
+ (\ fs directory target))]
(case root
(#try.Success root)
(do {! ///action.monad}
@@ -47,9 +45,9 @@
(do !
[_ (..clean_files! root)
subs (: (Promise (Try (List (Directory Promise))))
- (!.use (\ root directories) []))
+ (\ root directories []))
_ (monad.map ! recur subs)]
- (!.use (\ root discard) [])))]
+ (\ root discard [])))]
(console.write_line (..success target) console))
(#try.Failure error)
diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux
index 2e5ce6d89..4b6b96e3e 100644
--- a/stdlib/source/program/aedifex/command/install.lux
+++ b/stdlib/source/program/aedifex/command/install.lux
@@ -6,9 +6,7 @@
["." try (#+ Try)]
["." exception]
[concurrency
- ["." promise (#+ Promise)]]
- [security
- ["!" capability]]]
+ ["." promise (#+ Promise)]]]
[data
[binary (#+ Binary)]
[text
diff --git a/stdlib/source/program/aedifex/command/pom.lux b/stdlib/source/program/aedifex/command/pom.lux
index 16d036718..b8a728904 100644
--- a/stdlib/source/program/aedifex/command/pom.lux
+++ b/stdlib/source/program/aedifex/command/pom.lux
@@ -4,8 +4,6 @@
[monad (#+ do)]]
[control
["." try (#+ Try)]
- [security
- ["!" capability]]
[concurrency
["." promise (#+ Promise) ("#\." monad)]]]
[data
@@ -37,6 +35,6 @@
outcome (|> pom
(\ xml.codec encode)
(\ utf8.codec encode)
- (!.use (\ file over_write)))
+ (\ file over_write))
_ (console.write_line ..success console)]
(wrap ///pom.file)))
diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux
index f3ab6c12a..e8b5a2a23 100644
--- a/stdlib/source/program/aedifex/command/test.lux
+++ b/stdlib/source/program/aedifex/command/test.lux
@@ -4,9 +4,7 @@
[monad (#+ do)]]
[control
[concurrency
- ["." promise (#+ Promise) ("#\." monad)]]
- [security
- ["!" capability]]]
+ ["." promise (#+ Promise) ("#\." monad)]]]
[data
[text
["%" format (#+ format)]]]
@@ -44,14 +42,13 @@
#let [[compiler_command compiler_parameters] (case compiler
(#//build.JVM artifact) (///runtime.java program)
(#//build.JS artifact) (///runtime.node program))]
- process (!.use (\ shell execute)
- [environment
- working_directory
- compiler_command
- compiler_parameters])
+ process (\ shell execute [environment
+ working_directory
+ compiler_command
+ compiler_parameters])
_ (//build.log_output! console process)
_ (//build.log_error! console process)
- exit (!.use (\ process await) [])
+ exit (\ process await [])
_ (console.write_line (if (i.= shell.normal exit)
..success
..failure)