technomancy/slamhound

Stack overflow

Closed this issue · 4 comments

My profiles.clj:

{:user {:plugins [[http-kit/lein-template "1.0.0-SNAPSHOT"]
                   [lein-ancient "LATEST"]]
         :dependencies [[slamhound "1.3.3"]]
         :aliases {"slamhound" ["with-profile" "no-aot" "run" "-m" "slam.hound"]}}
 :no-aot [:default {:aot ^:replace []}]}

project.clj:

; this is a modified http-kit template

(defproject mandelbulb "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  ;; The -main function in this namespace will be run at launch
  ;; (either via `lein run` or from an uberjar). It should be variadic:
  ;; (defn -main
  ;; "Application entry point"
  ;; [& args]
  ;; (comment Do app initialization here))
  :main mandelbulb.main

  ;; These namespaces will be AOT-compiled. Needed for gen-class and
  ;; other Java interop functionality. Put a regex here to compile all
  ;; namespaces whose names match.
  :aot [mandelbulb.main]

  ; this is now a :dev profile dependency. we want it that way.
  ;  :plugins [[lein-cljsbuild "LATEST"]] ; :dev-dependencies was a lein 1.x thing

  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/tools.cli "LATEST"]
                 [compojure "LATEST"] ; includes ring
                 [http-kit "LATEST"]
                 [com.taoensso/timbre "LATEST"] ; logging
                 [enlive "LATEST"] ; server-side templates
                 [cheshire "LATEST"] ; json
                 [jayq "LATEST"]
                 [leiningen "LATEST"
                  :exclusions [stencil
                               org.apache.maven.indexer/indexer-core
                               reply slingshot cheshire clj-http
                               pedantic]]
                 ; database?

                 ; [http-kit/dbcp "0.1.0"] ;; database access
                 ; [ch.qos.logback/logback-classic "1.0.1"]                 
                 ; [me.shenfeng/mustache "1.1"]
                 ]
  :repl-options {; Customize the socket the repl task listens on and
                 ;; attaches to.
                 ;:host "0.0.0.0"
                 ;:port 4001
                 :init (mandelbulb.main/repl-hook)}

  ; clojure source code path (for web apps, often "src/clj")
  :source-paths ["src/server" "src/shared" "src/client/mandelbulb/macros"]
  :resource-paths ["resources"] ; Non-code files included in classpath/jar.
  ; :compile-path "target/classes" ; For .class files.
  ; :target-path "target/" ; Where to place the project's jar file.
  :omit-source true ; Leave the contents of :source-paths out of jars (for AOT projects).

  ;; Sets the values of global variables within Clojure
  ;; This example disables all pre- and post-conditions and emits warnings
  ;; on reflective calls. See the Clojure documentation for the list of valid
  ;; global variables to set (and their meaningful values).
  :global-vars {*warn-on-reflection* true
                ;*assert* false
                }

  ;; By default the :dev, :provided, :user, and :base profiles are activated for
  ;; each task, but the settings they provide are not propagated downstream to
  ;; projects that depend upon yours.
  ;; See: https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md
  :profiles {:dev {; always gets run
                   :dependencies [[com.cemerick/pomegranate "LATEST"]
                                  [lein-cljsbuild "LATEST"]]
                   }
             :debug {:debug true
                     ;:injections [(prn (into {} (System/getProperties)))]
                     }
             :update {;; How often should this repository be checked
                      ;; for updates? (:daily, :always, or :never)
                      :update :always
                      }
             }

  :cljsbuild {:crossovers []
              :builds
              {
               :debug {:source-paths ["src/client" "src/shared"]
                       :compiler
                       {:output-to "resources/public/includes/js/mandelbrot-dbg.js"
                        :optimizations :whitespace}
                       }
               :release {:source-paths ["src/client" "src/shared"]
                         :compiler
                         {:output-to "resources/public/includes/js/mandelbrot.js"
                          :optimizations :advanced
                          }}}
              }  
  )

The problem:

