Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+site without a +cljs option leads to broken project #550

Open
Ramblurr opened this issue Oct 15, 2021 · 2 comments
Open

+site without a +cljs option leads to broken project #550

Ramblurr opened this issue Oct 15, 2021 · 2 comments

Comments

@Ramblurr
Copy link

Ramblurr commented Oct 15, 2021

lein new luminus my-project +sqlite +sassc +site
cd my-project
lein run

result:

java.lang.Exception: Error loading /home/user/src/proj/my-project/project.clj
 at leiningen.core.project$read_raw$fn__8050.invoke (project.clj:1104)
    leiningen.core.project$read_raw.invokeStatic (project.clj:1098)
    leiningen.core.project$read_raw.invoke (project.clj:1094)
    leiningen.core.project$read.invokeStatic (project.clj:1115)
    leiningen.core.project$read.invoke (project.clj:1112)
    leiningen.core.project$read.invokeStatic (project.clj:1116)
    leiningen.core.project$read.invoke (project.clj:1112)
    leiningen.core.main$_main$fn__7423.invoke (main.clj:448)
    leiningen.core.main$_main.invokeStatic (main.clj:442)
    leiningen.core.main$_main.doInvoke (main.clj:439)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.main$main_opt.invokeStatic (main.clj:514)
    clojure.main$main_opt.invoke (main.clj:510)
    clojure.main$main.invokeStatic (main.clj:664)
    clojure.main$main.doInvoke (main.clj:616)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.main.main (main.java:40)
Caused by: clojure.lang.Compiler$CompilerException: Syntax error reading source at (/home/user/src/proj/my-project/project.clj:72:53).
#:clojure.error{:phase :read-source, :line 72, :column 53, :source "/home/user/src/proj/my-project/project.clj"}
 at clojure.lang.Compiler.load (Compiler.java:7647)
    clojure.lang.Compiler.loadFile (Compiler.java:7578)
    clojure.lang.RT$3.invoke (RT.java:327)
    leiningen.core.project$read_raw$fn__8050.invoke (project.clj:1102)
    leiningen.core.project$read_raw.invokeStatic (project.clj:1098)
    leiningen.core.project$read_raw.invoke (project.clj:1094)
    leiningen.core.project$read.invokeStatic (project.clj:1115)
    leiningen.core.project$read.invoke (project.clj:1112)
    leiningen.core.project$read.invokeStatic (project.clj:1116)
    leiningen.core.project$read.invoke (project.clj:1112)
    leiningen.core.main$_main$fn__7423.invoke (main.clj:448)
    leiningen.core.main$_main.invokeStatic (main.clj:442)
    leiningen.core.main$_main.doInvoke (main.clj:439)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.main$main_opt.invokeStatic (main.clj:514)
    clojure.main$main_opt.invoke (main.clj:510)
    clojure.main$main.invokeStatic (main.clj:664)
    clojure.main$main.doInvoke (main.clj:616)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.main.main (main.java:40)
Caused by: java.lang.RuntimeException: Map literal must contain an even number of forms
 at clojure.lang.Util.runtimeException (Util.java:221)
    clojure.lang.LispReader$MapReader.invoke (LispReader.java:1357)
    clojure.lang.LispReader.read (LispReader.java:285)
    clojure.lang.LispReader.readDelimitedList (LispReader.java:1398)
    clojure.lang.LispReader$MapReader.invoke (LispReader.java:1355)
    clojure.lang.LispReader.read (LispReader.java:285)
    clojure.lang.LispReader.readDelimitedList (LispReader.java:1398)
    clojure.lang.LispReader$ListReader.invoke (LispReader.java:1243)
    clojure.lang.LispReader.read (LispReader.java:285)
    clojure.lang.LispReader.read (LispReader.java:216)
    clojure.lang.Compiler.load (Compiler.java:7634)
    clojure.lang.Compiler.loadFile (Compiler.java:7578)
    clojure.lang.RT$3.invoke (RT.java:327)
    leiningen.core.project$read_raw$fn__8050.invoke (project.clj:1102)
    leiningen.core.project$read_raw.invokeStatic (project.clj:1098)
    leiningen.core.project$read_raw.invoke (project.clj:1094)
    leiningen.core.project$read.invokeStatic (project.clj:1115)
    leiningen.core.project$read.invoke (project.clj:1112)
    leiningen.core.project$read.invokeStatic (project.clj:1116)
    leiningen.core.project$read.invoke (project.clj:1112)
    leiningen.core.main$_main$fn__7423.invoke (main.clj:448)
    leiningen.core.main$_main.invokeStatic (main.clj:442)
    leiningen.core.main$_main.doInvoke (main.clj:439)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.main$main_opt.invokeStatic (main.clj:514)
    clojure.main$main_opt.invoke (main.clj:510)
    clojure.main$main.invokeStatic (main.clj:664)
    clojure.main$main.doInvoke (main.clj:616)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.main.main (main.java:40)

project.clj:

...snip
  :profiles
  {:uberjar {:omit-source true
             
                  :cljsbuild
             
             
             :aot :all
             :uberjar-name "probematic.jar"
             :source-paths ["env/prod/clj" ]
             :resource-paths ["env/prod/resources"]}

   :dev           [:project/dev :profiles/dev]
   :test          [:project/dev :project/test :profiles/test]

   :project/dev  {:jvm-opts ["-Dconf=dev-config.edn" ]
                  :dependencies [[binaryage/devtools "1.0.3"]
                                 [cider/piggieback "0.5.2"]
                                 [doo "0.1.11"]
                                 [org.clojure/tools.namespace "1.1.0"]
                                 [pjstadig/humane-test-output "0.11.0"]
                                 [prone "2021-04-23"]
                                 [ring/ring-devel "1.9.4"]
                                 [ring/ring-mock "0.4.0"]]
                  :plugins      [[com.jakemccrary/lein-test-refresh "0.24.1"]
                                 [jonase/eastwood "0.3.5"]
                                 [cider/cider-nrepl "0.26.0"]] 
                  :cljsbuild
                  
                  
                  :doo {:build "test"}
                  :source-paths ["env/dev/clj" ]
                  :resource-paths ["env/dev/resources"]
                  :repl-options {:init-ns user
                                 :timeout 120000}
                  :injections [(require 'pjstadig.humane-test-output)
                               (pjstadig.humane-test-output/activate!)]}
   :project/test {:jvm-opts ["-Dconf=test-config.edn" ]
                  :resource-paths ["env/test/resources"] 
                  :cljsbuild
                  }
   :profiles/dev {}
   :profiles/test {}})

Those three :cljsbuild are breaking it.

@Ramblurr
Copy link
Author

Even when I remove those keys to prevent syntax errors, on boot I'm presented with the cljs placeholder... but I didn't ask for cljs in my project at all.

image

@Ramblurr
Copy link
Author

but I didn't ask for cljs in my project at all.

Ahh... that is incorrect. +site says "+site - creates template for site using the specified database (H2 by default) and ClojureScript". I didn't see that last bit.

Regenerating without +site works fine. I guess this is still a bug since +site should error out if one of the cljs options isn't passed?

@Ramblurr Ramblurr changed the title luminus 4.19 - fresh project does not run .Caused by: java.lang.RuntimeException: Map literal must contain an even number of forms +site without a +cljs option leads to broken project Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant