aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/dependency
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex/dependency')
-rw-r--r--stdlib/source/program/aedifex/dependency/deployment.lux50
-rw-r--r--stdlib/source/program/aedifex/dependency/resolution.lux30
2 files changed, 41 insertions, 39 deletions
diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux
index d23e4a805..0e9ab0def 100644
--- a/stdlib/source/program/aedifex/dependency/deployment.lux
+++ b/stdlib/source/program/aedifex/dependency/deployment.lux
@@ -91,39 +91,39 @@
(do try.monad
[now (: (Try ///artifact/time.Time)
(///artifact/time.of_instant now))
- .let [version_template (get@ #///artifact.version artifact)
+ .let [version_template (value@ #///artifact.version artifact)
snapshot (|> snapshot
- (update@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot]
- (function (_ snapshot)
- (case snapshot
- #///artifact/snapshot.Local
- #///artifact/snapshot.Local
-
- (#///artifact/snapshot.Remote [_ build])
- (#///artifact/snapshot.Remote [now (inc build)]))))
- (set@ [#///metadata/snapshot.versioning #///artifact/versioning.last_updated] now))
- versioning_snapshot (get@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] snapshot)]]
+ (revised@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot]
+ (function (_ snapshot)
+ (case snapshot
+ #///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)]]
(in (|> snapshot
- (set@ [#///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}))
- ... (set@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot]
- ... (list\compose (..artifacts type (product.right (get@ #///package.library package)))
- ... (..artifacts ///artifact/type.pom (product.right (get@ #///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\compose (..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 (get@ #///artifact.version artifact)]]
+ .let [version_template (value@ #///artifact.version artifact)]]
(do (try.with !)
- [_ (with_status repository version_template [artifact type] (get@ #///package.library package))
+ [_ (with_status repository version_template [artifact type] (value@ #///package.library package))
- _ (let [[pom pom_data status] (get@ #///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
- (set@ #///metadata/artifact.versions (list version_template))
- (set@ #///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 22778e25b..73c5f6608 100644
--- a/stdlib/source/program/aedifex/dependency/resolution.lux
+++ b/stdlib/source/program/aedifex/dependency/resolution.lux
@@ -1,6 +1,7 @@
(.module:
[library
[lux (#- Name)
+ ["@" target]
["." debug]
["." ffi (#+ import:)]
[abstract
@@ -83,9 +84,10 @@
(case ?actual
(#try.Success actual)
(in (do {! try.monad}
- [output (\ ! map (|>> (:as java/lang/String)
- java/lang/String::trim
- (:as Text))
+ [output (\ ! map (for {@.old (|>> (:as java/lang/String)
+ java/lang/String::trim
+ (:as Text))
+ @.jvm (|>> java/lang/String::trim)})
(\ utf8.codec decode actual))
actual (|> output
(text.all_split_by " ")
@@ -113,10 +115,10 @@
[(#.Some sha-1) (#.Some md5)]
(#//status.Verified sha-1 md5)
- [(#.Some sha-1) _]
+ [(#.Some sha-1) #.None]
(#//status.Partial (#.Left sha-1))
- [_ (#.Some md5)]
+ [#.None (#.Some md5)]
(#//status.Partial (#.Right md5))
[#.None #.None]
@@ -128,10 +130,10 @@
extension (///artifact/extension.extension type)]
(do (try.with async.monad)
[snapshot (///metadata/snapshot.read repository artifact)
- .let [version_template (get@ [#///metadata/snapshot.artifact #///artifact.version] snapshot)
+ .let [version_template (value@ [#///metadata/snapshot.artifact #///artifact.version] snapshot)
artifact_version (value.format {#value.version version_template
- #value.snapshot (get@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] snapshot)})
- artifact (set@ #///artifact.version artifact_version artifact)]
+ #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
@@ -156,8 +158,8 @@
(exception: .public (cannot_resolve {dependency Dependency})
(exception.report
- ["Artifact" (%.text (///artifact.format (get@ #//.artifact dependency)))]
- ["Type" (%.text (get@ #//.type dependency))]))
+ ["Artifact" (%.text (///artifact.format (value@ #//.artifact dependency)))]
+ ["Type" (%.text (value@ #//.type dependency))]))
(template [<sigil> <name> <doing> <at>]
[(def: (<name> console repository artifact)
@@ -184,17 +186,17 @@
(#.Item repository alternatives)
(do {! async.monad}
- [_ (..announce_fetching console repository (get@ #//.artifact dependency))
+ [_ (..announce_fetching console repository (value@ #//.artifact dependency))
outcome (..one repository dependency)]
(case outcome
(#try.Success package)
(do !
- [_ (..announce_success console repository (get@ #//.artifact dependency))]
+ [_ (..announce_success console repository (value@ #//.artifact dependency))]
(in outcome))
(#try.Failure error)
(do !
- [_ (..announce_failure console repository (get@ #//.artifact dependency))]
+ [_ (..announce_failure console repository (value@ #//.artifact dependency))]
(any console alternatives dependency))))))
(def: .public (all console repositories new_repository dependencies resolution)
@@ -213,7 +215,7 @@
[successes failures resolution])
(#.Item head tail)
- (case (get@ [#//.artifact #///artifact.version] head)
+ (case (value@ [#//.artifact #///artifact.version] head)
... Skip if there is no version
"" (recur repositories
successes