This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-23
Channels
- # beginners (27)
- # boot (8)
- # cider (17)
- # cljs-dev (8)
- # cljsrn (5)
- # clojure (56)
- # clojure-dev (34)
- # clojure-gamedev (4)
- # clojure-italy (32)
- # clojure-nl (22)
- # clojure-poland (3)
- # clojure-russia (17)
- # clojure-spec (31)
- # clojure-uk (48)
- # clojurescript (47)
- # core-async (41)
- # cursive (13)
- # datomic (22)
- # emacs (9)
- # figwheel (7)
- # fulcro (18)
- # graphql (3)
- # hoplon (15)
- # jobs-discuss (38)
- # keechma (1)
- # luminus (10)
- # off-topic (42)
- # onyx (8)
- # overtone (3)
- # protorepl (5)
- # re-frame (42)
- # reagent (6)
- # reitit (3)
- # schema (4)
- # shadow-cljs (39)
- # slack-help (5)
- # spacemacs (8)
- # specter (1)
- # tools-deps (36)
- # uncomplicate (9)
- # vim (34)
Hi all, I've got a problem that I don't know how to resolve. I am using luminus with cljs/reagent/re-frame and somehow my :require
does not work reliably. For example when I am opening doo-runner
and run (doo-tests 'dispatcher.core-test)
in spacemacs with cider-eval-defun-at-point
then it tells me following
---- Compiler Warning on <cljs form> line:1 column:2 ----
Use of undeclared Var dispatcher.doo-runner/doo-tests
1 (doo-tests 'dispatcher.core-test)
^---
---- Compiler Warning ----
#object[TypeError TypeError: Cannot read property 'doo_tests' of undefined]
and when running the tests with lein with-profile test doo phantom once
from command line it fails with
2018-04-23 12:33:42,807 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
;; ======================================================================
;; Testing with Phantom:
goog.require could not find: dispatcher.semantic_ui
in onError
Error encountered performing task 'doo' with profile(s): 'dev,test,test'
Subprocess failed
Anyone knows how to debug this? I really don't know how to proceed. Thanks in advance!There is something broken with my setup somehow. When loading a namespace with cider-load-buffer
in spacemacs it returns IllegalArgumentException
Show: Project-Only All
Hide: Clojure Java REPL Tooling Duplicates (1 frames hidden)
1. Unhandled java.lang.IllegalArgumentException
Namespace dispatcher.events does not exist
closure.clj: 707 cljs.closure/source-for-namespace
closure.clj: 680 cljs.closure/source-for-namespace
repl.cljc: 195 cljs.repl$load_namespace/invokeStatic
repl.cljc: 179 cljs.repl$load_namespace/invoke
repl.cljc: 220 cljs.repl$load_dependencies/invokeStatic
repl.cljc: 216 cljs.repl$load_dependencies/invoke
repl.cljc: 540 cljs.repl$load_file/invokeStatic
repl.cljc: 519 cljs.repl$load_file/invoke
repl.cljc: 670 cljs.repl$fn__17012$self__17014/invoke
AFn.java: 165 clojure.lang.AFn/applyToHelper
AFn.java: 144 clojure.lang.AFn/applyTo
core.clj: 657 clojure.core/apply
core.clj: 652 clojure.core/apply
repl.cljc: 654 cljs.repl$wrap_self$g__16987/invoke
repl.cljc: 860 cljs.repl$repl_STAR_$read_eval_print__17089/invoke
repl.cljc: 903 cljs.repl$repl_STAR_$fn__17095$fn__17104/invoke
repl.cljc: 902 cljs.repl$repl_STAR_$fn__17095/invoke
compiler.cljc: 1205 cljs.compiler$with_core_cljs/invokeStatic
compiler.cljc: 1194 cljs.compiler$with_core_cljs/invoke
repl.cljc: 864 cljs.repl$repl_STAR_/invokeStatic
repl.cljc: 737 cljs.repl$repl_STAR_/invoke
piggieback.clj: 169 cemerick.piggieback/run-cljs-repl
piggieback.clj: 155 cemerick.piggieback/run-cljs-repl
AFn.java: 171 clojure.lang.AFn/applyToHelper
AFn.java: 144 clojure.lang.AFn/applyTo
core.clj: 661 clojure.core/apply
core.clj: 652 clojure.core/apply
piggieback.clj: 259 cemerick.piggieback/evaluate
piggieback.clj: 255 cemerick.piggieback/evaluate
piggieback.clj: 285 cemerick.piggieback/load-file
piggieback.clj: 284 cemerick.piggieback/load-file
Var.java: 381 clojure.lang.Var/invoke
piggieback.clj: 291 cemerick.piggieback/wrap-cljs-repl/fn/fn/fn
piggieback.clj: 247 cemerick.piggieback/enqueue/fn
interruptible_eval.clj: 190 clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn
AFn.java: 22 clojure.lang.AFn/run
ThreadPoolExecutor.java: 1149 java.util.concurrent.ThreadPoolExecutor/runWorker
ThreadPoolExecutor.java: 624 java.util.concurrent.ThreadPoolExecutor$Worker/run
Thread.java: 748 java.lang.Thread/run
You mentioned the require wasn't working. Just making sure you were in the name space after it was loaded
@dpsutton I tried to require like this in repl
(require 'dispatcher.doo-runner)
---- Could not Analyze <cljs form> line:1 column:1 ----
No such namespace: dispatcher.doo-runner, could not locate dispatcher/doo_runner.cljs, dispatcher/doo_runner.cljc, or Closure namespace "dispatcher.doo-runner" at line 1 <cljs repl>
1 (require 'dispatcher.doo-runner)
^---
---- Analysis Error ----
nil
@dpsutton I used (load-file "test/cljs/dispatcher/doo_runner.cljs")
and it failed with
Show: Project-Only All
Hide: Clojure Java REPL Tooling Duplicates (2 frames hidden)
2. Unhandled clojure.lang.ExceptionInfo
failed compiling file:test/cljs/dispatcher/doo_runner.cljs
1. Caused by clojure.lang.ExceptionInfo
No such namespace: dispatcher.events-test, could not locate
dispatcher/events_test.cljs, dispatcher/events_test.cljc, or Closure
namespace "dispatcher.events-test" in file
test/cljs/dispatcher/doo_runner.cljs
{:tag :cljs/analysis-error}
(leaving out the stacktraces)(ns dispatcher.doo-runner
(:require [doo.runner :refer-macros [doo-tests]]
[dispatcher.events-test]
[dispatcher.core-test]
[dispatcher.time-test]))
(doo-tests 'dispatcher.core-test 'dispatcher.events-test)
Ok. What are the source paths for your class path? Are you sure you have the test dir on your class path? A lot of times these are only in a specific profile
it worked until a few weeks ago. @dpsutton can you help me with that? How can I get or set the classpath? in Leiningen?
Just search for test and you'll probably find it. You can see if it's on another profile
:test [:project/dev :project/test :profiles/test]
:project/test {:jvm-opts ["-server" "-Dconf=test-config.edn"]
:resource-paths ["env/test/resources"]
:cljsbuild
{:builds
{:test
{:source-paths ["src/cljc" "src/cljs" "test/cljs"]
:compiler
{:output-to "target/test.js"
:main "dispatcher.doo-runner"
:optimizations :whitespace
:pretty-print true}}}}}
:profiles/dev {}
:profiles/test {}
@dpsutton I thought this looks ok. maybe this is of relevance for my case? https://dev.clojure.org/jira/browse/CLJS-1473 ( no it's not, I think)