cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
dpsutton 2020-06-30T02:46:34.360100Z

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.

dpsutton 2020-06-30T02:47:58.360600Z

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?

dpsutton 2020-06-30T02:50:52.360800Z

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

lread 2020-06-30T13:04:49.365500Z

@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.

mfikes 2020-06-30T13:08:07.366200Z

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

dpsutton 2020-06-30T13:29:15.367200Z

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

dnolen 2020-06-30T18:39:11.367900Z

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

dnolen 2020-06-30T18:39:29.368400Z

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

dnolen 2020-06-30T18:39:36.368700Z

which doesn't happen you invoke -main

dnolen 2020-06-30T18:40:14.369500Z

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

dpsutton 2020-06-30T18:40:30.370400Z

./scripts/run-tests or whatever?

dnolen 2020-06-30T18:40:50.370800Z

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

dnolen 2020-06-30T18:40:57.371100Z

look at the aliases in master

dnolen 2020-06-30T18:41:01.371300Z

deps.edn

dnolen 2020-06-30T18:43:27.371800Z

maybe @alexmiller has more info about this issue?

alexmiller 2020-06-30T20:03:06.372Z

can you restate the question?

alexmiller 2020-06-30T20:03:58.372600Z

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