Fork me on GitHub
#cljs-dev
<
2020-06-30
>
dpsutton02:06:34

i'm running tests with clj -A:test-run-tests and getting some output Error: Can't resolve './calculator' in '/Users/dan/projects/clojure/clojurescript' which seems a bit strange to me.

dpsutton02:06:58

also

ERROR in (test-data-readers-records) (core.clj:4739)
Uncaught exception, not in assertion.
expected: nil
  actual: clojure.lang.ExceptionInfo: failed compiling file:src/test/cljs/data_readers_test/records.cljc
Am i running tests incorrectly or are they failing on master at the moment?

dpsutton02:06:52

> Ran 179 tests containing 838 assertions. > 0 failures, 2 errors.

lee13:06:49

@dpsutton similar output has been happening for a long while https://travis-ci.org/github/mfikes/clojurescript/builds/540710982#L2084 If I remember correctly, it is expected, or not of concern, but @mfikes would know for certain.

mfikes13:06:07

Yeah, that (presumably innocuous) error has been there for years.

dpsutton13:06:15

and the test runner runs way more tests. and none fail. i guess the tests aren't meant to be run like clj -A:test:run-tests

dnolen18:06:11

I figured out the root cause lein test worked but not running them from via a -main

dnolen18:06:29

that's because the REPL sets up a different class loader as far as I can tell

dnolen18:06:36

which doesn't happen you invoke -main

dnolen18:06:14

if you look at the ClojureScript test in master this is avoided by not invoking a -main` via

dpsutton18:06:30

./scripts/run-tests or whatever?

dnolen18:06:50

clj -m ... and instead using -i foo.clj + -e "(foo/-main)"

dnolen18:06:57

look at the aliases in master

dnolen18:06:27

maybe @alexmiller has more info about this issue?

alexmiller20:06:06

can you restate the question?

alexmiller20:06:58

the different clojure entry points do have some differences wrt classloaders and things like default ns