diff options
Diffstat (limited to 'stdlib/source/program/aedifex/command')
-rw-r--r-- | stdlib/source/program/aedifex/command/deps.lux | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux index 91bbf0ec1..bc4d88f6c 100644 --- a/stdlib/source/program/aedifex/command/deps.lux +++ b/stdlib/source/program/aedifex/command/deps.lux @@ -4,34 +4,28 @@ [monad (#+ do)]] [control [concurrency - ["." promise]]] + ["." promise (#+ Promise)]]] [data [collection - ["." set (#+ Set)] - ["." list ("#\." functor)]]] + ["." set (#+ Set)]]] [world ["." file]]] ["." /// #_ [command (#+ Command)] [artifact (#+ Artifact)] + [repository (#+ Repository)] ["#" profile] ["#." action (#+ Action)] ["#." cache] - ["#." repository] ["#." dependency #_ - ["#" resolution]]]) + ["#/." resolution]]]) -(def: #export (do! profile) - (Command (Set Artifact)) +(def: #export (do! fs repositories profile) + (-> (file.System Promise) (List (Repository Promise)) (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 [dependencies (set.to-list (get@ #///.dependencies profile))] + cache (///cache.read-all fs dependencies ///dependency/resolution.empty) + resolution (///dependency/resolution.all repositories dependencies cache) + cached (///cache.write-all fs resolution) #let [_ (log! "Successfully resolved dependencies!")]] (wrap cached))) |