aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2022-04-07 14:57:35 -0400
committerEduardo Julian2022-04-07 14:57:35 -0400
commitc85697eee8ce3dac5480a3ba2b31cc4943e1d8e6 (patch)
tree50db3f6547b0ad765e6b47e65546f30ad8861c0b
parent9224e54bf175ebe13c3fae42f04b649413c737e7 (diff)
Better snapshot deployments for Aedifex.
Diffstat (limited to '')
-rw-r--r--.github/workflows/setup_aedifex/action.yml8
-rw-r--r--.github/workflows/test.yml16
-rw-r--r--stdlib/commands.md7
-rw-r--r--stdlib/project.lux5
-rw-r--r--stdlib/source/program/aedifex.lux129
-rw-r--r--stdlib/source/program/aedifex/command/build.lux6
-rw-r--r--stdlib/source/program/aedifex/command/deploy.lux77
-rw-r--r--stdlib/source/program/aedifex/command/deploy/snapshot.lux61
-rw-r--r--stdlib/source/program/aedifex/command/install.lux4
-rw-r--r--stdlib/source/program/aedifex/command/test.lux2
-rw-r--r--stdlib/source/program/aedifex/parser.lux2
-rw-r--r--stdlib/source/program/aedifex/profile.lux6
-rw-r--r--stdlib/source/program/aedifex/runtime.lux2
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux10
-rw-r--r--stdlib/source/test/aedifex/command/build.lux30
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux2
-rw-r--r--stdlib/source/test/aedifex/command/deploy.lux33
-rw-r--r--stdlib/source/test/aedifex/command/test.lux6
-rw-r--r--stdlib/source/test/aedifex/command/version.lux57
-rw-r--r--stdlib/source/test/aedifex/input.lux2
-rw-r--r--stdlib/source/test/aedifex/profile.lux21
-rw-r--r--stdlib/source/test/aedifex/repository/remote.lux4
22 files changed, 260 insertions, 230 deletions
diff --git a/.github/workflows/setup_aedifex/action.yml b/.github/workflows/setup_aedifex/action.yml
index 873623b2f..e9d904779 100644
--- a/.github/workflows/setup_aedifex/action.yml
+++ b/.github/workflows/setup_aedifex/action.yml
@@ -10,15 +10,15 @@ runs:
distribution: 'temurin'
java-version: '17'
- # Presumably, whoever invokes this action already has done a checkout.
+ # Presumably, whoever invokes this action has already done a checkout.
# - uses: actions/checkout@v2
- - run: wget https://github.com/LuxLang/lux/releases/download/0.6.5/aedifex_do_not_touch_4.jar && mv aedifex_do_not_touch_4.jar aedifex.jar
+ - run: wget https://github.com/LuxLang/lux/releases/download/0.6.5/aedifex_do_not_touch_5.jar && mv aedifex_do_not_touch_5.jar aedifex.jar
shell: bash
- - run: mv ./shell/lux.sh ./lux.sh
+ - run: PATH="$PATH:./shell"
shell: bash
- - run: cd ./stdlib/ && ../lux.sh clean && cd ..
+ - run: cd ./stdlib/ && lux clean && cd ..
shell: bash
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 5fa49c578..6b98a1ad3 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -6,7 +6,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/setup_aedifex
- - run: cd ./stdlib/ && ../lux.sh with jvm with bibliotheca test
+ - run: cd ./stdlib/ && lux with jvm with bibliotheca test
+ test_aedifex:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ./.github/workflows/setup_aedifex
+ - run: cd ./stdlib/ && lux with aedifex test
test_stdlib_on_node_js:
runs-on: ubuntu-latest
steps:
@@ -16,7 +22,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '14'
- - run: cd ./stdlib/ && ../lux.sh with js with bibliotheca test
+ - run: cd ./stdlib/ && lux with js with bibliotheca test
test_stdlib_on_python_3:
runs-on: ubuntu-latest
steps:
@@ -27,7 +33,7 @@ jobs:
with:
python-version: '3.9'
architecture: 'x64'
- - run: cd ./stdlib/ && ../lux.sh with python with bibliotheca test
+ - run: cd ./stdlib/ && lux with python with bibliotheca test
test_stdlib_on_ruby:
runs-on: ubuntu-latest
steps:
@@ -37,7 +43,7 @@ jobs:
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- - run: cd ./stdlib/ && ../lux.sh with ruby with bibliotheca test
+ - run: cd ./stdlib/ && lux with ruby with bibliotheca test
test_stdlib_on_lua:
runs-on: ubuntu-latest
steps:
@@ -45,5 +51,5 @@ jobs:
- uses: ./.github/workflows/setup_aedifex
# https://github.com/marketplace/actions/setup-lua-luajit
- uses: xpol/setup-lua@v0.3
- - run: cd ./stdlib/ && ../lux.sh with lua with bibliotheca test
+ - run: cd ./stdlib/ && lux with lua with bibliotheca test
diff --git a/stdlib/commands.md b/stdlib/commands.md
index 79982596b..6305050dc 100644
--- a/stdlib/commands.md
+++ b/stdlib/commands.md
@@ -40,11 +40,14 @@ cd ~/lux/stdlib/ && mvn deploy:deploy-file \
-Dfile=library.tar \
-DgroupId=com.github.luxlang \
-DartifactId=stdlib \
--Dversion=0.6.5-SNAPSHOT \
+-Dversion=0.7.0-SNAPSHOT \
-Dpackaging=tar
cd ~/lux/stdlib/ \
&& lux install
+
+cd ~/lux/stdlib/ \
+&& lux deploy snapshots $NEXUS_USERNAME $NEXUS_PASSWORD
```
## Generate documentation
@@ -120,6 +123,6 @@ cd ~/lux/stdlib/ \
```
cd ~/lux/stdlib/ \
&& lux clean \
-&& lux with jvm with aedifex auto test
+&& lux with aedifex auto test
```
diff --git a/stdlib/project.lux b/stdlib/project.lux
index 2ba89ffe9..4644c56e8 100644
--- a/stdlib/project.lux
+++ b/stdlib/project.lux
@@ -2,7 +2,7 @@
[... An optional identity for the project.
... It can also be specified or overriden in a non-default profile.
... This will be the name given to the project when installed/deployed as a dependency.
- "identity" ["com.github.luxlang" "stdlib" "0.6.5"]
+ "identity" ["com.github.luxlang" "stdlib" "0.7.0-SNAPSHOT"]
... Every piece of information, and the whole "info" bundle, are optional.
"info" ["url" "https://github.com/LuxLang/lux"
@@ -30,8 +30,7 @@
... An optional list of repositories to use for fetching remote dependencies.
... Additionally, there is an implicit repository being used, which is https://repo1.maven.org/maven2/
... So, even if the "repositories" list were to be empty, you'd still have access to the default repository.
- "repositories" ["https://oss.sonatype.org/content/repositories/snapshots/"
- "https://oss.sonatype.org/service/local/staging/deploy/maven2/"]
+ "repositories" ["https://oss.sonatype.org/content/repositories/snapshots/"]
... The different directories to look for source code. The default is described below.
... "sources" ["source"]
... The directory for storing the build artifacts. The default is described below.
diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux
index a86e634a2..0c04ff7bb 100644
--- a/stdlib/source/program/aedifex.lux
+++ b/stdlib/source/program/aedifex.lux
@@ -1,6 +1,6 @@
(.using
[library
- [lux "*"
+ [lux {"-" local}
[program {"+" program:}]
["[0]" debug]
[abstract
@@ -146,6 +146,10 @@
(maybe.trusted (text.clip 0 (-- (text.size it)) it))
it)))))
+(def: program (program.async program.default))
+(def: fs (file.async file.default))
+(def: local (/repository/local.repository ..program ..fs))
+
(program: [[profiles operation] /cli.command]
(do [! io.monad]
[console (# ! each (|>> (try.else ..write_only) console.async)
@@ -163,68 +167,67 @@
(..fail! error)
{try.#Success profile}
- (let [program (program.async program.default)]
- (case operation
- {/cli.#Version}
- (in [])
-
- {/cli.#Clean}
- (..command
- (/command/clean.do! console (file.async file.default) profile))
-
- {/cli.#POM}
- (..command
- (/command/pom.do! console (file.async file.default) profile))
-
- {/cli.#Install}
- (..command
- (let [fs (file.async file.default)]
- (/command/install.do! console fs (/repository/local.repository program fs) profile)))
-
- {/cli.#Deploy repository identity}
- (..command
- (case (the /.#identity profile)
- {.#Some artifact}
- (case (dictionary.value repository (the /.#deploy_repositories profile))
- {.#Some repository}
- (/command/deploy.do! console
- (/repository.async (/repository/remote.repository http.default {.#Some identity} repository))
- (file.async file.default)
- artifact
- profile)
-
- {.#None}
- (async#in (exception.except ..cannot_find_repository [repository (the /.#deploy_repositories profile)])))
+ (case operation
+ {/cli.#Version}
+ (in [])
+
+ {/cli.#Clean}
+ (..command
+ (/command/clean.do! console (file.async file.default) profile))
+
+ {/cli.#POM}
+ (..command
+ (/command/pom.do! console (file.async file.default) profile))
+
+ {/cli.#Install}
+ (..command
+ (/command/install.do! console ..fs ..local profile))
+
+ {/cli.#Deploy repository identity}
+ (..command
+ (case (the /.#identity profile)
+ {.#Some artifact}
+ (case (dictionary.value repository (the /.#deploy_repositories profile))
+ {.#Some remote}
+ (/command/deploy.do! console
+ ..local
+ (/repository.async (/repository/remote.repository http.default {.#Some identity} remote))
+ (file.async file.default)
+ artifact
+ profile)
{.#None}
- (async#in (exception.except /.no_identity []))))
-
- {/cli.#Dependencies}
- (..command
- (/command/deps.do! console
- (/repository/local.repository program (file.async file.default))
- (..repositories profile)
- (|>> (/repository/remote.repository http.default {.#None})
- /repository.async)
- profile))
-
- {/cli.#Compilation compilation}
- (case compilation
- {/cli.#Build} (..command
- (..with_dependencies program console /command/build.do! profile))
- {/cli.#Test} (..command
- (..with_dependencies program console /command/test.do! profile)))
-
- {/cli.#Auto auto}
- (do !
- [?watcher watch.default]
- (case ?watcher
- {try.#Failure error}
- (..fail! error)
-
- {try.#Success watcher}
- (..command
- (case auto
- {/cli.#Build} (..with_dependencies program console (/command/auto.do! /command/auto.delay watcher /command/build.do!) profile)
- {/cli.#Test} (..with_dependencies program console (/command/auto.do! /command/auto.delay watcher /command/test.do!) profile)))))))
+ (async#in (exception.except ..cannot_find_repository [repository (the /.#deploy_repositories profile)])))
+
+ {.#None}
+ (async#in (exception.except /.no_identity []))))
+
+ {/cli.#Dependencies}
+ (..command
+ (/command/deps.do! console
+ (/repository/local.repository ..program (file.async file.default))
+ (..repositories profile)
+ (|>> (/repository/remote.repository http.default {.#None})
+ /repository.async)
+ profile))
+
+ {/cli.#Compilation compilation}
+ (case compilation
+ {/cli.#Build} (..command
+ (..with_dependencies ..program console /command/build.do! profile))
+ {/cli.#Test} (..command
+ (..with_dependencies ..program console /command/test.do! profile)))
+
+ {/cli.#Auto auto}
+ (do !
+ [?watcher watch.default]
+ (case ?watcher
+ {try.#Failure error}
+ (..fail! error)
+
+ {try.#Success watcher}
+ (..command
+ (case auto
+ {/cli.#Build} (..with_dependencies ..program console (/command/auto.do! /command/auto.delay watcher /command/build.do!) profile)
+ {/cli.#Test} (..with_dependencies ..program console (/command/auto.do! /command/auto.delay watcher /command/test.do!) profile))))))
)))))
diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux
index 4ff240f96..8f3fa2496 100644
--- a/stdlib/source/program/aedifex/command/build.lux
+++ b/stdlib/source/program/aedifex/command/build.lux
@@ -271,9 +271,7 @@
_
(revised ///runtime.#parameters
- (|>> (partial_list "-cp" (..jvm_class_path host_dependencies)
- "--add-opens" "java.base/java.lang=ALL-UNNAMED"
- "-Xss16m"))
+ (|>> (partial_list "-cp" (..jvm_class_path host_dependencies)))
runtime)))
(def: .public (do! console program fs shell resolution)
@@ -323,7 +321,7 @@
(..singular "--target" cache_directory)
(..singular "--module" program_module)
(..singular "--configuration" (configuration.format (the ///.#configuration profile)))))]
- process (# shell execute [(dictionary.composite command_environment environment)
+ process (# shell execute [(dictionary.composite environment command_environment)
working_directory
command
full_parameters])
diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux
index 6fcd84e21..4ff3b9011 100644
--- a/stdlib/source/program/aedifex/command/deploy.lux
+++ b/stdlib/source/program/aedifex/command/deploy.lux
@@ -4,78 +4,29 @@
[abstract
[monad {"+" do}]]
[control
- ["[0]" try {"+" Try}]
+ [try {"+" Try}]
[concurrency
- ["[0]" async {"+" Async} ("[1]#[0]" monad)]]
- ["<>" parser
- ["<[0]>" xml]]]
- [data
- [binary {"+" Binary}]
- [text
- ["%" format {"+" format}]
- [encoding
- ["[0]" utf8]]]
- [collection
- ["[0]" set]]
- [format
- ["[0]" binary]
- ["[0]" tar]
- ["[0]" xml]]]
- [time
- ["[0]" instant {"+" Instant}]]
- [tool
- [compiler
- [meta
- ["[0]" export]]]]
+ [async {"+" Async}]]]
[world
["[0]" file]
["[0]" console {"+" Console}]]]]
- ["[0]" // "_"
- ["[1][0]" clean]
+ ["[0]" / "_"
+ ["[1][0]" snapshot]
["/[1]" // "_"
- [command {"+" Command}]
- ["/" profile]
- ["[1][0]" action {"+" Action}]
- ["[1][0]" pom]
- ["[1][0]" hash]
- ["[1][0]" package]
- ["[1][0]" dependency
- ["[1]/[0]" deployment]
- ["[1]/[0]" status {"+" Status}]]
- ["[1][0]" repository {"+" Repository}
- [identity {"+" Identity}]
- ["[1]/[0]" remote]
- ["[1]/[0]" origin]]
- ["[1][0]" metadata
- ["[1]/[0]" artifact]
- ["[1]/[0]" snapshot]]
- ["[1][0]" artifact {"+" Artifact}
- ["[1]/[0]" extension {"+" Extension}]
- ["[1]/[0]" type]]]])
+ ["[1][0]" install]
+ ["/[1]" // "_"
+ [command {"+" Command}]
+ [repository {"+" Repository}]
+ [artifact {"+" Artifact}]
+ ["[1][0]" action]]]])
(def: .public success
"Successfully deployed the project.")
-(def: .public (do! console repository fs artifact profile)
- (-> (Console Async) (Repository Async) (file.System Async) Artifact (Command Any))
+(def: .public (do! console local remote fs artifact profile)
+ (-> (Console Async) (Repository Async) (Repository Async) (file.System Async) Artifact (Command Any))
(do [! ///action.monad]
- [library (|> profile
- (the /.#sources)
- set.list
- (export.library fs)
- (# ! each (binary.result tar.writer)))
- pom (# async.monad in (///pom.write profile))
- _ (///dependency/deployment.one
- repository
- [artifact ///artifact/type.lux_library]
- (let [pom_data (|> pom
- (# xml.codec encoded)
- (# utf8.codec encoded))]
- [///package.#origin {///repository/origin.#Remote ""}
- ///package.#library [library
- (///dependency/status.verified library)]
- ///package.#pom [pom
- pom_data
- (///dependency/status.verified pom_data)]]))]
+ [_ (//install.do! console fs local profile)
+ _ (/snapshot.do! console remote fs artifact profile)]
(is (Async (Try Any))
(console.write_line ..success console))))
diff --git a/stdlib/source/program/aedifex/command/deploy/snapshot.lux b/stdlib/source/program/aedifex/command/deploy/snapshot.lux
new file mode 100644
index 000000000..9770965d9
--- /dev/null
+++ b/stdlib/source/program/aedifex/command/deploy/snapshot.lux
@@ -0,0 +1,61 @@
+(.using
+ [library
+ [lux "*"
+ [abstract
+ [monad {"+" do}]]
+ [control
+ [concurrency
+ ["[0]" async {"+" Async}]]]
+ [data
+ [text
+ [encoding
+ ["[0]" utf8]]]
+ [collection
+ ["[0]" set]]
+ [format
+ ["[0]" binary]
+ ["[0]" tar]
+ ["[0]" xml]]]
+ [tool
+ [compiler
+ [meta
+ ["[0]" export]]]]
+ [world
+ [console {"+" Console}]
+ ["[0]" file]]]]
+ ["[0]" //// "_"
+ [command {"+" Command}]
+ ["/" profile]
+ ["[1][0]" action]
+ ["[1][0]" pom]
+ ["[1][0]" package]
+ ["[1][0]" dependency "_"
+ ["[1]/[0]" deployment]
+ ["[1]/[0]" status]]
+ ["[1][0]" repository {"+" Repository}
+ ["[1]/[0]" origin]]
+ ["[1][0]" artifact {"+" Artifact}
+ ["[1]/[0]" type]]])
+
+(def: .public (do! console remote fs artifact profile)
+ (-> (Console Async) (Repository Async) (file.System Async) Artifact (Command Any))
+ (do [! ////action.monad]
+ [library (|> profile
+ (the /.#sources)
+ set.list
+ (export.library fs)
+ (# ! each (binary.result tar.writer)))
+ pom (# async.monad in (////pom.write profile))
+ _ (////dependency/deployment.one
+ remote
+ [artifact ////artifact/type.lux_library]
+ (let [pom_data (|> pom
+ (# xml.codec encoded)
+ (# utf8.codec encoded))]
+ [////package.#origin {////repository/origin.#Remote ""}
+ ////package.#library [library
+ (////dependency/status.verified library)]
+ ////package.#pom [pom
+ pom_data
+ (////dependency/status.verified pom_data)]]))]
+ (in [])))
diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux
index 41338674d..aced7165c 100644
--- a/stdlib/source/program/aedifex/command/install.lux
+++ b/stdlib/source/program/aedifex/command/install.lux
@@ -50,7 +50,7 @@
(def: .public failure
"Failure: No 'identity' defined for the project.")
-(def: .public (do! console fs repository profile)
+(def: .public (do! console fs local profile)
(-> (Console Async) (file.System Async) (Repository Async) (Command Any))
(case (the /.#identity profile)
{.#Some identity}
@@ -62,7 +62,7 @@
pom (|> profile
///pom.write
(# async.monad in))
- _ (///dependency/deployment.one repository
+ _ (///dependency/deployment.one local
[identity ///artifact/type.lux_library]
(let [pom_data (|> pom
(# xml.codec encoded)
diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux
index e6d36bfd8..1d4da3262 100644
--- a/stdlib/source/program/aedifex/command/test.lux
+++ b/stdlib/source/program/aedifex/command/test.lux
@@ -62,7 +62,7 @@
[//build.#Python ///.#python]
[//build.#Lua ///.#lua]
[//build.#Ruby ///.#ruby]))]
- process (# shell execute [(dictionary.composite command_environment environment)
+ process (# shell execute [(dictionary.composite environment command_environment)
working_directory
test_command
test_parameters])
diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux
index 094f60507..280c518e7 100644
--- a/stdlib/source/program/aedifex/parser.lux
+++ b/stdlib/source/program/aedifex/parser.lux
@@ -219,7 +219,7 @@
(<>.else (set.empty //dependency.hash))))
^lux (|> ..dependency
(..singular input //format.lux_compiler_label)
- (<>.else /.default_compiler))
+ (<>.else /.default_lux))
^compilers (|> ..compiler
(..plural input "compilers")
(<>.else (list)))
diff --git a/stdlib/source/program/aedifex/profile.lux b/stdlib/source/program/aedifex/profile.lux
index 94baee351..8fca5dffa 100644
--- a/stdlib/source/program/aedifex/profile.lux
+++ b/stdlib/source/program/aedifex/profile.lux
@@ -39,7 +39,7 @@
[repository
[remote {"+" Address}]]])
-(def: .public default_compiler
+(def: .public default_lux
Dependency
[dependency.#artifact ["com.github.luxlang" "lux-jvm" "0.6.5"]
dependency.#type type.jvm_library])
@@ -232,7 +232,7 @@
#info {.#None}
#repositories (set.empty text.hash)
#dependencies (set.empty dependency.hash)
- #lux default_compiler
+ #lux ..default_lux
#compilers (list)
#sources (set.empty text.hash)
#target ..default_target
@@ -256,7 +256,7 @@
#info (maybe#composite (the #info override) (the #info baseline))
#repositories (set.union (the #repositories baseline) (the #repositories override))
#dependencies (set.union (the #dependencies baseline) (the #dependencies override))
- #lux (if (dependency#= ..default_compiler (the #lux override))
+ #lux (if (dependency#= ..default_lux (the #lux override))
(the #lux baseline)
(the #lux override))
#compilers (list#composite (the #compilers baseline) (the #compilers override))
diff --git a/stdlib/source/program/aedifex/runtime.lux b/stdlib/source/program/aedifex/runtime.lux
index 7ba73519d..f03c80ba1 100644
--- a/stdlib/source/program/aedifex/runtime.lux
+++ b/stdlib/source/program/aedifex/runtime.lux
@@ -36,7 +36,7 @@
#program <command>
#parameters (`` (list (~~ (template.spliced <parameters>))))])]
- [default_java "java" [] ["--add-opens" "java.base/java.lang=ALL-UNNAMED" "-jar"]]
+ [default_java "java" [] ["-Xss32m" "--add-opens" "java.base/java.lang=ALL-UNNAMED" "-jar"]]
[default_js "node" [] ["--stack_size=8192"]]
[default_python "python3" [] []]
[default_lua "lua" [] []]
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index 001bfcab3..e8d5ca1ac 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -57,10 +57,8 @@
(if (n.= expected_runs actual_runs)
(in {try.#Failure end_signal})
(do (try.with !)
- [_ (# fs write (# utf8.codec encoded (%.nat actual_runs)) dummy_file)
- _ (# fs modify
- (|> actual_runs .int instant.of_millis)
- dummy_file)]
+ [_ (# fs write dummy_file (# utf8.codec encoded (%.nat actual_runs)))
+ _ (# fs modify dummy_file (|> actual_runs .int instant.of_millis))]
(in [shell.normal []])))))]))
(def: .public test
@@ -98,12 +96,12 @@
(in (do async.monad
[verdict (do ///action.monad
[_ (# fs make_directory source)
- _ (# fs write (binary.empty 0) dummy_path)
+ _ (# fs write dummy_path (binary.empty 0))
.let [[@runs command] (..command expected_runs end_signal fs dummy_path)]
_ (# watcher poll [])]
(do [! async.monad]
[no_dangling_process! (|> profile
- (has ///.#compiler compiler)
+ (has ///.#lux compiler)
((/.do! 1 watcher command)
($version.echo "")
(program.async (program.mock environment.empty home working_directory))
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index 987d35506..a7cd30b1c 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -89,7 +89,7 @@
{.#End}
(exception.except shell.no_more_output []))))
- (def: (on_error state)
+ (def: (on_fail state)
(if error?
(case state
{.#Item head tail}
@@ -110,7 +110,7 @@
(do random.monad
[lux_version (random.ascii/alpha 5)
.let [js_compiler [///dependency.#artifact [///artifact.#group /.lux_group
- ///artifact.#name /.js_compiler_name
+ ///artifact.#name /.js_lux_name
///artifact.#version lux_version]
///dependency.#type ///artifact/type.js_library]]]
(`` ($_ random.either
@@ -121,10 +121,10 @@
///artifact.#version lux_version]
///dependency.#type ///artifact/type.lux_library])]
- [/.jvm_compiler_name]
- [/.python_compiler_name]
- [/.lua_compiler_name]
- [/.ruby_compiler_name]
+ [/.jvm_lux_name]
+ [/.python_lux_name]
+ [/.lua_lux_name]
+ [/.ruby_lux_name]
))))))
(def: .public resolution
@@ -171,13 +171,13 @@
(exception.match? /.no_specified_program error)))))
(in (do async.monad
[outcome (/.do! (@version.echo "") (program.async (program.mock environment.empty home working_directory)) fs shell ///dependency/resolution.empty profile)]
- (_.cover' [/.Compiler /.no_available_compiler]
+ (_.cover' [/.Lux /.no_available_lux]
(case outcome
{try.#Success _}
false
{try.#Failure error}
- (exception.match? /.no_available_compiler error)))))
+ (exception.match? /.no_available_lux error)))))
(do !
[.let [console (@version.echo "")]
[compiler resolution] ..resolution]
@@ -185,18 +185,18 @@
[verdict (do ///action.monad
[_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs shell resolution
- (has ///.#compiler compiler profile))
+ (has ///.#lux compiler profile))
start (# console read_line [])
end (# console read_line [])]
(in (and (text#= /.start start)
(text#= /.success end))))]
(_.cover' [/.do!
/.lux_group
- /.jvm_compiler_name
- /.js_compiler_name
- /.python_compiler_name
- /.lua_compiler_name
- /.ruby_compiler_name
+ /.jvm_lux_name
+ /.js_lux_name
+ /.python_lux_name
+ /.lua_lux_name
+ /.ruby_lux_name
/.start
/.success]
(try.else false verdict)))))
@@ -207,7 +207,7 @@
[verdict (do ///action.monad
[_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async (..bad_shell [])) resolution
- (has ///.#compiler compiler profile))
+ (has ///.#lux compiler profile))
start (# console read_line [])
end (# console read_line [])]
(in (and (text#= /.start start)
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index 411504a35..cdc5efafd 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -51,7 +51,7 @@
(def: (create_file! fs [path content])
(-> (file.System Async) [Path Binary] (Async (Try Any)))
- (# fs write content path))
+ (# fs write path content))
(def: (create_directory! fs path files)
(-> (file.System Async) Path (List [Path Binary]) (Async (Try Any)))
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index 7cdba510d..0aec02f72 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -25,12 +25,13 @@
["[0]" set]]]
[math
["[0]" random]]
+ [tool
+ [compiler
+ [meta
+ ["[0]" export]]]]
[world
["[0]" file]
["[0]" program {"+" Program}]]]]
- [program
- [compositor
- ["[0]" export]]]
[//
["$[0]" install]
["$[0]" version]
@@ -45,18 +46,19 @@
["[1][0]" pom]
["[1][0]" hash]
["[1][0]" repository {"+" Repository}
+ ["[1]/[0]" local]
["[1]/[0]" remote]]
["[1][0]" artifact {"+" Artifact}
["[1]/[0]" extension]]]]])
-(def: (execute! program repository fs artifact profile)
- (-> (Program Async) (Repository Async) (file.System Async)
+(def: (execute! program local remote fs artifact profile)
+ (-> (Program Async) (Repository Async) (Repository Async) (file.System Async)
Artifact ///.Profile
(Async (Try Text)))
(do ///action.monad
[.let [console ($version.echo "")]
_ ($install.make_sources! fs (the ///.#sources profile))
- _ (/.do! console repository fs artifact profile)]
+ _ (/.do! console local remote fs artifact profile)]
(# console read_line [])))
(def: .public test
@@ -73,27 +75,28 @@
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
- .let [repository (///repository.mock $repository.mock
- $repository.empty)
- fs (file.mock (# file.default separator))
- program (program.async (program.mock environment.empty home working_directory))]]
+ .let [fs (file.mock (# file.default separator))
+ program (program.async (program.mock environment.empty home working_directory))
+ local (///repository/local.repository program fs)
+ remote (///repository.mock $repository.mock
+ $repository.empty)]]
(in (do [! async.monad]
[verdict (do [! ///action.monad]
- [logging (..execute! program repository fs artifact profile)
+ [logging (..execute! program local remote fs artifact profile)
expected_library (|> profile
(the ///.#sources)
set.list
(export.library fs)
(# ! each (format.result tar.writer)))
- actual_pom (# repository download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.pom))
- actual_library (# repository download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.lux_library))
- actual_sha-1 (# repository download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1)))
+ actual_pom (# remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.pom))
+ actual_library (# remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.lux_library))
+ actual_sha-1 (# remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1)))
actual_sha-1 (# async.monad in
(do try.monad
[actual_sha-1 (# utf8.codec decoded actual_sha-1)]
(# ///hash.sha-1_codec decoded actual_sha-1)))
- actual_md5 (# repository download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5)))
+ actual_md5 (# remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5)))
actual_md5 (# async.monad in
(do try.monad
[actual_md5 (# utf8.codec decoded actual_md5)]
diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux
index 4f6cfcdc4..4109c99ee 100644
--- a/stdlib/source/test/aedifex/command/test.lux
+++ b/stdlib/source/test/aedifex/command/test.lux
@@ -65,7 +65,7 @@
[verdict (do ///action.monad
[_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async (@build.good_shell [])) resolution
- (has ///.#compiler compiler profile))
+ (has ///.#lux compiler profile))
build_start (# console read_line [])
build_end (# console read_line [])
test_start (# console read_line [])
@@ -88,7 +88,7 @@
(implementation
(def: (on_read state)
(exception.except shell.no_more_output []))
- (def: (on_error state)
+ (def: (on_fail state)
(exception.except shell.no_more_output []))
(def: (on_write input state)
{try.#Failure "on_write"})
@@ -101,7 +101,7 @@
[])]
_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async bad_shell) resolution
- (has ///.#compiler compiler profile))
+ (has ///.#lux compiler profile))
build_start (# console read_line [])
build_end (# console read_line [])
test_start (# console read_line [])
diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux
index eafff9cce..fff234d52 100644
--- a/stdlib/source/test/aedifex/command/version.lux
+++ b/stdlib/source/test/aedifex/command/version.lux
@@ -1,32 +1,31 @@
(.using
- [library
- [lux "*"
- ["_" test {"+" Test}]
- [abstract
- [monad {"+" do}]]
- [control
- ["[0]" maybe]
- ["[0]" try]
- ["[0]" exception {"+" exception:}]
- [concurrency
- ["[0]" async {"+" Async}]]]
- [data
- ["[0]" text ("[1]#[0]" equivalence)
- ["%" format {"+" format}]]]
- [math
- ["[0]" random]]
- [tool
- [compiler
- ["[0]" version]
- ["[0]" language "_"
- ["[1]/[0]" lux "_"
- ["[1]" version]]]]]
- [world
- ["[0]" console {"+" Console Mock}]]]]
- [///
- ["@[0]" profile]]
- [\\program
- ["[0]" /]])
+ [library
+ [lux "*"
+ ["_" test {"+" Test}]
+ [abstract
+ [monad {"+" do}]]
+ [control
+ ["[0]" maybe]
+ ["[0]" try]
+ ["[0]" exception {"+" exception:}]
+ [concurrency
+ ["[0]" async {"+" Async}]]]
+ [data
+ ["[0]" text ("[1]#[0]" equivalence)
+ ["%" format {"+" format}]]]
+ [math
+ ["[0]" random]]
+ [meta
+ ["lux_[0]" version]]
+ [tool
+ [compiler
+ ["[0]" version]]]
+ [world
+ ["[0]" console {"+" Console Mock}]]]]
+ [///
+ ["@[0]" profile]]
+ [\\program
+ ["[0]" /]])
(exception: .public console_is_closed!)
@@ -73,7 +72,7 @@
verdict (do (try.with async.monad)
[_ (/.do! console profile)
logging (# console read_line [])]
- (in (text#= (version.format language/lux.version)
+ (in (text#= (version.format lux_version.latest)
logging)))]
(_.cover' [/.do!]
(try.else false verdict)))))))
diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux
index 4a7100296..bb4d7aa87 100644
--- a/stdlib/source/test/aedifex/input.lux
+++ b/stdlib/source/test/aedifex/input.lux
@@ -55,7 +55,7 @@
//format.project
%.code
(# utf8.codec encoded))]
- _ (# fs write profile //project.file)
+ _ (# fs write //project.file profile)
actual (is (Async (Try Profile))
(/.read async.monad fs (list //.default)))]
(in (# //.equivalence =
diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux
index c7f63d254..aa2159929 100644
--- a/stdlib/source/test/aedifex/profile.lux
+++ b/stdlib/source/test/aedifex/profile.lux
@@ -20,7 +20,13 @@
[math
["[0]" random {"+" Random} ("[1]#[0]" monad)]
[number
- ["n" nat]]]]]
+ ["n" nat]]]
+ [tool
+ [compiler
+ [meta
+ [cli
+ ["[0]" compiler
+ ["$[1]" \\test]]]]]]]]
[//
["@[0]" artifact]
["@[0]" dependency]]
@@ -125,11 +131,14 @@
(..set_of text.hash ..repository)
(..set_of //dependency.hash @dependency.random)
@dependency.random
+ (..list_of $compiler.random)
(..set_of text.hash ..source)
..target
(random.maybe (random.ascii/alpha 1))
- (random.maybe (random.ascii/alpha 1))
- (..dictionary_of text.hash (random.ascii/alpha 1) ..repository)
+ (random.maybe (random.ascii/alpha 2))
+ (..dictionary_of text.hash (random.ascii/alpha 3) ..repository)
+ (..list_of (random.and (random.ascii/alpha 4)
+ (random.ascii/alpha 5)))
(random#in //runtime.default_java)
(random#in //runtime.default_js)
(random#in //runtime.default_python)
@@ -151,10 +160,10 @@
(_.cover [/.default]
(text#= "" /.default))
- (_.cover [/.default_compiler]
+ (_.cover [/.default_lux]
(|> (# /.monoid identity)
- (the /.#compiler)
- (same? /.default_compiler)))
+ (the /.#lux)
+ (same? /.default_lux)))
(_.cover [/.default_target]
(|> (# /.monoid identity)
(the /.#target)
diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux
index 9cfc118b9..bd2e68612 100644
--- a/stdlib/source/test/aedifex/repository/remote.lux
+++ b/stdlib/source/test/aedifex/repository/remote.lux
@@ -51,12 +51,12 @@
(maybe#each (same? /.user_agent))
(maybe.else false))
(case [method input]
- [@http.#Get {.#None}]
+ [{@http.#Get} {.#None}]
[http/status.ok
[@http.#headers (http.headers (list))
@http.#body (..url_body url)]]
- [@http.#Put {.#Some input}]
+ [{@http.#Put} {.#Some input}]
(if (|> headers
(dictionary.value "Authorization")
(maybe#each (text#= (//identity.basic_auth user password)))