Clojurians
#cljs-dev
<
2016-12-21
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

ambrosebs01:12:26

is it normal for lein test to fail some tests? https://travis-ci.org/frenchy64/clojurescript

thheller12:12:37

@ambrosebs I think the official way to run tests is via ./script/test and others

thheller12:12:57

don't think any of the lein stuff is officially supported

thheller12:12:22

since most of the release stuff is done directly via maven

anmonteiro13:12:34

lein test is supposed to pass

anmonteiro13:12:48

script/test tests the CLJS part, lein test tests the compiler infrastructure (in Clojure)

anmonteiro13:12:04

@ambrosebs FWIW current master passes lein test

dnolen14:12:13

@ambrosebs lein test should work

ambrosebs22:12:37

whoops, yes updating to master fixes my issues

ambrosebs22:12:03

is there a performance difference between (if (not (nil? e)) ...) and (if e ...) ?

ambrosebs22:12:50

assuming there is no tag on e

dnolen23:12:29

if the type of the thing isn’t known than there’s a slow boolean test

dnolen23:12:33

@ambrosebs

ambrosebs23:12:14

thanks. I was going to prefer if-some/some?/when-some over that idiom. Is that still a win?

ambrosebs23:12:13

afaict the expansions are just as good, or better than (not (nil? e))

dnolen23:12:27

@ambrosebs they weren’t until I inlined some? which hasn’t landed in a release yet

ambrosebs23:12:33

I see. Can I do a pass over analyzer.clj and clean up the (not (nil? )) into some?, since I'm hacking there anyway? Plenty of opportunities for (let [e ..] (if (not (nil? e))) => (if-some [e ..] ) also.

dnolen23:12:35

@ambrosebs yes now that it inlines thats fine, but should be in a standalone patch that can be applied quickly for the obvious reasons