diff options
author | Eduardo Julian | 2020-11-24 05:18:04 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-11-24 05:18:04 -0400 |
commit | c4bbfea18d995948012f45a6afda7a6e6ba56f84 (patch) | |
tree | b3c425471830788965776fd173169f084d9f6af4 /stdlib/source/program/aedifex/command | |
parent | d89d837de3475b75587a4293e094d755d2cd4626 (diff) |
Better error messages when re-using a name when making a definition.
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))) |