From 772f621c19408c711c1e587668a52a8cfeeea418 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 12 Aug 2022 22:26:57 -0400 Subject: Fixes for Aedifex tests. --- .../program/aedifex/command/deploy/release.lux | 9 +++-- stdlib/source/program/aedifex/format.lux | 39 +++++++++++++--------- stdlib/source/program/aedifex/hash.lux | 2 +- stdlib/source/program/aedifex/parser.lux | 2 +- stdlib/source/program/aedifex/profile.lux | 5 ++- stdlib/source/program/aedifex/project.lux | 2 +- 6 files changed, 38 insertions(+), 21 deletions(-) (limited to 'stdlib/source/program') diff --git a/stdlib/source/program/aedifex/command/deploy/release.lux b/stdlib/source/program/aedifex/command/deploy/release.lux index 88303069a..5a2496648 100644 --- a/stdlib/source/program/aedifex/command/deploy/release.lux +++ b/stdlib/source/program/aedifex/command/deploy/release.lux @@ -97,6 +97,7 @@ [pom ////artifact/extension.pom] [tar ////artifact/extension.lux_library] [jar ////artifact/extension.jvm_library] + [sha-1 ////artifact/extension.sha-1] [md5 ////artifact/extension.md5] ) @@ -142,6 +143,11 @@ (at ////hash.md5_codec encoded) (at utf8.codec encoded) (at remote upload (..md5 artifact))) + _ (|> it + ////hash.sha-1 + (at ////hash.sha-1_codec encoded) + (at utf8.codec encoded) + (at remote upload (..sha-1 artifact))) _ (..release_unsigned_artifact! local remote signature)] (in []))) @@ -150,8 +156,7 @@ (do [! ////action.monad] [_ (///install.do! console fs local profile) _ (install_dummies! environment local fs artifact) - .let [working_directory (at environment directory) - @root (////repository/local.root environment fs) + .let [@root (////repository/local.root environment fs) $bundle (////artifact.bundle (the ////artifact.#version artifact) artifact) / (at fs separator) @local (%.format @root / $bundle)] diff --git a/stdlib/source/program/aedifex/format.lux b/stdlib/source/program/aedifex/format.lux index 594b91014..771bcc9de 100644 --- a/stdlib/source/program/aedifex/format.lux +++ b/stdlib/source/program/aedifex/format.lux @@ -28,31 +28,31 @@ (def (license [name url type]) (Format /.License) - (`' [#name (, (code.text name)) - #url (, (code.text url)) - #type (, (when type - {/.#Repo} - (' "repo") + (`' ["name" (, (code.text name)) + "url" (, (code.text url)) + "type" (, (when type + {/.#Repo} + (' "repo") - {/.#Manual} - (' "manual")))])) + {/.#Manual} + (' "manual")))])) (def (organization [name url]) (Format /.Organization) - (`' [#name (, (code.text name)) - #url (, (code.text url))])) + (`' ["name" (, (code.text name)) + "url" (, (code.text url))])) (def (developer [name url organization]) (Format /.Developer) (when organization {.#None} - (`' [#name (, (code.text name)) - #url (, (code.text url))]) + (`' ["name" (, (code.text name)) + "url" (, (code.text url))]) {.#Some value} - (`' [#name (, (code.text name)) - #url (, (code.text url)) - #organization (, (..organization value))]))) + (`' ["name" (, (code.text name)) + "url" (, (code.text url)) + "organization" (, (..organization value))]))) (def contributor (Format /.Contributor) @@ -156,10 +156,18 @@ (` [(, (code.symbol definition)) (,* (list#each code.text parameters))])) +(def configuration + (Format /.Configuration) + (|>> (list#each (function (_ [setting value]) + (list (code.text setting) + (code.text value)))) + list#conjoint + code.tuple)) + (def .public lux_compiler_label "lux") -(def (profile value) +(def .public (profile value) (Format /.Profile) (`` (|> ..empty (..on_list "parents" (the /.#parents value) code.text) @@ -174,6 +182,7 @@ (..on_maybe "program" (the /.#program value) code.symbol) (..on_maybe "test" (the /.#test value) code.symbol) (..on_dictionary "deploy_repositories" (the /.#deploy_repositories value) code.text code.text) + (dictionary.has "configuration" (..configuration (the /.#configuration value))) (,, (with_template [] [(dictionary.has (template.text []) (..runtime (the value)))] diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index 64e9784d3..a83752014 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -8,7 +8,7 @@ [monad (.only do)]] [control ["[0]" try (.only Try)] - ["[0]" exception (.only exception)]] + ["[0]" exception (.only Exception)]] [data ["[0]" binary (.only Binary)] ["[0]" text (.only) diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux index 0327a4cd9..6e64f5bf2 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -288,5 +288,5 @@ (Parser Project) (at <>.monad each (dictionary.of_list text.hash) - (.tuple (<>.many (<>.and .text + (.tuple (<>.some (<>.and .text ..profile))))) diff --git a/stdlib/source/program/aedifex/profile.lux b/stdlib/source/program/aedifex/profile.lux index 2d9d41b4c..e887160b5 100644 --- a/stdlib/source/program/aedifex/profile.lux +++ b/stdlib/source/program/aedifex/profile.lux @@ -164,6 +164,9 @@ Name "") +(type .public Configuration + (property.List Text)) + (type .public Profile (Record [#parents (List Name) @@ -178,7 +181,7 @@ #program (Maybe Symbol) #test (Maybe Symbol) #deploy_repositories (Dictionary Text Address) - #configuration (property.List Text) + #configuration Configuration #java Runtime #js Runtime #python Runtime diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index 9d0a00f43..d35873c71 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -7,7 +7,7 @@ ["[0]" monad (.only do)]] [control ["[0]" try (.only Try)] - ["[0]" exception (.only exception)]] + ["[0]" exception (.only Exception)]] [data ["[0]" text (.only) ["%" \\format (.only format)]] -- cgit v1.2.3