aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2021-11-30 23:48:11 -0400
committerEduardo Julian2021-11-30 23:48:11 -0400
commit4334564a5e08956fbe382cdcc69c564f74c35d05 (patch)
treed130775a09e632fe1d3903ada15463728b026a7b
parent872c097327c0a5b3baa69e88dacd09718ddfa793 (diff)
v0.6.5
-rw-r--r--.gitignore2
-rw-r--r--lux-bootstrapper/project.clj2
-rw-r--r--lux-js/commands.md2
-rw-r--r--lux-js/project.lux6
-rw-r--r--lux-jvm-function/commands.md4
-rw-r--r--lux-jvm-function/dependency.pom33
-rw-r--r--lux-jvm/commands.md4
-rw-r--r--lux-jvm/project.clj2
-rw-r--r--lux-lein/project.clj2
-rw-r--r--lux-lua/project.clj12
-rw-r--r--lux-python/project.clj2
-rw-r--r--lux-python/project.lux6
-rw-r--r--lux-ruby/commands.md4
-rw-r--r--lux-ruby/project.clj5
-rw-r--r--stdlib/project.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux68
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux3
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/dependency.lux11
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux4
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://<username>:<password>@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 @@
<groupId>com.github.luxlang</groupId>
<artifactId>lux-jvm-function</artifactId>
<packaging>jar</packaging>
- <version>0.6.5-SNAPSHOT</version>
+ <version>0.6.5</version>
<name>lux-jvm-function</name>
<description>Function abstract class for the JVM compiler.</description>
<url>https://github.com/LuxLang/lux</url>
@@ -17,23 +17,6 @@
<scm>
<url>https://github.com/LuxLang/lux.git</url>
</scm>
- <build>
- <sourceDirectory>source</sourceDirectory>
- <testSourceDirectory>test</testSourceDirectory>
- <resources>
- <resource>
- <directory>resources</directory>
- </resource>
- </resources>
- <testResources>
- <testResource>
- <directory>resources</directory>
- </testResource>
- </testResources>
- <directory>target</directory>
- <outputDirectory>target/classes</outputDirectory>
- <plugins/>
- </build>
<repositories>
<repository>
<id>central</id>
@@ -46,16 +29,6 @@
</releases>
</repository>
<repository>
- <id>clojars</id>
- <url>https://repo.clojars.org/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
<id>snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
@@ -79,7 +52,3 @@
</developers>
</project>
-<!-- This file was autogenerated by Leiningen.
- Please do not edit it directly; instead edit project.clj and regenerate it.
- It should not be considered canonical data. For more information see
- https://github.com/technomancy/leiningen -->
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://<username>:<password>@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://<username>:<password>@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})))))