From f29d0644f15e6548af6d015ef9bb60eb6f846329 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 9 Oct 2021 04:17:44 -0400 Subject: Fixed packaging issue. --- .../aedifex/artifact/snapshot/version/value.lux | 14 +-- stdlib/source/program/aedifex/command/build.lux | 86 +++++++-------- stdlib/source/program/aedifex/command/deps.lux | 62 +++++------ .../program/aedifex/dependency/deployment.lux | 80 +++++++------- .../program/aedifex/dependency/resolution.lux | 117 ++++++++++----------- .../source/program/aedifex/metadata/artifact.lux | 82 ++++++++------- .../source/program/aedifex/metadata/snapshot.lux | 12 +-- stdlib/source/program/aedifex/pom.lux | 61 +++++------ .../source/program/aedifex/repository/remote.lux | 6 +- 9 files changed, 261 insertions(+), 259 deletions(-) (limited to 'stdlib/source/program/aedifex') diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux index 9ce004ab5..f01c01522 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux @@ -29,16 +29,16 @@ (def: .public snapshot "SNAPSHOT") -(def: .public (format (^open "[0]")) +(def: .public (format (^open "/[0]")) (%.Format Value) - (case snapshot + (case /#snapshot {///.#Local} - version + /#version {///.#Remote stamp} - (let [(^open "[0]") stamp] + (let [(^open "/[0]") stamp] (%.format (text.replaced ..snapshot - (///time.format time) - version) + (///time.format /#time) + /#version) ..separator - (%.nat build))))) + (%.nat /#build))))) diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 8ad4c15f6..9fbc34542 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -1,46 +1,46 @@ (.using - [library - [lux "+" - ["[0]" ffi {"+" import:}] - [abstract - [order {"+" Order}] - [monad {"+" do}]] - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}] - ["[0]" io {"+" IO}] - [concurrency - ["[0]" async {"+" Async} ("[1]#[0]" monad)]]] - [data - ["[0]" product] - ["[0]" text ("[1]#[0]" order) - ["%" format {"+" format}]] - [collection - ["[0]" list ("[1]#[0]" functor mix)] - ["[0]" dictionary {"+" Dictionary}] - ["[0]" set]]] - [math - [number - ["n" nat] - ["i" int]]] - [world - ["[0]" program {"+" Program}] - ["[0]" file {"+" Path}] - ["[0]" shell {"+" Exit Process Shell}] - ["[0]" console {"+" Console}] - [net - ["[0]" uri]]]]] - ["[0]" /// "_" - ["[1]" profile] - ["[1][0]" action] - ["[1][0]" command {"+" Command}] - ["[1][0]" local] - ["[1][0]" repository] - ["[1][0]" runtime] - ["[1][0]" dependency {"+" Dependency} - ["[1]/[0]" resolution {"+" Resolution}]] - ["[1][0]" artifact {"+" Group Name Version Artifact} - ["[1]/[0]" type]]]) + [library + [lux "*" + ["[0]" ffi {"+" import:}] + [abstract + [order {"+" Order}] + [monad {"+" do}]] + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}] + ["[0]" io {"+" IO}] + [concurrency + ["[0]" async {"+" Async} ("[1]#[0]" monad)]]] + [data + ["[0]" product] + ["[0]" text ("[1]#[0]" order) + ["%" format {"+" format}]] + [collection + ["[0]" list ("[1]#[0]" functor mix)] + ["[0]" dictionary {"+" Dictionary}] + ["[0]" set]]] + [math + [number + ["n" nat] + ["i" int]]] + [world + ["[0]" program {"+" Program}] + ["[0]" file {"+" Path}] + ["[0]" shell {"+" Exit Process Shell}] + ["[0]" console {"+" Console}] + [net + ["[0]" uri]]]]] + ["[0]" /// "_" + ["[1]" profile] + ["[1][0]" action] + ["[1][0]" command {"+" Command}] + ["[1][0]" local] + ["[1][0]" repository] + ["[1][0]" runtime] + ["[1][0]" dependency {"+" Dependency} + ["[1]/[0]" resolution {"+" Resolution}]] + ["[1][0]" artifact {"+" Group Name Version Artifact} + ["[1]/[0]" type]]]) (type: Finder (-> Resolution (Maybe Dependency))) @@ -222,7 +222,7 @@ read!))] [log_output! read] - [log_error! error] + [log_error! fail] ) (import: java/lang/System diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux index a8602cd3f..4e32a73b1 100644 --- a/stdlib/source/program/aedifex/command/deps.lux +++ b/stdlib/source/program/aedifex/command/deps.lux @@ -1,35 +1,35 @@ (.using - [library - [lux "*" - [abstract - [monad {"+" do}]] - [control - ["[0]" exception] - [concurrency - ["[0]" async {"+" Async}]]] - [data - [collection - ["[0]" set {"+" Set}] - ["[0]" list ("[1]#[0]" mix)] - ["[0]" dictionary]] - [text - ["%" format]]] - [world - [net {"+" URL}] - [program {"+" Program}] - ["[0]" file] - ["[0]" console {"+" Console}]]]] - ["[0]" // "_" - ["[1][0]" clean] - ["/[1]" // "_" - [command {"+" Command}] - [repository {"+" Repository}] - ["[1]" profile] - ["[1][0]" action {"+" Action}] - ["[1][0]" artifact {"+" Artifact}] - ["[1][0]" dependency {"+" Dependency} - ["[1]/[0]" resolution {"+" Resolution}] - ["[1]/[0]" deployment]]]]) + [library + [lux "*" + [abstract + [monad {"+" do}]] + [control + ["[0]" exception] + [concurrency + ["[0]" async {"+" Async}]]] + [data + [collection + ["[0]" set {"+" Set}] + ["[0]" list ("[1]#[0]" mix)] + ["[0]" dictionary]] + [text + ["%" format]]] + [world + [net {"+" URL}] + [program {"+" Program}] + ["[0]" file] + ["[0]" console {"+" Console}]]]] + ["[0]" // "_" + ["[1][0]" clean] + ["/[1]" // "_" + [command {"+" Command}] + [repository {"+" Repository}] + ["[1]" profile] + ["[1][0]" action {"+" Action}] + ["[1][0]" artifact {"+" Artifact}] + ["[1][0]" dependency {"+" Dependency} + ["[1]/[0]" resolution {"+" Resolution}] + ["[1]/[0]" deployment]]]]) (def: format (%.Format Dependency) diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux index 318475c26..7098505d4 100644 --- a/stdlib/source/program/aedifex/dependency/deployment.lux +++ b/stdlib/source/program/aedifex/dependency/deployment.lux @@ -1,44 +1,44 @@ (.using - [library - [lux "*" - [abstract - [codec {"+" Codec}] - ["[0]" monad {"+" do}]] - [control - ["[0]" try {"+" Try}] - [concurrency - ["[0]" async {"+" Async}]]] - [data - [binary {"+" Binary}] - ["[0]" product] - [text - ["%" format {"+" format}] - [encoding - ["[0]" utf8]]] - [collection - ["[0]" dictionary] - ["[0]" set {"+" Set}] - ["[0]" list ("[1]#[0]" monoid)]]] - [time - ["[0]" instant {"+" Instant}]]]] - ["[0]" /// "_" - [repository {"+" Repository}] - ["[1][0]" hash {"+" Hash}] - ["[1][0]" package {"+" Package}] - ["[1][0]" artifact {"+" Artifact} - ["[1]/[0]" time] - ["[1]/[0]" type] - ["[1]/[0]" extension {"+" Extension}] - ["[1]/[0]" versioning] - ["[1]/[0]" snapshot - ["[1]/[0]" version - ["[1]/[0]" value]]]] - ["[1][0]" metadata "_" - ["[1]/[0]" artifact] - ["[1]/[0]" snapshot {"+" Metadata}]] - ["[1][0]" dependency {"+" Dependency} - [resolution {"+" Resolution}] - ["[1]/[0]" status {"+" Status}]]]) + [library + [lux "*" + [abstract + [codec {"+" Codec}] + ["[0]" monad {"+" do}]] + [control + ["[0]" try {"+" Try}] + [concurrency + ["[0]" async {"+" Async}]]] + [data + [binary {"+" Binary}] + ["[0]" product] + [text + ["%" format {"+" format}] + [encoding + ["[0]" utf8]]] + [collection + ["[0]" dictionary] + ["[0]" set {"+" Set}] + ["[0]" list ("[1]#[0]" monoid)]]] + [time + ["[0]" instant {"+" Instant}]]]] + ["[0]" /// "_" + [repository {"+" Repository}] + ["[1][0]" hash {"+" Hash}] + ["[1][0]" package {"+" Package}] + ["[1][0]" artifact {"+" Artifact} + ["[1]/[0]" time] + ["[1]/[0]" type] + ["[1]/[0]" extension {"+" Extension}] + ["[1]/[0]" versioning] + ["[1]/[0]" snapshot + ["[1]/[0]" version + ["[1]/[0]" value]]]] + ["[1][0]" metadata "_" + ["[1]/[0]" artifact] + ["[1]/[0]" snapshot {"+" Metadata}]] + ["[1][0]" dependency {"+" Dependency} + [resolution {"+" Resolution}] + ["[1]/[0]" status {"+" Status}]]]) (def: (with_status repository version_template [artifact type] [data status]) (-> (Repository Async) ///artifact.Version Dependency [Binary Status] (Async (Try Any))) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 4b0aee23d..ffea5d458 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -1,63 +1,62 @@ (.using - [library - [lux "*" - ["@" target] - ["[0]" debug] - ["[0]" ffi {"+" import:}] - [abstract - [codec {"+" Codec}] - [equivalence {"+" Equivalence}] - [monad {"+" do}] - ["[0]" predicate {"+" Predicate}]] - [control - ["[0]" maybe] - ["[0]" try {"+" Try} ("[1]#[0]" functor)] - ["[0]" exception {"+" Exception exception:}] - ["<>" parser - ["<[0]>" xml {"+" Parser}]] - [concurrency - ["[0]" async {"+" Async}]]] - [data - ["[0]" binary {"+" Binary}] - ["[0]" name] - ["[0]" text - ["%" format {"+" format}] - [encoding - ["[0]" utf8]]] - [format - ["[0]" xml {"+" Tag XML}]] - [collection - ["[0]" dictionary {"+" Dictionary}] - ["[0]" set] - ["[0]" list ("[1]#[0]" functor monoid)]]] - [math - [number - ["n" nat] - ["[0]" i64]]] - [world - [console {"+" Console}] - [net {"+" URL} - ["[0]" uri] - ["[0]" http "_" - ["[1]" client]]]]]] - ["[0]" // {"+" Dependency} - ["[1][0]" status {"+" Status}] - ["/[1]" // "_" - ["/" profile] - ["[1][0]" hash {"+" Hash SHA-1 MD5}] - ["[1][0]" pom] - ["[1][0]" package {"+" Package}] - ["[1][0]" artifact {"+" Version Artifact} - ["[1]/[0]" extension {"+" Extension}] - ["[1]/[0]" versioning] - ["[0]" snapshot - [version - ["[0]" value]]]] - ["[1][0]" repository {"+" Repository} - ["[1]/[0]" remote {"+" Address}] - ["[1]/[0]" origin {"+" Origin}]] - ["[1][0]" metadata - ["[1]/[0]" snapshot]]]]) + [library + [lux "*" + ["@" target] + ["[0]" debug] + ["[0]" ffi {"+" import:}] + [abstract + [codec {"+" Codec}] + [equivalence {"+" Equivalence}] + [monad {"+" do}] + ["[0]" predicate {"+" Predicate}]] + [control + ["[0]" maybe] + ["[0]" try {"+" Try} ("[1]#[0]" functor)] + ["[0]" exception {"+" Exception exception:}] + ["<>" parser + ["<[0]>" xml {"+" Parser}]] + [concurrency + ["[0]" async {"+" Async}]]] + [data + ["[0]" binary {"+" Binary}] + ["[0]" text + ["%" format {"+" format}] + [encoding + ["[0]" utf8]]] + [format + ["[0]" xml {"+" Tag XML}]] + [collection + ["[0]" dictionary {"+" Dictionary}] + ["[0]" set] + ["[0]" list ("[1]#[0]" functor monoid)]]] + [math + [number + ["n" nat] + ["[0]" i64]]] + [world + [console {"+" Console}] + [net {"+" URL} + ["[0]" uri] + ["[0]" http "_" + ["[1]" client]]]]]] + ["[0]" // {"+" Dependency} + ["[1][0]" status {"+" Status}] + ["/[1]" // "_" + ["/" profile] + ["[1][0]" hash {"+" Hash SHA-1 MD5}] + ["[1][0]" pom] + ["[1][0]" package {"+" Package}] + ["[1][0]" artifact {"+" Version Artifact} + ["[1]/[0]" extension {"+" Extension}] + ["[1]/[0]" versioning] + ["[0]" snapshot + [version + ["[0]" value]]]] + ["[1][0]" repository {"+" Repository} + ["[1]/[0]" remote {"+" Address}] + ["[1]/[0]" origin {"+" Origin}]] + ["[1][0]" metadata + ["[1]/[0]" snapshot]]]]) (template [] [(exception: .public ( [artifact Artifact diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux index cebd4a826..27448f154 100644 --- a/stdlib/source/program/aedifex/metadata/artifact.lux +++ b/stdlib/source/program/aedifex/metadata/artifact.lux @@ -1,42 +1,42 @@ (.using - [library - [lux "*" - [abstract - [monad {"+" do}] - [equivalence {"+" Equivalence}]] - [control - [pipe {"+" do>}] - ["[0]" try {"+" Try}] - ["<>" parser - ["<[0]>" xml {"+" Parser}] - ["<[0]>" text]] - [concurrency - ["[0]" async {"+" Async}]]] - [data - ["[0]" product] - ["[0]" text - ["%" format] - [encoding - ["[0]" utf8]]] - [format - ["[0]" xml {"+" XML}]] - [collection - ["[0]" list ("[1]#[0]" functor)]]] - [math - [number - ["n" nat]]] - ["[0]" time {"+" Time} - ["[0]" instant {"+" Instant}] - ["[0]" date {"+" Date}] - ["[0]" year] - ["[0]" month]] - [world - [net - ["[0]" uri {"+" URI}]]]]] - ["[0]" // - ["/[1]" // "_" - [repository {"+" Repository}] - ["[1][0]" artifact {"+" Group Name Version Artifact}]]]) + [library + [lux "*" + [abstract + [monad {"+" do}] + [equivalence {"+" Equivalence}]] + [control + [pipe {"+" do>}] + ["[0]" try {"+" Try}] + ["<>" parser + ["<[0]>" xml {"+" Parser}] + ["<[0]>" text]] + [concurrency + ["[0]" async {"+" Async}]]] + [data + ["[0]" product] + ["[0]" text + ["%" format] + [encoding + ["[0]" utf8]]] + [format + ["[0]" xml {"+" XML}]] + [collection + ["[0]" list ("[1]#[0]" functor)]]] + [math + [number + ["n" nat]]] + ["[0]" time {"+" Time} + ["[0]" instant {"+" Instant}] + ["[0]" date {"+" Date}] + ["[0]" year] + ["[0]" month]] + [world + [net + ["[0]" uri {"+" URI}]]]]] + ["[0]" // + ["/[1]" // "_" + [repository {"+" Repository}] + ["[1][0]" artifact {"+" Group Name Version Artifact}]]]) (type: .public Metadata (Record @@ -149,6 +149,8 @@ (.somewhere (..text ..)) (.somewhere (..text ..)) (<| (.node ..) + ... Handle any ignorable tag. + (<>.before (<>.some .any)) ($_ <>.and (<| .somewhere (.node ..) @@ -178,8 +180,8 @@ (do async.monad [project (# repository download (..uri artifact))] (case project - {try.#Success project} - (in (|> project + {try.#Success binary_metadata} + (in (|> binary_metadata (do> try.monad [(# utf8.codec decoded)] [(# xml.codec decoded)] diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux index 7ac0b1c0e..487b91b8e 100644 --- a/stdlib/source/program/aedifex/metadata/snapshot.lux +++ b/stdlib/source/program/aedifex/metadata/snapshot.lux @@ -69,15 +69,15 @@ [version_format Version .. (|>)] ) -(def: .public (format (^open "[0]")) +(def: .public (format (^open "/[0]")) (-> Metadata XML) - (let [(^open "[0]") #artifact] + (let [(^open "//[0]") /#artifact] {xml.#Node .. xml.attributes - (list (..group_format group) - (..name_format name) - (..version_format version) - (///artifact/versioning.format #versioning))})) + (list (..group_format //#group) + (..name_format //#name) + (..version_format //#version) + (///artifact/versioning.format /#versioning))})) (def: (text tag) (-> xml.Tag (Parser Text)) diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index d1294987b..26dd35348 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -1,33 +1,34 @@ (.using - [library - [lux "*" - [abstract - [monad {"+" do}]] - [control - [pipe {"+" case>}] - ["[0]" maybe ("[1]#[0]" functor)] - ["[0]" try {"+" Try}] - ["[0]" exception] - ["<>" parser - ["<[0]>" xml {"+" Parser}]]] - [data - ["[0]" name] - ["[0]" text] - [format - ["_" xml {"+" Tag XML}]] - [collection - ["[0]" list ("[1]#[0]" monoid functor mix)] - ["[0]" set] - ["[0]" dictionary]]] - [world - ["[0]" file]]]] - ["[0]" // "_" - ["/" profile] - ["[1][0]" dependency {"+" Dependency}] - [repository - [remote {"+" Address}]] - ["[1][0]" artifact {"+" Artifact} - ["[1]/[0]" type]]]) + [library + [lux "*" + [abstract + [monad {"+" do}]] + [control + [pipe {"+" case>}] + ["[0]" maybe ("[1]#[0]" functor)] + ["[0]" try {"+" Try}] + ["[0]" exception] + ["<>" parser + ["<[0]>" xml {"+" Parser}]]] + [data + ["[0]" text] + [format + ["_" xml {"+" Tag XML}]] + [collection + ["[0]" list ("[1]#[0]" monoid functor mix)] + ["[0]" set] + ["[0]" dictionary]]] + [meta + ["[0]" symbol]] + [world + ["[0]" file]]]] + ["[0]" // "_" + ["/" profile] + ["[1][0]" dependency {"+" Dependency}] + [repository + [remote {"+" Address}]] + ["[1][0]" artifact {"+" Artifact} + ["[1]/[0]" type]]]) ... https://maven.apache.org/pom.html @@ -165,7 +166,7 @@ (def: (dependency_parser own_version parent_version) (-> Text Text (Parser Dependency)) (do [! <>.monad] - [properties (# ! each (dictionary.of_list name.hash) + [properties (# ! each (dictionary.of_list symbol.hash) (<| (.node ["" ..dependency_tag]) (<>.some ..property_parser)))] (<| <>.lifted diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux index 32851902f..9e50e71a6 100644 --- a/stdlib/source/program/aedifex/repository/remote.lux +++ b/stdlib/source/program/aedifex/repository/remote.lux @@ -69,11 +69,11 @@ http))] (case status (^ (static http/status.ok)) - (# ! each product.right ((value@ #@http.body message) {.#None})) + (# ! each product.right ((value@ @http.#body message) {.#None})) _ (do ! - [_ ((value@ #@http.body message) {.#Some 0})] + [_ ((value@ @http.#body message) {.#Some 0})] (# io.monad in (exception.except ..download_failure [(format address uri) status])))))) (def: (upload uri content) @@ -89,7 +89,7 @@ ..base_headers))) {.#Some content} http)) - _ ((value@ #@http.body message) {.#Some 0})] + _ ((value@ @http.#body message) {.#Some 0})] (case status (^ (static http/status.created)) (in []) -- cgit v1.2.3