$ lein slamhound src/server/mandelbulb/main.clj
Performing task 'run' with profile(s): 'no-aot'
Reflection warning, NO_SOURCE_PATH:1:856 - call to invokeStaticMethod can't be resolved.
Reflection warning, slam/hound/regrow.clj:18:3 - call to isUpperCase can't be resolved.
Reflection warning, slam/hound/regrow.clj:66:42 - call to split can't be resolved.
Reflection warning, slam/hound/regrow.clj:66:42 - call to split can't be resolved.
Reflection warning, bultitude/core.clj:12:13 - reference to field isDirectory can't be resolved.
Reflection warning, bultitude/core.clj:13:19 - reference to field getName can't be resolved.
Reflection warning, bultitude/core.clj:13:8 - call to endsWith can't be resolved.
Reflection warning, bultitude/core.clj:16:8 - reference to field isFile can't be resolved.
Reflection warning, bultitude/core.clj:16:31 - reference to field getName can't be resolved.
Reflection warning, bultitude/core.clj:16:20 - call to endsWith can't be resolved.
Reflection warning, bultitude/core.clj:40:29 - reference to field canRead can't be resolved.
Reflection warning, bultitude/core.clj:40:29 - reference to field canRead can't be resolved.
Reflection warning, bultitude/core.clj:47:59 - reference to field getName can't be resolved.
Reflection warning, bultitude/core.clj:47:40 - call to getEntry can't be resolved.
Reflection warning, bultitude/core.clj:47:23 - call to getInputStream can't be resolved.
Reflection warning, bultitude/core.clj:55:19 - call to java.util.jar.JarFile ctor can't be resolved.
Reflection warning, bultitude/core.clj:65:3 - call to split can't be resolved.
Reflection warning, bultitude/core.clj:92:5 - reference to field isDirectory can't be resolved.
Reflection warning, bultitude/core.clj:95:40 - call to replaceAll can't be resolved.
Reflection warning, bultitude/core.clj:96:40 - call to replaceAll can't be resolved.
Reflection warning, clojure/data/xml.clj:228:17 - call to createXMLStreamReader can't be resolved.
Reflection warning, clojure/data/xml.clj:292:5 - call to transform can't be resolved.
Reflection warning, fs/core.clj:59:9 - reference to field isAbsolute can't be resolved.
Reflection warning, fs/core.clj:66:8 - reference to field list can't be resolved.
Reflection warning, fs/core.clj:71:3 - reference to field canExecute can't be resolved.
Reflection warning, fs/core.clj:76:3 - reference to field canRead can't be resolved.
Reflection warning, fs/core.clj:81:3 - reference to field canWrite can't be resolved.
Reflection warning, fs/core.clj:86:3 - reference to field delete can't be resolved.
Reflection warning, fs/core.clj:92:3 - reference to field exists can't be resolved.
Reflection warning, fs/core.clj:97:3 - reference to field getAbsolutePath can't be resolved.
Reflection warning, fs/core.clj:102:3 - reference to field getCanonicalFile can't be resolved.
Reflection warning, fs/core.clj:108:11 - reference to field getName can't be resolved.
Reflection warning, fs/core.clj:110:17 - reference to field getName can't be resolved.
Reflection warning, fs/core.clj:111:37 - call to endsWith can't be resolved.
Reflection warning, fs/core.clj:112:51 - reference to field length can't be resolved.
Reflection warning, fs/core.clj:112:66 - reference to field length can't be resolved.
Reflection warning, fs/core.clj:114:33 - call to lastIndexOf can't be resolved.
Reflection warning, fs/core.clj:121:3 - reference to field isDirectory can't be resolved.
Reflection warning, fs/core.clj:126:3 - reference to field isFile can't be resolved.
Reflection warning, fs/core.clj:132:11 - call to lastIndexOf can't be resolved.
Reflection warning, fs/core.clj:148:3 - reference to field getParentFile can't be resolved.
Reflection warning, fs/core.clj:153:3 - reference to field lastModified can't be resolved.
Reflection warning, fs/core.clj:158:3 - reference to field length can't be resolved.
Reflection warning, fs/core.clj:163:3 - reference to field mkdir can't be resolved.
Reflection warning, fs/core.clj:169:3 - reference to field mkdirs can't be resolved.
Reflection warning, fs/core.clj:189:3 - call to renameTo can't be resolved.
Reflection warning, fs/core.clj:193:15 - reference to field exists can't be resolved.
Reflection warning, fs/core.clj:194:7 - reference to field createNewFile can't be resolved.
Reflection warning, fs/core.clj:259:10 - call to listFiles can't be resolved.
Reflection warning, fs/core.clj:272:11 - reference to field isDirectory can't be resolved.
Reflection warning, fs/core.clj:275:3 - reference to field listFiles can't be resolved.
Reflection warning, fs/core.clj:278:3 - reference to field getName can't be resolved.
Reflection warning, fs/core.clj:307:5 - call to setLastModified can't be resolved.
Reflection warning, fs/core.clj:328:27 - call to setReadable can't be resolved.
Reflection warning, fs/core.clj:329:27 - call to setWritable can't be resolved.
Reflection warning, fs/core.clj:330:27 - call to setExecutable can't be resolved.
Reflection warning, fs/core.clj:350:23 - reference to field getPath can't be resolved.
Reflection warning, fs/core.clj:351:34 - reference to field getPath can't be resolved.
Reflection warning, fs/core.clj:367:38 - reference to field list can't be resolved.
Reflection warning, useful/exception.clj:19:13 - reference to field getMessage can't be resolved.
Reflection warning, net/cgrand/xml.clj:85:4 - call to parse can't be resolved.
Reflection warning, ring/middleware/multipart_params/byte_array.clj:14:23 - call to toByteArray can't be resolved.
Reflection warning, leiningen/cljsbuild/subproject.clj:14:9 - call to java.lang.Integer ctor can't be resolved.
Reflection warning, ring/middleware/resource.clj:15:18 - call to substring can't be resolved.
Reflection warning, ring/util/io.clj:31:29 - call to getBytes can't be resolved.
Reflection warning, classlojure/io.clj:30:6 - reference to field close can't be resolved.
Reflection warning, fs/compression.clj:14:16 - call to java.util.zip.ZipFile ctor can't be resolved.
Reflection warning, fs/compression.clj:16:45 - reference to field getName can't be resolved.
Reflection warning, fs/compression.clj:17:41 - reference to field isDirectory can't be resolved.
Reflection warning, fs/compression.clj:17:41 - reference to field isDirectory can't be resolved.
Reflection warning, fs/compression.clj:26:20 - reference to field getNextTarEntry can't be resolved.
Reflection warning, fs/compression.clj:34:51 - reference to field isDirectory can't be resolved.
Reflection warning, fs/compression.clj:35:50 - reference to field getName can't be resolved.
Reflection warning, fs/compression.clj:34:51 - reference to field isDirectory can't be resolved.
Reflection warning, fs/compression.clj:35:50 - reference to field getName can't be resolved.
Reflection warning, expectations.clj:92:16 - reference to field getStackTrace can't be resolved.
Reflection warning, expectations.clj:93:10 - reference to field getFileName can't be resolved.
Reflection warning, expectations.clj:93:31 - reference to field getLineNumber can't be resolved.
Reflection warning, expectations.clj:140:61 - reference to field getStackTrace can't be resolved.
Reflection warning, expectations.clj:188:71 - reference to field getMessage can't be resolved.
Reflection warning, expectations.clj:208:58 - reference to field name can't be resolved.
Reflection warning, expectations.clj:494:17 - reference to field pattern can't be resolved.
Reflection warning, expectations.clj:494:30 - reference to field pattern can't be resolved.
Reflection warning, expectations.clj:720:18 - reference to field getMessage can't be resolved.
Reflection warning, expectations.clj:726:18 - reference to field getMessage can't be resolved.
Reflection warning, expectations.clj:732:18 - reference to field getMessage can't be resolved.
Reflection warning, expectations.clj:738:18 - reference to field getMessage can't be resolved.
Reflection warning, expectations.clj:744:18 - reference to field getMessage can't be resolved.
Reflection warning, expectations.clj:823:16 - reference to field ns can't be resolved.
Reflection warning, expectations.clj:823:28 - reference to field sym can't be resolved.
Reflection warning, ring/middleware/session/cookie.clj:81:27 - reference to field getBytes can't be resolved.
Reflection warning, net/cgrand/enlive_html.clj:38:3 - call to parse can't be resolved.
Reflection warning, net/cgrand/enlive_html.clj:55:18 - call to org.xml.sax.InputSource ctor can't be resolved.
Reflection warning, net/cgrand/enlive_html.clj:69:16 - call to org.xml.sax.InputSource ctor can't be resolved.
Reflection warning, expectations/junit/runner.clj:15:3 - call to fireTestStarted can't be resolved.
Reflection warning, expectations/junit/runner.clj:18:3 - call to fireTestFinished can't be resolved.
Reflection warning, expectations/junit/runner.clj:21:3 - call to fireTestFailure can't be resolved.
Reflection warning, expectations/junit/runner.clj:48:52 - reference to field testPath can't be resolved.
Reflection warning, expectations/junit/runner.clj:48:52 - call to java.io.File ctor can't be resolved.
Reflection warning, expectations/junit/runner.clj:65:11 - call to fireTestStarted can't be resolved.
Reflection warning, expectations/junit/runner.clj:67:13 - call to fireTestFailure can't be resolved.
Reflection warning, expectations/junit/runner.clj:68:11 - call to fireTestFinished can't be resolved.
Reflection warning, clj_time/coerce.clj:51:5 - reference to field getMillis can't be resolved.
Reflection warning, clj_time/coerce.clj:57:12 - reference to field getMillis can't be resolved.
Reflection warning, clj_time/coerce.clj:57:5 - call to java.util.Date ctor can't be resolved.
Reflection warning, clj_time/coerce.clj:63:21 - reference to field getMillis can't be resolved.
Reflection warning, clj_time/coerce.clj:76:17 - reference to field getMillis can't be resolved.
Exception in thread "main" java.lang.StackOverflowError
    at clojure.core$concat$fn__3923.invoke(core.clj:678)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.RT.seq(RT.java:484)
    at clojure.core$seq.invoke(core.clj:133)
    at clojure.core$concat$fn__3923.invoke(core.clj:678)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.RT.seq(RT.java:484)
    at clojure.core$seq.invoke(core.clj:133)
    at clojure.core$concat$fn__3923.invoke(core.clj:678)
[.. goes on forever ..]
guns commented

Hello,

I am interested in looking into this. Could you please gist
mandelbulb/main.clj or a similar file that exhibits the same bug?

Hmm... since posting this I changed the code quite a bit and rearranged the directory structure (and also updated leiningen and my project.clj file). The problem no longer appears, so since I can't reproduce it myself I'm closing this ticket.

guns commented

Okay, please reopen when you see the behaviour again!

K thanks!