aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program')
-rw-r--r--stdlib/source/program/aedifex/artifact.lux23
-rw-r--r--stdlib/source/program/aedifex/command/deps.lux23
-rw-r--r--stdlib/source/program/aedifex/dependency.lux20
-rw-r--r--stdlib/source/program/aedifex/dependency/resolution.lux4
-rw-r--r--stdlib/source/program/aedifex/metadata.lux4
-rw-r--r--stdlib/source/program/aedifex/metadata/snapshot.lux29
-rw-r--r--stdlib/source/program/aedifex/parser.lux68
-rw-r--r--stdlib/source/program/compositor.lux4
8 files changed, 112 insertions, 63 deletions
diff --git a/stdlib/source/program/aedifex/artifact.lux b/stdlib/source/program/aedifex/artifact.lux
index 9e87988ea..e5d37f7bb 100644
--- a/stdlib/source/program/aedifex/artifact.lux
+++ b/stdlib/source/program/aedifex/artifact.lux
@@ -2,10 +2,11 @@
[lux (#- Name)
[abstract
[equivalence (#+ Equivalence)]
+ [order (#+ Order)]
[hash (#+ Hash)]]
[data
["." product]
- ["." text
+ ["." text ("#\." order)
["%" format (#+ Format)]]
[collection
["." list ("#\." monoid)]]]
@@ -40,6 +41,26 @@
(Equivalence Artifact)
(\ ..hash &equivalence))
+(implementation: #export order
+ (Order Artifact)
+
+ (def: &equivalence
+ ..equivalence)
+
+ (def: (< reference subject)
+ (<| (or (text\< (get@ #group reference)
+ (get@ #group subject)))
+
+ (and (text\= (get@ #group reference)
+ (get@ #group subject)))
+ (or (text\< (get@ #name reference)
+ (get@ #name subject)))
+
+ (and (text\= (get@ #name reference)
+ (get@ #name subject)))
+ (text\< (get@ #version reference)
+ (get@ #version subject)))))
+
(template [<separator> <definition>]
[(def: <definition>
Text
diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux
index de4817ba8..4dcc9d6e1 100644
--- a/stdlib/source/program/aedifex/command/deps.lux
+++ b/stdlib/source/program/aedifex/command/deps.lux
@@ -46,13 +46,20 @@
(list\fold dictionary.remove resolution)
(///dependency/deployment.all local))
_ (console.write_line (exception.report
- ["Local successes" (exception.enumerate ..format local_successes)]
- ["Local failures" (exception.enumerate ..format local_failures)]
- ["Remote successes" (let [remote_successes (|> remote_successes
- (set.from_list ///dependency.hash)
- (set.difference (set.from_list ///dependency.hash local_successes))
- set.to_list)]
- (exception.enumerate ..format remote_successes))]
- ["Remote failures" (exception.enumerate ..format remote_failures)])
+ ["Local successes" (|> local_successes
+ (list.sort (\ ///dependency.order <))
+ (exception.enumerate ..format))]
+ ["Local failures" (|> local_failures
+ (list.sort (\ ///dependency.order <))
+ (exception.enumerate ..format))]
+ ["Remote successes" (|> remote_successes
+ (set.from_list ///dependency.hash)
+ (set.difference (set.from_list ///dependency.hash local_successes))
+ set.to_list
+ (list.sort (\ ///dependency.order <))
+ (exception.enumerate ..format))]
+ ["Remote failures" (|> remote_failures
+ (list.sort (\ ///dependency.order <))
+ (exception.enumerate ..format))])
console)]
(wrap resolution))))
diff --git a/stdlib/source/program/aedifex/dependency.lux b/stdlib/source/program/aedifex/dependency.lux
index b7b605447..f06b00260 100644
--- a/stdlib/source/program/aedifex/dependency.lux
+++ b/stdlib/source/program/aedifex/dependency.lux
@@ -2,13 +2,14 @@
[lux (#- Type)
[abstract
[equivalence (#+ Equivalence)]
+ [order (#+ Order)]
[hash (#+ Hash)]]
[data
["." product]
- ["." text
+ ["." text ("#\." order)
["%" format (#+ format)]]]]
["." // #_
- ["#" artifact (#+ Artifact)
+ ["#" artifact (#+ Artifact) ("#\." order)
[type (#+ Type)]]])
(type: #export Dependency
@@ -25,3 +26,18 @@
(def: #export equivalence
(Equivalence Dependency)
(\ hash &equivalence))
+
+(implementation: #export order
+ (Order Dependency)
+
+ (def: &equivalence
+ ..equivalence)
+
+ (def: (< reference subject)
+ (<| (or (//\< (get@ #artifact reference)
+ (get@ #artifact subject)))
+
+ (and (//\= (get@ #artifact reference)
+ (get@ #artifact subject)))
+ (text\< (get@ #type reference)
+ (get@ #type subject)))))
diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux
index 326f2ac2d..63c3e930d 100644
--- a/stdlib/source/program/aedifex/dependency/resolution.lux
+++ b/stdlib/source/program/aedifex/dependency/resolution.lux
@@ -169,8 +169,8 @@
text.new_line)))]
["?" announce_fetching "Fetching" "from"]
- ["Y" announce_success "Found" "at"]
- ["N" announce_failure "Missed" "from"]
+ ["O" announce_success "Found" "at"]
+ ["X" announce_failure "Missed" "from"]
)
(def: #export (any console repositories dependency)
diff --git a/stdlib/source/program/aedifex/metadata.lux b/stdlib/source/program/aedifex/metadata.lux
index 7fbe88cbc..843f2e056 100644
--- a/stdlib/source/program/aedifex/metadata.lux
+++ b/stdlib/source/program/aedifex/metadata.lux
@@ -17,7 +17,7 @@
(def: #export (remote_artifact_uri artifact)
(-> Artifact URI)
(let [/ uri.separator]
- (format (get@ #//artifact.group artifact)
+ (format (//artifact.directory / (get@ #//artifact.group artifact))
/ (get@ #//artifact.name artifact)
/ (get@ #//artifact.version artifact)
/ ..remote_file)))
@@ -25,7 +25,7 @@
(def: #export (remote_project_uri artifact)
(-> Artifact URI)
(let [/ uri.separator]
- (format (get@ #//artifact.group artifact)
+ (format (//artifact.directory / (get@ #//artifact.group artifact))
/ (get@ #//artifact.name artifact)
/ ..remote_file)))
diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux
index 6eec0c32c..518e0404a 100644
--- a/stdlib/source/program/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/program/aedifex/metadata/snapshot.lux
@@ -41,7 +41,8 @@
["#/." type (#+ Type)]
["#/." versioning (#+ Versioning)]
["#/." snapshot
- ["#/." version]]]]])
+ ["#/." version]
+ ["#/." stamp]]]]])
(type: #export Metadata
{#artifact Artifact
@@ -93,18 +94,22 @@
[group (<xml>.somewhere (..text ..<group>))
name (<xml>.somewhere (..text ..<name>))
version (<xml>.somewhere (..text ..<version>))
- versioning (\ ! map
- (update@ #///artifact/versioning.versions
- (: (-> (List ///artifact/snapshot/version.Version)
- (List ///artifact/snapshot/version.Version))
- (|>> (case> (^ (list))
- (list {#///artifact/snapshot/version.extension ///artifact/type.jvm_library
- #///artifact/snapshot/version.value version
- #///artifact/snapshot/version.updated ///artifact/time.epoch})
+ versioning (with_expansions [<default_version> {#///artifact/snapshot/version.extension ///artifact/type.jvm_library
+ #///artifact/snapshot/version.value version
+ #///artifact/snapshot/version.updated ///artifact/time.epoch}]
+ (|> (<xml>.somewhere ///artifact/versioning.parser)
+ (\ ! map
+ (update@ #///artifact/versioning.versions
+ (: (-> (List ///artifact/snapshot/version.Version)
+ (List ///artifact/snapshot/version.Version))
+ (|>> (case> (^ (list))
+ (list <default_version>)
- versions
- versions))))
- (<xml>.somewhere ///artifact/versioning.parser))]
+ versions
+ versions)))))
+ (<>.default {#///artifact/versioning.snapshot #///artifact/snapshot.Local
+ #///artifact/versioning.last_updated ///artifact/time.epoch
+ #///artifact/versioning.versions (list <default_version>)})))]
(wrap {#artifact {#///artifact.group group
#///artifact.name name
#///artifact.version version}
diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux
index 60e491dac..835b03729 100644
--- a/stdlib/source/program/aedifex/parser.lux
+++ b/stdlib/source/program/aedifex/parser.lux
@@ -4,7 +4,7 @@
[monad (#+ do)]]
[control
["<>" parser
- ["<c>" code (#+ Parser)]]]
+ ["<.>" code (#+ Parser)]]]
[data
["." text]
[collection
@@ -37,25 +37,25 @@
(def: (singular input tag parser)
(All [a] (-> (Dictionary Text Code) Text (Parser a) (Parser a)))
- (<c>.local (..as_input (dictionary.get tag input))
- parser))
+ (<code>.local (..as_input (dictionary.get tag input))
+ parser))
(def: (plural input tag parser)
(All [a] (-> (Dictionary Text Code) Text (Parser a) (Parser (List a))))
- (<c>.local (..as_input (dictionary.get tag input))
- (<c>.tuple (<>.some parser))))
+ (<code>.local (..as_input (dictionary.get tag input))
+ (<code>.tuple (<>.some parser))))
(def: group
(Parser //artifact.Group)
- <c>.text)
+ <code>.text)
(def: name
(Parser //artifact.Name)
- <c>.text)
+ <code>.text)
(def: version
(Parser //artifact.Version)
- <c>.text)
+ <code>.text)
(def: artifact'
(Parser //artifact.Artifact)
@@ -63,11 +63,11 @@
(def: artifact
(Parser //artifact.Artifact)
- (<c>.tuple ..artifact'))
+ (<code>.tuple ..artifact'))
(def: url
(Parser URL)
- <c>.text)
+ <code>.text)
(def: scm
(Parser /.SCM)
@@ -75,30 +75,30 @@
(def: description
(Parser Text)
- <c>.text)
+ <code>.text)
(def: license
(Parser /.License)
(do {! <>.monad}
[input (\ ! map
(dictionary.from_list text.hash)
- (<c>.record (<>.some (<>.and <c>.local_tag
- <c>.any))))]
+ (<code>.record (<>.some (<>.and <code>.local_tag
+ <code>.any))))]
($_ <>.and
(..singular input "name" ..name)
(..singular input "url" ..url)
(<>.default #/.Repo
(..singular input "type"
- (<>.or (<c>.this! (' #repo))
- (<c>.this! (' #manual))))))))
+ (<>.or (<code>.this! (' #repo))
+ (<code>.this! (' #manual))))))))
(def: organization
(Parser /.Organization)
(do {! <>.monad}
[input (\ ! map
(dictionary.from_list text.hash)
- (<c>.record (<>.some (<>.and <c>.local_tag
- <c>.any))))]
+ (<code>.record (<>.some (<>.and <code>.local_tag
+ <code>.any))))]
($_ <>.and
(..singular input "name" ..name)
(..singular input "url" ..url))))
@@ -108,8 +108,8 @@
(do {! <>.monad}
[input (\ ! map
(dictionary.from_list text.hash)
- (<c>.record (<>.some (<>.and <c>.local_tag
- <c>.any))))]
+ (<code>.record (<>.some (<>.and <code>.local_tag
+ <code>.any))))]
($_ <>.and
(..singular input "name" ..name)
(..singular input "url" ..url)
@@ -125,8 +125,8 @@
(do {! <>.monad}
[input (\ ! map
(dictionary.from_list text.hash)
- (<c>.record (<>.some (<>.and <c>.local_tag
- <c>.any))))]
+ (<code>.record (<>.some (<>.and <code>.local_tag
+ <code>.any))))]
($_ <>.and
(<>.maybe (..singular input "url" ..url))
(<>.maybe (..singular input "scm" ..scm))
@@ -143,11 +143,11 @@
(def: type
(Parser //artifact/type.Type)
- <c>.text)
+ <code>.text)
(def: dependency
(Parser //dependency.Dependency)
- (<c>.tuple
+ (<code>.tuple
($_ <>.and
..artifact'
(<>.default //artifact/type.lux_library ..type)
@@ -155,32 +155,32 @@
(def: source
(Parser /.Source)
- <c>.text)
+ <code>.text)
(def: target
(Parser /.Target)
- <c>.text)
+ <code>.text)
(def: module
(Parser Module)
- <c>.text)
+ <code>.text)
(def: deploy_repository
(Parser (List [Text //repository.Address]))
- (<c>.record (<>.some
- (<>.and <c>.text
- ..repository))))
+ (<code>.record (<>.some
+ (<>.and <code>.text
+ ..repository))))
(def: profile
(Parser /.Profile)
(do {! <>.monad}
[input (\ ! map
(dictionary.from_list text.hash)
- (<c>.record (<>.some (<>.and <c>.local_tag
- <c>.any))))
+ (<code>.record (<>.some (<>.and <code>.local_tag
+ <code>.any))))
#let [^parents (: (Parser (List /.Name))
(<>.default (list)
- (..plural input "parents" <c>.text)))
+ (..plural input "parents" <code>.text)))
^identity (: (Parser (Maybe Artifact))
(<>.maybe
(..singular input "identity" ..artifact)))
@@ -236,7 +236,7 @@
multi_profile (: (Parser Project)
(\ <>.monad map
(dictionary.from_list text.hash)
- (<c>.record (<>.many (<>.and <c>.text
- ..profile)))))]
+ (<code>.record (<>.many (<>.and <code>.text
+ ..profile)))))]
(<>.either multi_profile
default_profile)))
diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux
index 8b577ec09..b964e6502 100644
--- a/stdlib/source/program/compositor.lux
+++ b/stdlib/source/program/compositor.lux
@@ -102,10 +102,10 @@
analysis.Bundle
(IO (Platform <parameters>))
(generation.Bundle <parameters>)
- (directive.Bundle <parameters>)
+ (-> platform.Phase_Wrapper (directive.Bundle <parameters>))
(Program expression artifact)
[Type Type Type]
- Extender
+ (-> platform.Phase_Wrapper Extender)
Service
[Packager file.Path]
(Promise Any)))