diff options
author | Eduardo Julian | 2021-09-12 00:07:08 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-12 00:07:08 -0400 |
commit | dda05bca0956af5e5b3875c4cc36e61aa04772e4 (patch) | |
tree | 0f8b27697d58ab5c8e41aba7c7c9f769d3800767 /stdlib/source/program/aedifex/dependency | |
parent | d48270f43c404ba19ca04da2553455ecaaf2caba (diff) |
Made the "#" character great again!
Diffstat (limited to 'stdlib/source/program/aedifex/dependency')
-rw-r--r-- | stdlib/source/program/aedifex/dependency/deployment.lux | 64 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/dependency/resolution.lux | 76 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/dependency/status.lux | 2 |
3 files changed, 71 insertions, 71 deletions
diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux index 84170965c..60fcd57d1 100644 --- a/stdlib/source/program/aedifex/dependency/deployment.lux +++ b/stdlib/source/program/aedifex/dependency/deployment.lux @@ -53,18 +53,18 @@ (do [! (try.with async.monad)] [_ (\ repository upload artifact data)] (case status - #///dependency/status.Unverified + {///dependency/status.#Unverified} (in []) - {#///dependency/status.Partial partial} + {///dependency/status.#Partial partial} (case partial - {#.Left sha-1} + {.#Left sha-1} (deploy_hash ///hash.sha-1_codec ///artifact/extension.sha-1 sha-1) - {#.Right md5} + {.#Right md5} (deploy_hash ///hash.md5_codec ///artifact/extension.md5 md5)) - {#///dependency/status.Verified sha-1 md5} + {///dependency/status.#Verified sha-1 md5} (do ! [_ (deploy_hash ///hash.sha-1_codec ///artifact/extension.sha-1 sha-1)] (deploy_hash ///hash.md5_codec ///artifact/extension.md5 md5)))))) @@ -75,15 +75,15 @@ <md5> (format type ///artifact/extension.md5)] (list& type (case status - #///dependency/status.Unverified + {///dependency/status.#Unverified} (list) - {#///dependency/status.Partial partial} + {///dependency/status.#Partial partial} (list (case partial - {#.Left _} <sha-1> - {#.Right _} <md5>)) + {.#Left _} <sha-1> + {.#Right _} <md5>)) - {#///dependency/status.Verified _} + {///dependency/status.#Verified _} (list <sha-1> <md5>))))) (def: (update_snapshot [artifact type] now snapshot) @@ -91,39 +91,39 @@ (do try.monad [now (: (Try ///artifact/time.Time) (///artifact/time.of_instant now)) - .let [version_template (value@ #///artifact.version artifact) + .let [version_template (value@ ///artifact.#version artifact) snapshot (|> snapshot - (revised@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] + (revised@ [///metadata/snapshot.#versioning ///artifact/versioning.#snapshot] (function (_ snapshot) (case snapshot - #///artifact/snapshot.Local - #///artifact/snapshot.Local + {///artifact/snapshot.#Local} + {///artifact/snapshot.#Local} - {#///artifact/snapshot.Remote [_ build]} - {#///artifact/snapshot.Remote [now (++ build)]}))) - (with@ [#///metadata/snapshot.versioning #///artifact/versioning.last_updated] now)) - versioning_snapshot (value@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] snapshot)]] + {///artifact/snapshot.#Remote [_ build]} + {///artifact/snapshot.#Remote [now (++ build)]}))) + (with@ [///metadata/snapshot.#versioning ///artifact/versioning.#last_updated] now)) + versioning_snapshot (value@ [///metadata/snapshot.#versioning ///artifact/versioning.#snapshot] snapshot)]] (in (|> snapshot - (with@ [#///metadata/snapshot.versioning #///artifact/versioning.versions] - (list [#///artifact/snapshot/version.extension type - #///artifact/snapshot/version.value (///artifact/snapshot/version/value.format - [#///artifact/snapshot/version/value.version version_template - #///artifact/snapshot/version/value.snapshot versioning_snapshot]) - #///artifact/snapshot/version.updated now])) - ... (with@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] - ... (list\composite (..artifacts type (product.right (value@ #///package.library package))) - ... (..artifacts ///artifact/type.pom (product.right (value@ #///package.pom package))))) + (with@ [///metadata/snapshot.#versioning ///artifact/versioning.#versions] + (list [///artifact/snapshot/version.#extension type + ///artifact/snapshot/version.#value (///artifact/snapshot/version/value.format + [///artifact/snapshot/version/value.#version version_template + ///artifact/snapshot/version/value.#snapshot versioning_snapshot]) + ///artifact/snapshot/version.#updated now])) + ... (with@ [///metadata/snapshot.#versioning ///artifact/versioning.#snapshot] + ... (list\composite (..artifacts type (product.right (value@ ///package.#library package))) + ... (..artifacts ///artifact/type.pom (product.right (value@ ///package.#pom package))))) )))) (def: .public (one repository [artifact type] package) (-> (Repository Async) Dependency Package (Async (Try Artifact))) (do [! async.monad] [now (async.future instant.now) - .let [version_template (value@ #///artifact.version artifact)]] + .let [version_template (value@ ///artifact.#version artifact)]] (do (try.with !) - [_ (with_status repository version_template [artifact type] (value@ #///package.library package)) + [_ (with_status repository version_template [artifact type] (value@ ///package.#library package)) - _ (let [[pom pom_data status] (value@ #///package.pom package)] + _ (let [[pom pom_data status] (value@ ///package.#pom package)] (with_status repository version_template [artifact ///artifact/type.pom] @@ -135,8 +135,8 @@ _ (///metadata/snapshot.write repository artifact snapshot) project (///metadata/artifact.read repository artifact) _ (|> project - (with@ #///metadata/artifact.versions (list version_template)) - (with@ #///metadata/artifact.last_updated now) + (with@ ///metadata/artifact.#versions (list version_template)) + (with@ ///metadata/artifact.#last_updated now) (///metadata/artifact.write repository artifact))] (in artifact)))) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 3c8241595..12848cb58 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -85,7 +85,7 @@ (do async.monad [?actual (\ repository download (///repository/remote.uri version_template artifact extension))] (case ?actual - {#try.Success actual} + {try.#Success actual} (in (do [! try.monad] [output (\ ! each (for [@.old (|>> (:as java/lang/String) java/lang/String::trim @@ -99,10 +99,10 @@ (\ codec decoded)) _ (exception.assertion exception [artifact extension output] (\ ///hash.equivalence = (hash library) actual))] - (in {#.Some actual}))) + (in {.#Some actual}))) - {#try.Failure error} - (in {#try.Success #.None})))) + {try.#Failure error} + (in {try.#Success {.#None}})))) (def: (hashed repository version_template artifact extension) (-> (Repository Async) Version Artifact Extension (Async (Try [Binary Status]))) @@ -115,17 +115,17 @@ repository version_template artifact (format extension ///artifact/extension.md5) ///hash.md5 ///hash.md5_codec ..md5_does_not_match)] (in [data (case [?sha-1 ?md5] - [{#.Some sha-1} {#.Some md5}] - {#//status.Verified sha-1 md5} + [{.#Some sha-1} {.#Some md5}] + {//status.#Verified sha-1 md5} - [{#.Some sha-1} #.None] - {#//status.Partial {#.Left sha-1}} + [{.#Some sha-1} {.#None}] + {//status.#Partial {.#Left sha-1}} - [#.None {#.Some md5}] - {#//status.Partial {#.Right md5}} + [{.#None} {.#Some md5}] + {//status.#Partial {.#Right md5}} - [#.None #.None] - #//status.Unverified)]))) + [{.#None} {.#None}] + {//status.#Unverified})]))) (def: .public (one repository dependency) (-> (Repository Async) Dependency (Async (Try Package))) @@ -133,10 +133,10 @@ extension (///artifact/extension.extension type)] (do (try.with async.monad) [snapshot (///metadata/snapshot.read repository artifact) - .let [version_template (value@ [#///metadata/snapshot.artifact #///artifact.version] snapshot) - artifact_version (value.format [#value.version version_template - #value.snapshot (value@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] snapshot)]) - artifact (with@ #///artifact.version artifact_version artifact)] + .let [version_template (value@ [///metadata/snapshot.#artifact ///artifact.#version] snapshot) + artifact_version (value.format [value.#version version_template + value.#snapshot (value@ [///metadata/snapshot.#versioning ///artifact/versioning.#snapshot] snapshot)]) + artifact (with@ ///artifact.#version artifact_version artifact)] [pom_data pom_status] (..hashed repository version_template artifact ///artifact/extension.pom) library_&_status (..hashed repository version_template artifact extension)] (\ async.monad in @@ -144,9 +144,9 @@ [pom (\ utf8.codec decoded pom_data) pom (\ xml.codec decoded pom) profile (<xml>.result ///pom.parser (list pom))] - (in [#///package.origin {#///repository/origin.Remote ""} - #///package.library library_&_status - #///package.pom [pom pom_data pom_status]])))))) + (in [///package.#origin {///repository/origin.#Remote ""} + ///package.#library library_&_status + ///package.#pom [pom pom_data pom_status]])))))) (type: .public Resolution (Dictionary Dependency Package)) @@ -161,8 +161,8 @@ (exception: .public (cannot_resolve [dependency Dependency]) (exception.report - ["Artifact" (%.text (///artifact.format (value@ #//.artifact dependency)))] - ["Type" (%.text (value@ #//.type dependency))])) + ["Artifact" (%.text (///artifact.format (value@ //.#artifact dependency)))] + ["Type" (%.text (value@ //.#type dependency))])) (template [<sigil> <name> <doing> <at>] [(def: (<name> console repository artifact) @@ -182,24 +182,24 @@ (def: .public (any console repositories dependency) (-> (Console Async) (List (Repository Async)) Dependency (Async (Try Package))) (case repositories - #.End + {.#End} (|> dependency (exception.except ..cannot_resolve) (\ async.monad in)) - {#.Item repository alternatives} + {.#Item repository alternatives} (do [! async.monad] - [_ (..announce_fetching console repository (value@ #//.artifact dependency)) + [_ (..announce_fetching console repository (value@ //.#artifact dependency)) outcome (..one repository dependency)] (case outcome - {#try.Success package} + {try.#Success package} (do ! - [_ (..announce_success console repository (value@ #//.artifact dependency))] + [_ (..announce_success console repository (value@ //.#artifact dependency))] (in outcome)) - {#try.Failure error} + {try.#Failure error} (do ! - [_ (..announce_failure console repository (value@ #//.artifact dependency))] + [_ (..announce_failure console repository (value@ //.#artifact dependency))] (any console alternatives dependency)))))) (def: .public (all console repositories new_repository dependencies resolution) @@ -213,12 +213,12 @@ dependencies dependencies resolution resolution] (case dependencies - #.End + {.#End} (\ async.monad in [successes failures resolution]) - {#.Item head tail} - (case (value@ [#//.artifact #///artifact.version] head) + {.#Item head tail} + (case (value@ [//.#artifact ///artifact.#version] head) ... Skip if there is no version "" (recur repositories successes @@ -227,13 +227,13 @@ resolution) _ (do [! async.monad] [?package (case (dictionary.value head resolution) - {#.Some package} - (in {#try.Success package}) + {.#Some package} + (in {try.#Success package}) - #.None + {.#None} (..any console repositories head))] (case ?package - {#try.Success package} + {try.#Success package} (do ! [.let [redundant? (: (Predicate Dependency) (predicate.or (\ //.equivalence = head) @@ -252,15 +252,15 @@ ... sub_repositories (list\composite repositories package_repositories) ]] (recur repositories - {#.Item head successes} + {.#Item head successes} failures (set.list (set.union (set.of_list //.hash tail) (set.of_list //.hash sub_dependencies))) (dictionary.has head package resolution))) - {#try.Failure error} + {try.#Failure error} (recur repositories successes - {#.Item head failures} + {.#Item head failures} tail resolution))))))) diff --git a/stdlib/source/program/aedifex/dependency/status.lux b/stdlib/source/program/aedifex/dependency/status.lux index 150d3120b..0be99a0fe 100644 --- a/stdlib/source/program/aedifex/dependency/status.lux +++ b/stdlib/source/program/aedifex/dependency/status.lux @@ -12,7 +12,7 @@ (type: .public Status (Variant - #Unverified + {#Unverified} {#Partial (Either (Hash SHA-1) (Hash MD5))} {#Verified (Hash SHA-1) (Hash MD5)})) |