Closed TwiceII closed 8 years ago
Not much is usually required beyond including the plug-in in your project.clj.
If you're able to post your project.clj along with the error message that should help diagnose the problem. Could include the output of lein deps :tree
?
The error message is pretty much it: "namespace lein autoexpect
:
*********************************************
*************** Running tests ***************
:reloading (gccnew.settings gccnew.time-utils gccnew.utils gccnew.db.sqlutils
gccnew.logger gccnew.model.logist-sync gccnew.scheduler gccnew.model.catalogs
gccnew.db.crud gccnew.routes.validations gccnew.model.primarydocs gccnew.model.base-calcs
gccnew.model.client-applications gccnew.model.departurelogistinfos gccnew.model.departures
gccnew.model.main-calc gccnew.routes.route-utils gccnew.routes.crud-routes
gccnew.routes.primarydocs gccnew.model.users gccnew.routes.mainroutes
gccnew.model.categories-and-items gccnew.routes.money-diagram
gccnew.routes.catalogs gccnew.server gccnew.model.money-calcs
sablono.util sablono.normalize ajax.protocols gccnew.model.movements sablono.interpreter
gccnew.money-calcs-test user ajax.core gccnew.example-test rum.utils)
:error-while-loading gccnew.model.money-calcs
Error refreshing environment: java.lang.Exception: namespace 'gccnew.utils' not found
at clojure.core$apply.invokeStatic (core.clj:648)
clojure.core$load_libs.invokeStatic (core.clj:5774)
clojure.core$load_libs.doInvoke (core.clj:5758)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:648)
clojure.core$require.invokeStatic (core.clj:5796)
clojure.core$require.doInvoke (core.clj:5796)
clojure.lang.RestFn.invoke (RestFn.java:551)
gccnew.model.money_calcs$eval10839$loading__5569__auto____10840.invoke (money_calcs.clj:1)
gccnew.model.money_calcs$eval10839.invokeStatic (money_calcs.clj:1)
gccnew.model.money_calcs$eval10839.invoke (money_calcs.clj:1)
clojure.lang.Compiler.eval (Compiler.java:6927)
clojure.lang.Compiler.eval (Compiler.java:6916)
clojure.lang.Compiler.load (Compiler.java:7379)
clojure.lang.RT.loadResourceScript (RT.java:372)
clojure.lang.RT.loadResourceScript (RT.java:363)
clojure.lang.RT.load (RT.java:453)
clojure.lang.RT.load (RT.java:419)
clojure.core$load$fn__5677.invoke (core.clj:5893)
clojure.core$load.invokeStatic (core.clj:5892)
clojure.core$load.doInvoke (core.clj:5876)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.core$load_one.invokeStatic (core.clj:5697)
clojure.core$load_one.invoke (core.clj:5692)
clojure.core$load_lib$fn__5626.invoke (core.clj:5737)
clojure.core$load_lib.invokeStatic (core.clj:5736)
clojure.core$load_lib.doInvoke (core.clj:5717)
clojure.lang.RestFn.applyTo (RestFn.java:142)
clojure.core$apply.invokeStatic (core.clj:648)
clojure.core$load_libs.invokeStatic (core.clj:5774)
clojure.core$load_libs.doInvoke (core.clj:5758)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:648)
clojure.core$require.invokeStatic (core.clj:5796)
clojure.core$require.doInvoke (core.clj:5796)
clojure.lang.RestFn.invoke (RestFn.java:421)
clojure.tools.namespace.reload$track_reload_one.invokeStatic (reload.clj:35)
clojure.tools.namespace.reload$track_reload_one.invoke (reload.clj:21)
clojure.tools.namespace.reload$track_reload.invokeStatic (reload.clj:52)
clojure.tools.namespace.reload$track_reload.invoke (reload.clj:43)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.AFn.applyTo (AFn.java:144)
clojure.lang.Var.alterRoot (Var.java:303)
clojure.core$alter_var_root.invokeStatic (core.clj:5299)
clojure.core$alter_var_root.doInvoke (core.clj:5294)
clojure.lang.RestFn.invoke (RestFn.java:425)
clojure.tools.namespace.repl$do_refresh.invokeStatic (repl.clj:94)
clojure.tools.namespace.repl$do_refresh.invoke (repl.clj:82)
clojure.tools.namespace.repl$refresh.invokeStatic (repl.clj:145)
clojure.tools.namespace.repl$refresh.doInvoke (repl.clj:128)
clojure.lang.RestFn.invoke (RestFn.java:397)
autoexpect.runner$refresh_environment.invokeStatic (runner.clj:21)
autoexpect.runner$refresh_environment.invoke (runner.clj:20)
autoexpect.runner$run_tests.invokeStatic (runner.clj:88)
autoexpect.runner$run_tests.invoke (runner.clj:86)
autoexpect.runner$monitor_project$fn__10797.invoke (runner.clj:113)
autoexpect.runner$monitor_project.invokeStatic (runner.clj:110)
autoexpect.runner$monitor_project.doInvoke (runner.clj:106)
clojure.lang.RestFn.invoke (RestFn.java:512)
user$eval10800.invokeStatic (form-init6414290920949193156.clj:1)
user$eval10800.invoke (form-init6414290920949193156.clj:1)
clojure.lang.Compiler.eval (Compiler.java:6927)
clojure.lang.Compiler.eval (Compiler.java:6917)
clojure.lang.Compiler.load (Compiler.java:7379)
clojure.lang.Compiler.loadFile (Compiler.java:7317)
clojure.main$load_script.invokeStatic (main.clj:275)
clojure.main$init_opt.invokeStatic (main.clj:277)
clojure.main$init_opt.invoke (main.clj:277)
clojure.main$initialize.invokeStatic (main.clj:308)
clojure.main$null_opt.invokeStatic (main.clj:342)
clojure.main$null_opt.invoke (main.clj:339)
clojure.main$main.invokeStatic (main.clj:421)
clojure.main$main.doInvoke (main.clj:384)
clojure.lang.RestFn.invoke (RestFn.java:421)
clojure.lang.Var.invoke (Var.java:383)
clojure.lang.AFn.applyToHelper (AFn.java:156)
clojure.lang.Var.applyTo (Var.java:700)
clojure.main.main (main.java:37)
The current project.clj
(sorry for posting the whole file, I don't know what actually might be useful in it):
(defproject gccnew "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"}
:dependencies [[org.clojure/clojure "1.8.0"]
[clj-time "0.12.0"]
[ring "1.4.0"]
[ring/ring-defaults "0.2.0"]
[ring/ring-json "0.4.0"]
[bk/ring-gzip "0.1.1"]
[ring.middleware.logger "0.5.0"]
[compojure "1.5.0"]
[selmer "1.0.7"]
[environ "1.0.2"]
[org.clojure/java.jdbc "0.4.1"]
[org.postgresql/postgresql "9.4-1201-jdbc41"]
[honeysql "0.6.3"]
[com.taoensso/timbre "4.7.0"]
[spyscope "0.1.5"]
[com.cognitect/transit-cljs "0.8.237"]
[org.clojure/data.zip "0.1.2"]
[jarohen/chime "0.1.9"]
[expectations "2.1.8"]
; cljs
[org.clojure/clojurescript "1.9.89" :scope "provided"]
[org.clojure/core.async "0.2.374"
:exclusions [org.clojure/tools.reader]]
[rum "0.8.3"]
[cljs-ajax "0.5.4"]]
:plugins [[lein-cljsbuild "1.1.3"]
[lein-expectations "0.0.7"]
[lein-autoexpect "1.9.0"]
[lein-environ "1.0.1"]]
:min-lein-version "2.6.1"
:source-paths ["src/clj" "src/cljs" "dev"]
:test-paths ["test/clj"]
;:clean-targets ^{:protect false} [:target-path :compile-path]
:clean-targets ^{:protect false} [:target-path
:compile-path
"target/cljsbuild-main.js"
"resources/public/js/compiled/"]
:uberjar-name "gccnew.jar"
;; Use `lein run` if you just want to start a HTTP server, without figwheel
:main gccnew.server
;; nREPL by default starts in the :main namespace, we want to start in `user`
;; because that's where our development helper functions like (run) and
;; (browser-repl) live.
:repl-options {:init-ns user}
:cljsbuild {:builds
{
:dev
{:source-paths ["src/cljs/gccnew"]
:figwheel true
:compiler {;:main gccnew.comm.utils
;:asset-path "js/compiled/out"
:output-to "resources/public/js/compiled/app.js"
:output-dir "resources/public/js/compiled/out"
:optimizations :none
:source-map true
:pretty-print true}}
:prod
{:source-paths ["src/cljs/gccnew"]
:compiler {:externs ["resources/public/js/externs.js"]
:optimizations :advanced
:modules {:cljs-base
{:output-to "resources/public/js/compiled/cljs-b.js"}
:common-module
{:output-to "resources/public/js/compiled/common-module.js"
:entries #{"gccnew.comm.pagination"
"gccnew.comm.amethods"
"gccnew.comm.channels"
"gccnew.comm.dom-utils"
"gccnew.comm.utils"
}}
:main-app
{:output-to "resources/public/js/compiled/main-app.js"
:entries #{"gccnew.main.login"}
:depends-on #{:common-module}}
:base-crud
{:output-to "resources/public/js/compiled/base-crud.js"
:entries #{"gccnew.views.basic-catalog-crud-table"
"gccnew.views.common"
"gccnew.views.crud-fields"
"gccnew.views.crud-views"}
:depends-on #{:common-module}}
:cruds
{:output-to "resources/public/js/compiled/entity-crud.js"
:entries #{"gccnew.catalogs.clients"
"gccnew.catalogs.suppliers"
"gccnew.catalogs.goods"
"gccnew.catalogs.stations"
"gccnew.catalogs.stationtraveltimes"
"gccnew.primarydocs.clientapplications"
"gccnew.primarydocs.clientcontracts"
"gccnew.primarydocs.departurelogistinfos"
"gccnew.primarydocs.departures"
"gccnew.primarydocs.factclientpayments"
"gccnew.primarydocs.initbalanceondate"
"gccnew.primarydocs.initclientincomes"}
:depends-on #{:common-module :base-crud}}
:diagrams
{:output-to "resources/public/js/compiled/diagrams.js"
:entries #{"gccnew.diagrams.moneyincomes"
"gccnew.diagrams.moneyincomes-calc"}
:depends-on #{:common-module :base-crud}}
}}}
}}
;; When running figwheel from nREPL, figwheel will read this configuration
;; stanza, but it will read it without passing through leiningen's profile
;; merging. So don't put a :figwheel section under the :dev profile, it will
;; not be picked up, instead configure figwheel here on the top level.
:figwheel {;; :http-server-root "public" ;; serve static assets from resources/public/
;; :server-port 3449 ;; default
;; :server-ip "127.0.0.1" ;; default
:css-dirs ["resources/public/css"] ;; watch and update CSS
;; Instead of booting a separate server on its own port, we embed
;; the server ring handler inside figwheel's http-kit server, so
;; assets and API endpoints can all be accessed on the same host
;; and port. If you prefer a separate server process then take this
;; out and start the server with `lein run`.
:ring-handler user/http-handler
;; Start an nREPL server into the running figwheel process. We
;; don't do this, instead we do the opposite, running figwheel from
;; an nREPL process, see
;; https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
;; :nrepl-port 7888
;; To be able to open files in your editor from the heads up display
;; you will need to put a script on your path.
;; that script will have to take a file path and a line number
;; ie. in ~/bin/myfile-opener
;; #! /bin/sh
;; emacsclient -n +$2 $1
;;
;; :open-file-command "myfile-opener"
:server-logfile "log/figwheel.log"}
:doo {:build "test"}
:profiles {:dev
{:dependencies [[figwheel "0.5.2"]
[figwheel-sidecar "0.5.2"]
[com.cemerick/piggieback "0.2.1"]
[org.clojure/tools.nrepl "0.2.12"]]
:plugins [[lein-figwheel "0.5.2"]
[lein-doo "0.1.6"]]
:cljsbuild {:builds
{:test
{:source-paths ["src/cljs" "test/cljs"]
:compiler
{:output-to "resources/public/js/compiled/testable.js"
:main gccnew.test-runner
:optimizations :none}}}}}
:uberjar
{:source-paths ^:replace ["src/clj"]
;:hooks [leiningen.cljsbuild]
:prep-tasks ["compile" ["cljsbuild" "once" "prod"]]
:omit-source true
:aot :all
:cljsbuild {:builds
{:app
{:source-paths ^:replace ["src/cljs"]
:figwheel false
:compiler
{:optimizations :advanced
:pretty-print false}}}}}})
lein deps :tree
log:
=> lein deps :tree
Possibly confusing dependencies found:
[ring/ring-json "0.4.0"] -> [cheshire "5.5.0"]
overrides
[selmer "1.0.7"] -> [cheshire "5.6.1"]
Consider using these exclusions:
[selmer "1.0.7" :exclusions [cheshire]]
[ring/ring-json "0.4.0"] -> [cheshire "5.5.0"] -> [com.fasterxml.jackson.core/jackson-core "2.5.3"]
overrides
[selmer "1.0.7"] -> [cheshire "5.6.1"] -> [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.7.3"] -> [com.fas
terxml.jackson.core/jackson-core "2.7.3"]
and
[selmer "1.0.7"] -> [cheshire "5.6.1"] -> [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.7.3"] -> [com.fa
sterxml.jackson.core/jackson-core "2.7.3"]
and
[selmer "1.0.7"] -> [cheshire "5.6.1"] -> [com.fasterxml.jackson.core/jackson-core "2.7.3"]
Consider using these exclusions:
[selmer "1.0.7" :exclusions [com.fasterxml.jackson.core/jackson-core]]
[selmer "1.0.7" :exclusions [com.fasterxml.jackson.core/jackson-core]]
[selmer "1.0.7" :exclusions [com.fasterxml.jackson.core/jackson-core]]
[ring/ring-json "0.4.0"] -> [cheshire "5.5.0"] -> [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.5.3"]
overrides
[selmer "1.0.7"] -> [cheshire "5.6.1"] -> [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.7.3"]
Consider using these exclusions:
[selmer "1.0.7" :exclusions [com.fasterxml.jackson.dataformat/jackson-dataformat-smile]]
[ring/ring-json "0.4.0"] -> [cheshire "5.5.0"] -> [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.5.3"]
overrides
[selmer "1.0.7"] -> [cheshire "5.6.1"] -> [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.7.3"]
Consider using these exclusions:
[selmer "1.0.7" :exclusions [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor]]
[ring.middleware.logger "0.5.0"] -> [onelog "0.4.5"] -> [clj-logging-config "1.9.10"] -> [log4j "1.2.16"]
overrides
[ring.middleware.logger "0.5.0"] -> [onelog "0.4.5"] -> [org.slf4j/slf4j-log4j12 "1.7.7"] -> [log4j "1.2.17"]
Consider using these exclusions:
[ring.middleware.logger "0.5.0" :exclusions [log4j]]
[bk/ring-gzip "0.1.1"]
[clj-time "0.12.0"]
[joda-time "2.9.3"]
[cljs-ajax "0.5.4"]
[com.cognitect/transit-clj "0.8.285"]
[com.cognitect/transit-java "0.8.311"]
[org.msgpack/msgpack "0.6.10"]
[com.googlecode.json-simple/json-simple "1.1.1" :exclusions [[junit]]]
[org.javassist/javassist "3.18.1-GA"]
[lein-doo "0.1.6"]
[doo "0.1.6"]
[karma-reporter "0.1.0"]
[net.colourcoding/poppea "0.2.1"]
[org.apache.httpcomponents/httpasyncclient "4.1.1"]
[commons-logging "1.2"]
[org.apache.httpcomponents/httpclient "4.5.1"]
[org.apache.httpcomponents/httpcore-nio "4.4.4"]
[org.apache.httpcomponents/httpcore "4.4.4"]
[clojure-complete "0.2.4" :exclusions [[org.clojure/clojure]]]
[com.cemerick/piggieback "0.2.1" :scope "test"]
[com.cognitect/transit-cljs "0.8.237"]
[com.cognitect/transit-js "0.8.846"]
[com.taoensso/timbre "4.7.0"]
[com.taoensso/encore "2.64.1"]
[com.taoensso/truss "1.3.3"]
[io.aviso/pretty "0.1.28"]
[compojure "1.5.0"]
[clout "2.1.2"]
[instaparse "1.4.0" :exclusions [[org.clojure/clojure]]]
[medley "0.7.3"]
[org.clojure/tools.macro "0.1.5"]
[ring/ring-codec "1.0.0"]
[environ "1.0.2"]
[expectations "2.1.8"]
[junit "4.12"]
[org.hamcrest/hamcrest-core "1.3"]
[figwheel-sidecar "0.5.2" :scope "test"]
[clj-fuzzy "0.3.1" :scope "test"]
[clj-stacktrace "0.2.8"]
[com.stuartsierra/component "0.3.0" :scope "test"]
[com.stuartsierra/dependency "0.2.0" :scope "test"]
[digest "1.4.4" :scope "test" :exclusions [[org.clojure/clojure]]]
[fipp "0.6.4" :scope "test"]
[org.clojure/core.rrb-vector "0.0.11" :scope "test"]
[hawk "0.2.9" :scope "test" :exclusions [[org.clojure/clojure]]]
[net.incongru.watchservice/barbary-watchservice "1.0" :scope "test"]
[net.java.dev.jna/jna "3.2.2" :scope "test"]
[http-kit "2.1.19" :scope "test"]
[ring-cors "0.1.7" :scope "test" :exclusions [[ring/ring-core] [org.clojure/clojure]]]
[figwheel "0.5.2" :scope "test"]
[honeysql "0.6.3"]
[jarohen/chime "0.1.9"]
[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.89" :scope "provided"]
[com.google.javascript/closure-compiler "v20160315" :scope "provided"]
[args4j "2.0.26" :scope "provided"]
[com.google.code.findbugs/jsr305 "1.3.9" :scope "provided"]
[com.google.code.gson/gson "2.2.4" :scope "provided"]
[com.google.guava/guava "19.0" :scope "provided"]
[com.google.javascript/closure-compiler-externs "v20160315" :scope "provided"]
[com.google.protobuf/protobuf-java "2.5.0" :scope "provided"]
[org.clojure/data.json "0.2.6"]
[org.clojure/google-closure-library "0.0-20160609-f42b4a24" :scope "provided"]
[org.clojure/google-closure-library-third-party "0.0-20160609-f42b4a24" :scope "provided"]
[org.clojure/tools.reader "1.0.0-beta1"]
[org.mozilla/rhino "1.7R5" :scope "provided"]
[org.clojure/core.async "0.2.374" :exclusions [[org.clojure/tools.reader]]]
[org.clojure/tools.analyzer.jvm "0.6.9"]
[org.clojure/core.memoize "0.5.8"]
[org.clojure/core.cache "0.6.4"]
[org.clojure/data.priority-map "0.0.4"]
[org.clojure/tools.analyzer "0.6.7"]
[org.ow2.asm/asm-all "4.2"]
[org.clojure/data.zip "0.1.2"]
[org.clojure/java.jdbc "0.4.1"]
[org.clojure/tools.nrepl "0.2.12" :scope "test"]
[org.postgresql/postgresql "9.4-1201-jdbc41"]
[ring.middleware.logger "0.5.0"]
[onelog "0.4.5"]
[clj-logging-config "1.9.10"]
[log4j "1.2.16"]
[org.clojure/tools.logging "0.2.6"]
[org.slf4j/slf4j-log4j12 "1.7.7"]
[org.slf4j/slf4j-api "1.7.7"]
[org.clojars.pjlegato/clansi "1.3.0"]
[org.tobereplaced/mapply "1.0.0"]
[ring/ring-defaults "0.2.0"]
[javax.servlet/servlet-api "2.5"]
[ring/ring-anti-forgery "1.0.0"]
[ring/ring-headers "0.2.0"]
[ring/ring-ssl "0.2.1"]
[ring/ring-json "0.4.0"]
[cheshire "5.5.0"]
[com.fasterxml.jackson.core/jackson-core "2.5.3"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.5.3"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.5.3"]
[tigris "0.1.1"]
[ring "1.4.0"]
[ring/ring-core "1.4.0"]
[commons-fileupload "1.3.1"]
[commons-io "2.4"]
[crypto-equality "1.0.0"]
[crypto-random "1.2.0"]
[ring/ring-devel "1.4.0"]
[hiccup "1.0.5"]
[ns-tracker "0.3.0"]
[org.clojure/java.classpath "0.2.2"]
[org.clojure/tools.namespace "0.2.10"]
[ring/ring-jetty-adapter "1.4.0"]
[org.eclipse.jetty/jetty-server "9.2.10.v20150310"]
[javax.servlet/javax.servlet-api "3.1.0"]
[org.eclipse.jetty/jetty-http "9.2.10.v20150310"]
[org.eclipse.jetty/jetty-util "9.2.10.v20150310"]
[org.eclipse.jetty/jetty-io "9.2.10.v20150310"]
[ring/ring-servlet "1.4.0"]
[rum "0.8.3"]
[cljsjs/react-dom "15.0.1-1"]
[cljsjs/react "15.0.1-1"]
[sablono "0.7.1"]
[selmer "1.0.7"]
[commons-codec "1.10"]
[json-html "0.3.9"]
[hiccups "0.3.0"]
[spyscope "0.1.5"]
Yep, sorry for such a long post, just want to use your plug-in that much :) Thanks in advance.
No worries, I did ask for all that 😄 . Nothing is jumping out at me as obviously a problem.
Is https://github.com/TwiceII/gccnew/ the project? It sort of looks like it is but the project.clj isn't the same as the one you posted here. I cloned that project and replaced the project.clj with the one posted here and was able to get some expectations running and passing (though, had to add some since that repo doesn't have any yet).
Another thing that could affect this is the contents of your ~/.lein/profiles.clj
. You might try removing everything from it and try again and see if the problem still arises. Though I can't remember them now, I've seen situations where something in the profiles.clj causes a problem. Usually the problem is a conflict with the tools.namespace
project.
Sorry for the late reply.
I was able to run successfully lein autoexpect
on my project after I lein clean
ed it.
After some experimenting, it seems that the culprit is uberjar or, perhaps more likely, the way I configured it (although :uberjar
settings in project.clj
seem to be ok).
So I guess I'm gonna just delete "target" folder every time after I lein uberjar
my project before using lein-autoexpect.
Don't know if that helps to identify the problem, but I'm glad that I found at least some solution :)
Thanks! I guess we may close the issue.
Glad you've found something that works! A bit unfortunate it requires some effort to do the steps but at least something works.
Hi.
I have a project, created by chestnut lein plugin. So, I wanted to use lein-autoexpect with clojure-expectations, but I receive :error-while-loading message with correct namespaces not found on running "lein autoexpect". Which is strange, considering that both "lein run" and "lein expectations" run just fine, so I guess some error on loading files happens on lein-autoexpect side.
Is there any additional prerequisites on using lein-autoexpect? All test files are located in test/clj/myproject folder, if that helps.
I can also paste my project.clj file here, if you want.