lambdaisland / lambdaisland/kaocha-cljs

No such namespace exception

Open
#4 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

closed:wontfix
Dominant language
Clojure
Stars
47
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Repro:

$ cat deps.edn
{:aliases {:test {:extra-deps {lambdaisland/kaocha {:mvn/version "0.0-389"}
                               lambdaisland/kaocha-cljs {:mvn/version "0.0-16"}}}}}

$ cat tests.edn
#kaocha/v1
{:tests [{:id :unit-cljs
          :type :kaocha.type/cljs}]}

$ cat test/repro/core_test.cljs
(ns repro.core-test
  (:require [clojure.test :as t]))

(t/deftest foo
  (t/is true))

$  npm i isomorphic-ws ws --save
npm WARN saveError ENOENT: no such file or directory, open '/Users/Borkdude/temp/repro/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/Borkdude/temp/repro/package.json'
npm WARN repro No description
npm WARN repro No repository field.
npm WARN repro No README data
npm WARN repro No license field.

+ isomorphic-ws@4.0.1
+ ws@6.1.3
updated 2 packages and audited 4 packages in 1.029s
found 0 vulnerabilities

$ clojure -A:test -m kaocha.runner --no-capture-output$ clojure -A:test -m kaocha.runner --no-capture-output
WARNING: symbol already refers to: #'clojure.core/symbol in namespace: kaocha.type.cljs, being replaced by: #'kaocha.core-ext/symbol
[(Exception in thread "main" clojure.lang.ExceptionInfo: ClojureScript Exception {:via [{:type clojure.lang.ExceptionInfo, :message "No such namespace: repro.core-test, could not locate repro/core_test.cljs, repro/core_test.cljc, or JavaScript source providing \"repro.core-test\" (Please check that namespaces with dashes use underscores in the ClojureScript file name) at line 2 <cljs repl>", :data {:file "<cljs repl>", :line 2, :column 1, :root-source-info {:source-type :fragment, :source-form (require (quote repro.core-test))}, :tag :cljs/analysis-error}, :at [cljs.analyzer$error invokeStatic "analyzer.cljc" 718]}], :trace [[cljs.analyzer$error invokeStatic "analyzer.cljc" 718] [cljs.analyzer$error invoke "analyzer.cljc" 714] [cljs.analyzer$error invokeStatic "analyzer.cljc" 716] [cljs.analyzer$error invoke "analyzer.cljc" 714] [cljs.analyzer$analyze_deps invokeStatic "analyzer.cljc" 2338] [cljs.analyzer$analyze_deps invoke "analyzer.cljc" 2312] [cljs.analyzer$ns_side_effects invokeStatic "analyzer.cljc" 3742] [cljs.analyzer$ns_side_effects invoke "analyzer.cljc" 3737] [cljs.analyzer$analyze_STAR_$fn__2629 invoke "analyzer.cljc" 3861] [clojure.lang.PersistentVector reduce "PersistentVector.java" 343] [clojure.core$reduce invokeStatic "core.clj" 6827] [clojure.core$reduce invoke "core.clj" 6810] [cljs.analyzer$analyze_STAR_ invokeStatic "analyzer.cljc" 3861] [cljs.analyzer$analyze_STAR_ invoke "analyzer.cljc" 3851] [cljs.analyzer$analyze invokeStatic "analyzer.cljc" 3880] [cljs.analyzer$analyze invoke "analyzer.cljc" 3863] [cljs.analyzer$analyze_seq invokeStatic "analyzer.cljc" 3630] [cljs.analyzer$analyze_seq invoke "analyzer.cljc" 3607] [cljs.analyzer$analyze_form invokeStatic "analyzer.cljc" 3810] [cljs.analyzer$analyze_form invoke "analyzer.cljc" 3807] [cljs.analyzer$analyze_STAR_ invokeStatic "analyzer.cljc" 3860] [cljs.analyzer$analyze_STAR_ invoke "analyzer.cljc" 3851] [cljs.analyzer$analyze invokeStatic "analyzer.cljc" 3880] [cljs.analyzer$analyze invoke "analyzer.cljc" 3863] [cljs.repl$evaluate_form$fn__6550 invoke "repl.cljc" 558] [cljs.repl$evaluate_form invokeStatic "repl.cljc" 557] [cljs.repl$evaluate_form invoke "repl.cljc" 499] [cljs.repl$eval_cljs invokeStatic "repl.cljc" 689] [cljs.repl$eval_cljs invoke "repl.cljc" 682] [cljs.core.server$prepl$fn__3549$fn__3554 invoke "server.clj" 108] [cljs.core.server$prepl$fn__3549 invoke "server.clj" 91] [cljs.compiler$with_core_cljs invokeStatic "compiler.cljc" 1416] [cljs.compiler$with_core_cljs invoke "compiler.cljc" 1405] [cljs.core.server$prepl invokeStatic "server.clj" 77] [cljs.core.server$prepl doInvoke "server.clj" 39] [clojure.lang.RestFn invoke "RestFn.java" 470] [kaocha.cljs.prepl$prepl$fn__3619 invoke "prepl.clj" 65] [clojure.core$binding_conveyor_fn$fn__5739 invoke "core.clj" 2030] [clojure.lang.AFn call "AFn.java" 18] [java.util.concurrent.FutureTask run "FutureTask.java" 266] [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1149] [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 624] [java.lang.Thread run "Thread.java" 748]], :cause "No such namespace: repro.core-test, could not locate repro/core_test.cljs, repro/core_test.cljc, or JavaScript source providing \"repro.core-test\" (Please check that namespaces with dashes use underscores in the ClojureScript file name) at line 2 <cljs repl>", :data {:file "<cljs repl>", :line 2, :column 1, :root-source-info {:source-type :fragment, :source-form (require (quote repro.core-test))}, :tag :cljs/analysis-error}}
	at kaocha.type.cljs$fn__6606.invokeStatic(cljs.clj:125)
	at kaocha.type.cljs$fn__6606.invoke(cljs.clj:123)
	at kaocha.type.cljs$queue_consumer.invokeStatic(cljs.clj:161)
	at kaocha.type.cljs$queue_consumer.invoke(cljs.clj:147)
	at kaocha.type.cljs$eval6667$fn__6669.invoke(cljs.clj:263)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at kaocha.testable$run.invokeStatic(testable.clj:108)
	at kaocha.testable$run.invoke(testable.clj:99)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at orchestra.spec.test$spec_checking_fn$fn__3113.doInvoke(test.clj:125)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at kaocha.testable$run_testable.invokeStatic(testable.clj:160)
	at kaocha.testable$run_testable.invoke(testable.clj:137)
	at kaocha.testable$run_testables.invokeStatic(testable.clj:169)
	at kaocha.testable$run_testables.invoke(testable.clj:163)
	at kaocha.type.cljs$eval6633$fn__6635.invoke(cljs.clj:216)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at kaocha.testable$run.invokeStatic(testable.clj:108)
	at kaocha.testable$run.invoke(testable.clj:99)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at orchestra.spec.test$spec_checking_fn$fn__3113.doInvoke(test.clj:125)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at kaocha.testable$run_testable.invokeStatic(testable.clj:160)
	at kaocha.testable$run_testable.invoke(testable.clj:137)
	at kaocha.testable$run_testables.invokeStatic(testable.clj:169)
	at kaocha.testable$run_testables.invoke(testable.clj:163)
	at kaocha.api$run$fn__3061.invoke(api.clj:96)
	at clojure.core$with_redefs_fn.invokeStatic(core.clj:7514)
	at clojure.core$with_redefs_fn.invoke(core.clj:7498)
	at kaocha.api$run.invokeStatic(api.clj:88)
	at kaocha.api$run.invoke(api.clj:71)
	at kaocha.runner$run.invokeStatic(runner.clj:118)
	at kaocha.runner$run.invoke(runner.clj:68)
	at kaocha.runner$_main_STAR_.invokeStatic(runner.clj:136)
	at kaocha.runner$_main_STAR_.doInvoke(runner.clj:122)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.core$apply.invoke(core.clj:660)
	at kaocha.runner$_main.invokeStatic(runner.clj:147)
	at kaocha.runner$_main.doInvoke(runner.clj:145)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.main$main_opt.invokeStatic(main.clj:491)
	at clojure.main$main_opt.invoke(main.clj:487)
	at clojure.main$main.invokeStatic(main.clj:598)
	at clojure.main$main.doInvoke(main.clj:561)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.main.main(main.java:37)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the repro files deps.edn, tests.edn, and test/repro/core_test.cljs. Run the documented clojure -A:test -m kaocha.runner --no-capture-output command and inspect the ClojureScript test runner entry point indicated by the stack trace. Done means the namespace is resolved and the example test runs without the reported exception.

Written by the indexing model from the issue text.

Assessment

Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.