aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program
diff options
context:
space:
mode:
authorEduardo Julian2021-07-10 03:10:43 -0400
committerEduardo Julian2021-07-10 03:10:43 -0400
commit4610968193df10af12c91f699fec39aeb3ef703a (patch)
tree27d1578548ad49f5aefe76fb696a7af10361c9cf /stdlib/source/program
parentf3e869d0246e956399ec31a074c6c6299ff73602 (diff)
Made the "try" macro into a common one, instead of a host-specific one.
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/aedifex.lux7
-rw-r--r--stdlib/source/program/aedifex/command/deps.lux17
-rw-r--r--stdlib/source/program/aedifex/dependency/resolution.lux7
3 files changed, 22 insertions, 9 deletions
diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux
index 772f57d88..f5ec4caf2 100644
--- a/stdlib/source/program/aedifex.lux
+++ b/stdlib/source/program/aedifex.lux
@@ -17,7 +17,8 @@
[binary (#+ Binary)]
["." text
["%" format (#+ format)]
- ["." encoding]]
+ [encoding
+ ["." utf8]]]
[format
["." xml]]
[collection
@@ -77,6 +78,8 @@
[resolution (/command/deps.do! console
(/repository/local.repository program (file.async file.default))
(..repositories profile)
+ (|>> (/repository/remote.repository http.default #.None)
+ /repository.async)
profile)]
((command console program (file.async file.default) (shell.async shell.default) resolution) profile)))
@@ -172,6 +175,8 @@
(/command/deps.do! console
(/repository/local.repository program (file.async file.default))
(..repositories profile)
+ (|>> (/repository/remote.repository http.default #.None)
+ /repository.async)
profile))
(#/cli.Compilation compilation)
diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux
index 4dcc9d6e1..e4881986b 100644
--- a/stdlib/source/program/aedifex/command/deps.lux
+++ b/stdlib/source/program/aedifex/command/deps.lux
@@ -14,6 +14,7 @@
[text
["%" format]]]
[world
+ [net (#+ URL)]
[program (#+ Program)]
["." file]
["." console (#+ Console)]]]
@@ -35,12 +36,20 @@
///artifact.format
%.text))
-(def: #export (do! console local remotes profile)
- (-> (Console Promise) (Repository Promise) (List (Repository Promise)) (Command Resolution))
+(def: #export (do! console local remotes new_repository profile)
+ (-> (Console Promise) (Repository Promise) (List (Repository Promise)) (-> URL (Repository Promise)) (Command Resolution))
(do promise.monad
[#let [dependencies (set.to_list (get@ #///.dependencies profile))]
- [local_successes local_failures cache] (///dependency/resolution.all console (list local) dependencies ///dependency/resolution.empty)
- [remote_successes remote_failures resolution] (///dependency/resolution.all console remotes dependencies cache)]
+ [local_successes local_failures cache] (///dependency/resolution.all console
+ (list local)
+ new_repository
+ dependencies
+ ///dependency/resolution.empty)
+ [remote_successes remote_failures resolution] (///dependency/resolution.all console
+ remotes
+ new_repository
+ dependencies
+ cache)]
(do ///action.monad
[cached (|> (dictionary.keys cache)
(list\fold dictionary.remove resolution)
diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux
index 63c3e930d..2cbb469ab 100644
--- a/stdlib/source/program/aedifex/dependency/resolution.lux
+++ b/stdlib/source/program/aedifex/dependency/resolution.lux
@@ -196,8 +196,8 @@
[_ (..announce_failure console repository (get@ #//.artifact dependency))]
(any console alternatives dependency))))))
-(def: #export (all console repositories dependencies resolution)
- (-> (Console Promise) (List (Repository Promise)) (List Dependency) Resolution
+(def: #export (all console repositories new_repository dependencies resolution)
+ (-> (Console Promise) (List (Repository Promise)) (-> URL (Repository Promise)) (List Dependency) Resolution
(Promise [(List Dependency)
(List Dependency)
Resolution]))
@@ -237,8 +237,7 @@
///package.repositories
(try\map set.to_list)
(try.default (list))
- (list\map (|>> (///repository/remote.repository http.default #.None)
- ///repository.async))
+ (list\map new_repository)
(list\compose repositories))]
[successes failures resolution] (recur sub_repositories
(#.Cons head successes)