aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/deps.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-11-17 20:23:53 -0400
committerEduardo Julian2020-11-17 20:23:53 -0400
commitd89d837de3475b75587a4293e094d755d2cd4626 (patch)
tree0975a487d987cfe855c4f6e87f05478346913a16 /stdlib/source/program/aedifex/command/deps.lux
parent2e5852abb1ac0ae5abdd8709238aca447f62520e (diff)
Made the syntax of ^template more consistent.
Diffstat (limited to 'stdlib/source/program/aedifex/command/deps.lux')
-rw-r--r--stdlib/source/program/aedifex/command/deps.lux37
1 files changed, 37 insertions, 0 deletions
diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux
new file mode 100644
index 000000000..91bbf0ec1
--- /dev/null
+++ b/stdlib/source/program/aedifex/command/deps.lux
@@ -0,0 +1,37 @@
+(.module:
+ [lux #*
+ [abstract
+ [monad (#+ do)]]
+ [control
+ [concurrency
+ ["." promise]]]
+ [data
+ [collection
+ ["." set (#+ Set)]
+ ["." list ("#\." functor)]]]
+ [world
+ ["." file]]]
+ ["." /// #_
+ [command (#+ Command)]
+ [artifact (#+ Artifact)]
+ ["#" profile]
+ ["#." action (#+ Action)]
+ ["#." cache]
+ ["#." repository]
+ ["#." dependency #_
+ ["#" resolution]]])
+
+(def: #export (do! profile)
+ (Command (Set Artifact))
+ (do ///action.monad
+ [cache (///cache.read-all (file.async file.default)
+ (set.to-list (get@ #///.dependencies profile))
+ ///dependency.empty)
+ resolution (///dependency.all (list\map (|>> ///repository.remote ///repository.async)
+ (set.to-list (get@ #///.repositories profile)))
+ (set.to-list (get@ #///.dependencies profile))
+ cache)
+ cached (///cache.write-all (file.async file.default)
+ resolution)
+ #let [_ (log! "Successfully resolved dependencies!")]]
+ (wrap cached)))