diff options
author | Eduardo Julian | 2022-07-09 14:35:38 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-07-09 14:35:38 -0400 |
commit | 7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 (patch) | |
tree | bd1c865dea0902790f3e462cec4f9bc8d8ae428f /lux-lein | |
parent | fc2737b5226eda69c12bc593e83e22ed54e4d3af (diff) |
First-class programs instead of having a "lux program" extension.
Diffstat (limited to 'lux-lein')
-rw-r--r-- | lux-lein/project.clj | 4 | ||||
-rw-r--r-- | lux-lein/src/leiningen/lux/builder.clj | 11 | ||||
-rw-r--r-- | lux-lein/src/leiningen/lux/test.clj | 4 | ||||
-rw-r--r-- | lux-lein/src/leiningen/lux/utils.clj | 4 |
4 files changed, 9 insertions, 14 deletions
diff --git a/lux-lein/project.clj b/lux-lein/project.clj index d9c1cabc2..9ab37a5f2 100644 --- a/lux-lein/project.clj +++ b/lux-lein/project.clj @@ -1,4 +1,6 @@ -(defproject com.github.luxlang/lein-luxc "0.6.5" +(def version "0.6.6-SNAPSHOT") + +(defproject com.github.luxlang/lein-luxc #=(identity version) :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-lein/src/leiningen/lux/builder.clj b/lux-lein/src/leiningen/lux/builder.clj index 408af5c7b..e25d1818f 100644 --- a/lux-lein/src/leiningen/lux/builder.clj +++ b/lux-lein/src/leiningen/lux/builder.clj @@ -4,15 +4,8 @@ [packager :as &packager]))) (defn build [project] - (if-let [program-module (get-in project [:lux :program])] - ;; (if-let [command (&utils/build-jvm project program-module)] - ;; (when (time (&utils/run-process command - ;; nil - ;; "[COMPILATION BEGAN]" - ;; "[COMPILATION ENDED]")) - ;; true) - ;; ) - (let [command (&utils/compile-path project program-module (get project :source-paths (list)))] + (if-let [[program-module program-definition] (get-in project [:lux :program])] + (let [command (&utils/compile-path project program-module program-definition (get project :source-paths (list)))] (when (time (&utils/run-process command nil "[COMPILATION BEGAN]" diff --git a/lux-lein/src/leiningen/lux/test.clj b/lux-lein/src/leiningen/lux/test.clj index 84ba33d58..a51a2c3bc 100644 --- a/lux-lein/src/leiningen/lux/test.clj +++ b/lux-lein/src/leiningen/lux/test.clj @@ -7,8 +7,8 @@ (def missing-module-error "Please provide a test module in [:lux :test]") (defn test [project] - (if-let [test-module (get-in project [:lux :test])] - (when (time (&utils/run-process (&utils/compile-path project test-module (concat (:test-paths project) (:source-paths project))) + (if-let [[test-module test-definition] (get-in project [:lux :test])] + (when (time (&utils/run-process (&utils/compile-path project test-module test-definition (concat (:test-paths project) (:source-paths project))) nil "[COMPILATION BEGAN]" "[COMPILATION ENDED]")) diff --git a/lux-lein/src/leiningen/lux/utils.clj b/lux-lein/src/leiningen/lux/utils.clj index f18da2831..abcd907c6 100644 --- a/lux-lein/src/leiningen/lux/utils.clj +++ b/lux-lein/src/leiningen/lux/utils.clj @@ -87,7 +87,7 @@ " " (get project :target-path default-target-dir))) (do-template [<name> <mode>] - (defn <name> [project module source-paths] + (defn <name> [project module definition source-paths] (let [is-stdlib? (= stdlib-id (project-id project)) raw-paths (project-jars project) @@ -128,7 +128,7 @@ " -cp " (str compiler-class-path java.io.File/pathSeparator program-class-path) " " (lux-command project <mode> program-dependencies source-paths)))) - compile-path (str "release " module) + compile-path (str "release " module " " definition) repl-path "repl" ) |