From bcd68d4691e7b2f6d56e0ab92b591c14d7a26a48 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 24 Oct 2020 05:05:26 -0400 Subject: Re-named "search" to "one" and "search-all" to "all". --- stdlib/source/program/aedifex/command/build.lux | 21 +++++++++++---------- stdlib/source/program/aedifex/command/deploy.lux | 11 ++++++----- 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'stdlib/source/program/aedifex/command') diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 2c4b26aed..6a1ab93d4 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -25,7 +25,8 @@ ["#." action] ["#." command (#+ Command)] ["#." local] - ["#." dependency (#+ Dependency Resolution)] + ["#." dependency (#+ Dependency) + ["#/." resolution (#+ Resolution)]] ["#." shell] ["#." artifact (#+ Group Name Artifact) ["#/." type]]]) @@ -36,11 +37,11 @@ (def: (dependency-finder group name) (-> Group Name Finder) (|>> dictionary.entries - (list.search (function (_ [dependency package]) - (if (and (text@= group (get@ [#///dependency.artifact #///artifact.group] dependency)) - (text@= name (get@ [#///dependency.artifact #///artifact.name] dependency))) - (#.Some dependency) - #.None))))) + (list.one (function (_ [dependency package]) + (if (and (text@= group (get@ [#///dependency.artifact #///artifact.group] dependency)) + (text@= name (get@ [#///dependency.artifact #///artifact.name] dependency))) + (#.Some dependency) + #.None))))) (def: lux-group Group @@ -125,11 +126,11 @@ (do ///action.monad [cache (///local.all-cached (file.async file.system) (set.to-list (get@ #///.dependencies profile)) - ///dependency.empty) + ///dependency/resolution.empty) resolution (promise.future - (///dependency.resolve-all (set.to-list (get@ #///.repositories profile)) - (set.to-list (get@ #///.dependencies profile)) - cache)) + (///dependency/resolution.resolve-all (set.to-list (get@ #///.repositories profile)) + (set.to-list (get@ #///.dependencies profile)) + cache)) _ (///local.cache-all (file.async file.system) resolution) [resolution compiler] (promise@wrap (..compiler resolution)) diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux index b63aa2972..d7c7802b7 100644 --- a/stdlib/source/program/aedifex/command/deploy.lux +++ b/stdlib/source/program/aedifex/command/deploy.lux @@ -28,11 +28,12 @@ ["//" upload (#+ User Password)] ["#." action (#+ Action)] ["#." command (#+ Command)] - ["#." dependency] ["#." pom] ["#." hash] ["#." artifact - ["#/." type]]]) + ["#/." type]] + ["#." dependency + ["#/." resolution]]]) (exception: #export (cannot-find-repository {repository Text} {options (Dictionary Text ///dependency.Repository)}) @@ -66,9 +67,9 @@ [library (:: @ map (binary.run tar.writer) (export.library (file.async file.system) (set.to-list (get@ #/.sources profile)))) - pom (promise@wrap (///pom.project profile)) + pom (promise@wrap (///pom.write profile)) _ (deploy! ///artifact/type.pom (|> pom (:: xml.codec encode) encoding.to-utf8)) _ (deploy! ///artifact/type.lux-library library) - _ (deploy! "sha1" (///hash.data (///hash.sha1 library))) - _ (deploy! "md5" (///hash.data (///hash.md5 library)))] + _ (deploy! ///artifact/type.sha1 (///hash.data (///hash.sha1 library))) + _ (deploy! ///artifact/type.md5 (///hash.data (///hash.md5 library)))] (wrap []))))) -- cgit v1.2.3