aboutsummaryrefslogtreecommitdiff
path: root/lux-lein/src/leiningen
diff options
context:
space:
mode:
authorEduardo Julian2022-07-09 14:35:38 -0400
committerEduardo Julian2022-07-09 14:35:38 -0400
commit7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 (patch)
treebd1c865dea0902790f3e462cec4f9bc8d8ae428f /lux-lein/src/leiningen
parentfc2737b5226eda69c12bc593e83e22ed54e4d3af (diff)
First-class programs instead of having a "lux program" extension.
Diffstat (limited to 'lux-lein/src/leiningen')
-rw-r--r--lux-lein/src/leiningen/lux/builder.clj11
-rw-r--r--lux-lein/src/leiningen/lux/test.clj4
-rw-r--r--lux-lein/src/leiningen/lux/utils.clj4
3 files changed, 6 insertions, 13 deletions
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"
)