From 4334564a5e08956fbe382cdcc69c564f74c35d05 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 30 Nov 2021 23:48:11 -0400 Subject: v0.6.5 --- .gitignore | 2 + lux-bootstrapper/project.clj | 2 +- lux-js/commands.md | 2 +- lux-js/project.lux | 6 +- lux-jvm-function/commands.md | 4 +- lux-jvm-function/dependency.pom | 33 +---------- lux-jvm/commands.md | 4 +- lux-jvm/project.clj | 2 +- lux-lein/project.clj | 2 +- lux-lua/project.clj | 12 ++-- lux-python/project.clj | 2 +- lux-python/project.lux | 6 +- lux-ruby/commands.md | 4 +- lux-ruby/project.clj | 5 +- stdlib/project.lux | 12 ++-- .../language/lux/phase/generation/js/function.lux | 8 ++- .../language/lux/phase/generation/js/runtime.lux | 2 +- .../language/lux/phase/generation/python/case.lux | 68 ++++++++++++---------- .../lux/phase/generation/python/function.lux | 6 +- .../language/lux/phase/generation/python/loop.lux | 8 ++- .../lux/phase/generation/python/runtime.lux | 2 +- .../lux/phase/generation/ruby/function.lux | 3 +- .../lux/tool/compiler/meta/archive/dependency.lux | 11 ++++ .../lux/tool/compiler/meta/packager/jvm.lux | 4 +- 24 files changed, 103 insertions(+), 107 deletions(-) diff --git a/.gitignore b/.gitignore index a745e6162..0b6b8cbbd 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ aedifex.jar /jbe +/lux-jvm-function/RELEASE + /lux-bootstrapper/RELEASE /lux-bootstrapper/target /lux-bootstrapper/classes diff --git a/lux-bootstrapper/project.clj b/lux-bootstrapper/project.clj index 2925b57d7..1fb5bc5c9 100644 --- a/lux-bootstrapper/project.clj +++ b/lux-bootstrapper/project.clj @@ -1,4 +1,4 @@ -(def version "0.6.5-SNAPSHOT") +(def version "0.6.5") (defproject com.github.luxlang/lux-bootstrapper #=(identity version) :min-lein-version "2.1.0" ;; 2.1.0 introduced jar classifiers diff --git a/lux-js/commands.md b/lux-js/commands.md index 668bbcf00..26296c771 100644 --- a/lux-js/commands.md +++ b/lux-js/commands.md @@ -48,7 +48,7 @@ cd ~/lux/lux-js/ \ ## Compile Lux's Standard Library's tests using a JS/Node-based compiler. cd ~/lux/stdlib/ \ && lein clean \ -&& node --stack_size=8192 ~/lux/lux-js/lux.js build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux \ +&& node --stack_size=8192 ~/lux/lux-js/target/program.js build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux \ && node ~/lux/stdlib/target/program.js ``` diff --git a/lux-js/project.lux b/lux-js/project.lux index f93a80473..493e3f37f 100644 --- a/lux-js/project.lux +++ b/lux-js/project.lux @@ -1,5 +1,5 @@ ["" - ["identity" ["com.github.luxlang" "lux-js" "0.6.5-SNAPSHOT"] + ["identity" ["com.github.luxlang" "lux-js" "0.6.5"] "info" ["url" "https://github.com/LuxLang/lux" "scm" "https://github.com/LuxLang/lux.git" "licenses" [["name" "Lux License v0.1.2" @@ -15,7 +15,7 @@ "repositories" ["https://oss.sonatype.org/content/repositories/snapshots/" "https://oss.sonatype.org/service/local/staging/deploy/maven2/"] - "dependencies" [... ["com.github.luxlang" "stdlib" "0.6.5-SNAPSHOT" "tar"] + "dependencies" [... ["com.github.luxlang" "stdlib" "0.6.5" "tar"] ] "program" "program"] @@ -24,5 +24,5 @@ ["compiler" ["com.github.luxlang" "lux-js" "0.6.4" "js"]] "jvm" - ["compiler" ["com.github.luxlang" "lux-jvm" "0.6.5-SNAPSHOT" "jar"] + ["compiler" ["com.github.luxlang" "lux-jvm" "0.6.5" "jar"] "dependencies" [["org.openjdk.nashorn" "nashorn-core" "15.1" "jar"]]]] diff --git a/lux-jvm-function/commands.md b/lux-jvm-function/commands.md index a82070bc6..6babdb485 100644 --- a/lux-jvm-function/commands.md +++ b/lux-jvm-function/commands.md @@ -2,10 +2,10 @@ ``` cd ~/lux/lux-jvm-function/ \ -&& mvn install:install-file -Dfile=dependency.jar -DgroupId=com.github.luxlang -DartifactId=lux-jvm-function -Dversion=0.6.5-SNAPSHOT -Dpackaging=jar +&& mvn install:install-file -Dfile=dependency.jar -DgroupId=com.github.luxlang -DartifactId=lux-jvm-function -Dversion=0.6.5 -Dpackaging=jar cd ~/lux/lux-jvm/ && mvn deploy:deploy-file \ --Durl=https://:@oss.sonatype.org/content/repositories/snapshots/ \ +-Durl=https://USERNAME:PASSWORD@oss.sonatype.org/content/repositories/snapshots/ \ -Dfile=target/program.jar \ -DgroupId=com.github.luxlang \ -DartifactId=lux-jvm \ diff --git a/lux-jvm-function/dependency.pom b/lux-jvm-function/dependency.pom index 1c826547f..a4c977946 100644 --- a/lux-jvm-function/dependency.pom +++ b/lux-jvm-function/dependency.pom @@ -4,7 +4,7 @@ com.github.luxlang lux-jvm-function jar - 0.6.5-SNAPSHOT + 0.6.5 lux-jvm-function Function abstract class for the JVM compiler. https://github.com/LuxLang/lux @@ -17,23 +17,6 @@ https://github.com/LuxLang/lux.git - - source - test - - - resources - - - - - resources - - - target - target/classes - - central @@ -45,16 +28,6 @@ true - - clojars - https://repo.clojars.org/ - - true - - - true - - snapshots https://oss.sonatype.org/content/repositories/snapshots/ @@ -79,7 +52,3 @@ - diff --git a/lux-jvm/commands.md b/lux-jvm/commands.md index 81a36643a..cf4e13b01 100644 --- a/lux-jvm/commands.md +++ b/lux-jvm/commands.md @@ -40,10 +40,10 @@ cd ~/lux/stdlib/ \ ``` cd ~/lux/lux-jvm/ \ -&& mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-jvm -Dversion=0.6.5-SNAPSHOT -Dpackaging=jar +&& mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-jvm -Dversion=0.6.5 -Dpackaging=jar cd ~/lux/lux-jvm/ && mvn deploy:deploy-file \ --Durl=https://:@oss.sonatype.org/content/repositories/snapshots/ \ +-Durl=https://USERNAME:PASSWORD@oss.sonatype.org/content/repositories/snapshots/ \ -Dfile=target/program.jar \ -DgroupId=com.github.luxlang \ -DartifactId=lux-jvm \ diff --git a/lux-jvm/project.clj b/lux-jvm/project.clj index decc82785..0705d6f8b 100644 --- a/lux-jvm/project.clj +++ b/lux-jvm/project.clj @@ -1,4 +1,4 @@ -(def version "0.6.5-SNAPSHOT") +(def version "0.6.5") (def repo "https://github.com/LuxLang/lux") (def sonatype "https://oss.sonatype.org") (def sonatype-releases (str sonatype "/service/local/staging/deploy/maven2/")) diff --git a/lux-lein/project.clj b/lux-lein/project.clj index 05e1c9c92..d9c1cabc2 100644 --- a/lux-lein/project.clj +++ b/lux-lein/project.clj @@ -1,4 +1,4 @@ -(defproject com.github.luxlang/lein-luxc "0.6.5-SNAPSHOT" +(defproject com.github.luxlang/lein-luxc "0.6.5" :description "The Leiningen plugin for the Lux programming language." :url "https://github.com/LuxLang/lux" :license {:name "Lux License v0.1.2" diff --git a/lux-lua/project.clj b/lux-lua/project.clj index d573b119d..d6ae33e81 100644 --- a/lux-lua/project.clj +++ b/lux-lua/project.clj @@ -1,4 +1,4 @@ -(def version "0.6.4") +(def lux_version "0.6.5") (def repo "https://github.com/LuxLang/lux") (def sonatype-releases "https://oss.sonatype.org/service/local/staging/deploy/maven2/") (def sonatype-snapshots "https://oss.sonatype.org/content/repositories/snapshots/") @@ -6,7 +6,7 @@ (def asm_version "5.0.4") (def rembulan_version "0.1") -(defproject com.github.luxlang/lux-lua #=(identity version) +(defproject com.github.luxlang/lux-lua #=(identity lux_version) :description "A Lua compiler for Lux." :url ~repo :license {:name "Lux License v0.1.2" @@ -21,9 +21,9 @@ :deploy-repositories [["releases" {:url ~sonatype-releases :creds :gpg}] ["snapshots" {:url ~sonatype-snapshots :creds :gpg}]] - :plugins [[com.github.luxlang/lein-luxc ~version]] - :dependencies [[com.github.luxlang/lux-bootstrapper ~version] - ;; [com.github.luxlang/stdlib ~version] + :plugins [[com.github.luxlang/lein-luxc ~lux_version]] + :dependencies [[com.github.luxlang/lux-bootstrapper ~lux_version] + ;; [com.github.luxlang/stdlib ~lux_version] [org.ow2.asm/asm ~asm_version] [org.ow2.asm/asm-commons ~asm_version] @@ -35,7 +35,7 @@ [com.github.luxlang/rembulan-stdlib ~rembulan_version] [com.github.luxlang/rembulan-compiler ~rembulan_version]] - :manifest {"lux" ~version} + :manifest {"lux" ~lux_version} :source-paths ["source"] :lux {:program "program"} ) diff --git a/lux-python/project.clj b/lux-python/project.clj index 8f5e52356..8ceeb90ad 100644 --- a/lux-python/project.clj +++ b/lux-python/project.clj @@ -1,4 +1,4 @@ -(def version "0.6.4") +(def version "0.6.5") (def repo "https://github.com/LuxLang/lux") (def sonatype-releases "https://oss.sonatype.org/service/local/staging/deploy/maven2/") (def sonatype-snapshots "https://oss.sonatype.org/content/repositories/snapshots/") diff --git a/lux-python/project.lux b/lux-python/project.lux index c4cfad542..916dbd5a9 100644 --- a/lux-python/project.lux +++ b/lux-python/project.lux @@ -1,5 +1,5 @@ ["" - ["identity" ["com.github.luxlang" "lux-python" "0.6.4"] + ["identity" ["com.github.luxlang" "lux-python" "0.6.5"] "description" "A Python compiler for Lux." "info" ["url" "https://github.com/LuxLang/lux" "scm" "https://github.com/LuxLang/lux.git" @@ -15,8 +15,8 @@ "repositories" ["https://oss.sonatype.org/content/repositories/snapshots/" "https://oss.sonatype.org/service/local/staging/deploy/maven2/"] - "compiler" ["com.github.luxlang" "lux-jvm" "0.6.4" "jar"] - "dependencies" [... ["com.github.luxlang" "stdlib" "0.6.4" "tar"] + "compiler" ["com.github.luxlang" "lux-jvm" "0.6.5" "jar"] + "dependencies" [... ["com.github.luxlang" "stdlib" "0.6.5" "tar"] ["org.python" "jython-standalone" "2.7.2" "jar"]] "program" "program"]] diff --git a/lux-ruby/commands.md b/lux-ruby/commands.md index cbdc685e1..62cb5f451 100644 --- a/lux-ruby/commands.md +++ b/lux-ruby/commands.md @@ -34,10 +34,10 @@ cd ~/lux/stdlib/ \ ``` cd ~/lux/lux-ruby/ \ -&& mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-ruby -Dversion=0.6.5-SNAPSHOT -Dpackaging=jar +&& mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-ruby -Dversion=0.6.6-SNAPSHOT -Dpackaging=jar cd ~/lux/lux-ruby/ && mvn deploy:deploy-file \ --Durl=https://:@oss.sonatype.org/content/repositories/snapshots/ \ +-Durl=https://USERNAME:PASSWORD@oss.sonatype.org/content/repositories/snapshots/ \ -Dfile=target/program.jar \ -DgroupId=com.github.luxlang \ -DartifactId=lux-ruby \ diff --git a/lux-ruby/project.clj b/lux-ruby/project.clj index 070864215..aabf9400f 100644 --- a/lux-ruby/project.clj +++ b/lux-ruby/project.clj @@ -1,4 +1,4 @@ -(def version "0.6.4") +(def version "0.6.5") (def repo "https://github.com/LuxLang/lux") (def sonatype-releases "https://oss.sonatype.org/service/local/staging/deploy/maven2/") (def sonatype-snapshots "https://oss.sonatype.org/content/repositories/snapshots/") @@ -14,8 +14,7 @@ [:name "Eduardo Julian"] [:url "https://github.com/eduardoejp"]]] - :repositories [["releases" ~sonatype-releases] - ["snapshots" ~sonatype-snapshots]] + :repositories [["snapshots" ~sonatype-snapshots]] :deploy-repositories [["releases" {:url ~sonatype-releases :creds :gpg}] ["snapshots" {:url ~sonatype-snapshots :creds :gpg}]] diff --git a/stdlib/project.lux b/stdlib/project.lux index 1dfe84e5b..1f9e41d0e 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-SNAPSHOT"] + "identity" ["com.github.luxlang" "stdlib" "0.6.5"] ... Every piece of information, and the whole "info" bundle, are optional. "info" ["url" "https://github.com/LuxLang/lux" @@ -41,7 +41,7 @@ ... The following are alternative profiles to use in various situations. "jvm" [... "compiler" specifies the dependency to fetch and use as the compiler. - "compiler" ["com.github.luxlang" "lux-jvm" "0.6.5-SNAPSHOT" "jar"] + "compiler" ["com.github.luxlang" "lux-jvm" "0.6.5" "jar"] ... "dependencies" is an optional list of dependencies to fetch. ... The dependencies have the same shape as when specifying the compiler. ... When omitting the packaging format of the dependency, "tar" will be assumed. @@ -52,25 +52,25 @@ ] "js" - ["compiler" ["com.github.luxlang" "lux-js" "0.6.4" "js"] + ["compiler" ["com.github.luxlang" "lux-js" "0.6.5" "js"] ... The OS command to use when running JS tests. The default is described below. ... "js" ["node" "--stack_size=8192"] ] "lua" - ["compiler" ["com.github.luxlang" "lux-lua" "0.6.4" "jar"] + ["compiler" ["com.github.luxlang" "lux-lua" "0.6.5" "jar"] ... The OS command to use when running Lua tests. The default is described below. ... "lua" ["lua"] ] "python" - ["compiler" ["com.github.luxlang" "lux-python" "0.6.4" "jar"] + ["compiler" ["com.github.luxlang" "lux-python" "0.6.5" "jar"] ... The OS command to use when running Python tests. The default is described below. ... "python" ["python3"] ] "ruby" - ["compiler" ["com.github.luxlang" "lux-ruby" "0.6.5-SNAPSHOT" "jar"] + ["compiler" ["com.github.luxlang" "lux-ruby" "0.6.5" "jar"] ... The OS command to use when running Ruby tests. The default is described below. ... "ruby" ["ruby"] ] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux index 91c0262ef..ca4b71fa0 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux @@ -25,7 +25,10 @@ [arity {"+" Arity}] ["[1][0]" phase ("[1]#[0]" monad)] [reference - [variable {"+" Register Variable}]]]]]]) + [variable {"+" Register Variable}]] + [meta + [archive + ["[0]" dependency]]]]]]]) (def: .public (apply expression archive [functionS argsS+]) (Generator (Application Synthesis)) @@ -68,7 +71,8 @@ (def: .public (function statement expression archive [environment arity bodyS]) (-> Phase! (Generator (Abstraction Synthesis))) (do [! ///////phase.monad] - [[function_name body!] (/////generation.with_new_context archive + [dependencies (dependency.dependencies archive bodyS) + [function_name body!] (/////generation.with_new_context archive dependencies (do ! [scope (# ! each ..@scope (/////generation.context archive))] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux index 1fdba6ac2..1bf29150f 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux @@ -782,7 +782,7 @@ [_ (/////generation.execute! ..runtime) _ (/////generation.save! ..module_id {.#None} ..runtime)] (in [(|> artifact.empty - artifact.resource + (artifact.resource true artifact.no_dependencies) product.right) (sequence.sequence [..module_id {.#None} diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux index 4be219e6f..d65324f5a 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux @@ -1,38 +1,39 @@ (.using - [library - [lux {"-" case let if symbol} - [abstract - ["[0]" monad {"+" do}]] - [data - ["[0]" text - ["%" format {"+" format}]] - [collection - ["[0]" list ("[1]#[0]" functor mix)] - ["[0]" set]]] - [math - [number - ["n" nat] - ["i" int]]] - [target - ["_" python {"+" Expression SVar Statement}]]]] - ["[0]" // "_" - ["[1][0]" runtime {"+" Operation Phase Generator Phase! Generator!}] + [library + [lux {"-" case let if symbol} + [abstract + ["[0]" monad {"+" do}]] + [data + ["[0]" text + ["%" format {"+" format}]] + [collection + ["[0]" list ("[1]#[0]" functor mix)] + ["[0]" set]]] + [math + [number + ["n" nat] + ["i" int]]] + [target + ["_" python {"+" Expression SVar Statement}]]]] + ["[0]" // "_" + ["[1][0]" runtime {"+" Operation Phase Generator Phase! Generator!}] + ["[1][0]" reference] + ["[1][0]" primitive] + ["/[1]" // "_" ["[1][0]" reference] - ["[1][0]" primitive] ["/[1]" // "_" - ["[1][0]" reference] + [synthesis + ["[0]" case]] ["/[1]" // "_" - [synthesis - ["[0]" case]] - ["/[1]" // "_" - ["[1][0]" synthesis {"+" Member Synthesis Path}] - ["[1][0]" generation] - ["//[1]" /// "_" - [reference - ["[1][0]" variable {"+" Register}]] - ["[1][0]" phase ("[1]#[0]" monad)] - [meta - [archive {"+" Archive}]]]]]]]) + ["[1][0]" synthesis {"+" Member Synthesis Path}] + ["[1][0]" generation] + ["//[1]" /// "_" + [reference + ["[1][0]" variable {"+" Register}]] + ["[1][0]" phase ("[1]#[0]" monad)] + [meta + [archive {"+" Archive} + ["[0]" dependency]]]]]]]]) (def: .public (symbol prefix) (-> Text (Operation SVar)) @@ -323,7 +324,10 @@ (def: .public (case statement expression archive [valueS pathP]) (-> Phase! (Generator [Synthesis Path])) (do ///////phase.monad - [[[case_module case_artifact] pattern_matching!] (/////generation.with_new_context archive + [dependencies (dependency.path_dependencies archive pathP) + [[case_module case_artifact] pattern_matching!] (/////generation.with_new_context + archive + dependencies (case! true statement expression archive [valueS pathP])) .let [@case (_.var (///reference.artifact [case_module case_artifact])) @dependencies+ (..dependencies (/////synthesis.path/seq (/////synthesis.path/then valueS) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux index 773f28270..816353edd 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux @@ -29,7 +29,8 @@ [variable {"+" Register Variable}]] [meta [archive {"+" Archive} - ["[0]" artifact]]]]]]]) + ["[0]" artifact] + ["[0]" dependency]]]]]]]) (def: .public (apply expression archive [functionS argsS+]) (Generator (Application Synthesis)) @@ -69,7 +70,8 @@ (def: .public (function statement expression archive [environment arity bodyS]) (-> Phase! (Generator (Abstraction Synthesis))) (do [! ///////phase.monad] - [[[function_module function_artifact] body!] (/////generation.with_new_context archive + [dependencies (dependency.dependencies archive bodyS) + [[function_module function_artifact] body!] (/////generation.with_new_context archive dependencies (/////generation.with_anchor 1 (statement expression archive bodyS))) environment (monad.each ! (expression archive) environment) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux index 304e5ef01..163ce3b9d 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux @@ -28,6 +28,9 @@ ["[1][0]" generation] ["//[1]" /// "_" ["[1][0]" phase] + [meta + [archive + ["[0]" dependency]]] [reference ["[1][0]" variable {"+" Register}]]]]]]]) @@ -74,8 +77,9 @@ ... true loop _ (do [! ///////phase.monad] - [initsO+ (monad.each ! (expression archive) initsS+) - [[loop_module loop_artifact] body!] (/////generation.with_new_context archive + [dependencies (dependency.dependencies archive bodyS) + initsO+ (monad.each ! (expression archive) initsS+) + [[loop_module loop_artifact] body!] (/////generation.with_new_context archive dependencies (/////generation.with_anchor start (statement expression archive bodyS))) .let [@loop (_.var (///reference.artifact [loop_module loop_artifact])) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux index 1b89fd694..2f99ad62b 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux @@ -453,7 +453,7 @@ [_ (/////generation.execute! ..runtime) _ (/////generation.save! ..module_id {.#None} ..runtime)] (in [(|> artifact.empty - artifact.resource + (artifact.resource true artifact.no_dependencies) product.right) (sequence.sequence [..module_id {.#None} diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux index 1c4bee276..ccad8ba2a 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux @@ -28,8 +28,7 @@ [reference [variable {"+" Register Variable}]] [meta - [archive {"+" Archive} - ["[0]" artifact] + [archive ["[0]" dependency]]]]]]]) (def: .public (apply expression archive [functionS argsS+]) diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/dependency.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/dependency.lux index 70f5b5744..5961a373f 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/archive/dependency.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/archive/dependency.lux @@ -164,6 +164,17 @@ (monad.each ! (generation.remember archive)) (# ! each (set.of_list context_hash))))) +(def: .public (path_dependencies archive value) + (All (_ anchor expression directive) + (-> Archive Path (Operation anchor expression directive (Set artifact.Dependency)))) + (let [! phase.monad] + (|> value + (..path_references ..references) + (set.of_list symbol.hash) + set.list + (monad.each ! (generation.remember archive)) + (# ! each (set.of_list context_hash))))) + (def: .public all (-> (List (Set artifact.Dependency)) (Set artifact.Dependency)) diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux index bab2f6ed9..b4b1df413 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux @@ -269,4 +269,6 @@ .let [_ (do_to sink (java/io/Flushable::flush) (java/io/Closeable::close))]] - (in (java/io/ByteArrayOutputStream::toByteArray buffer))))) + (in (|> buffer + java/io/ByteArrayOutputStream::toByteArray + {.#Left}))))) -- cgit v1.2.3