Fork me on GitHub
#cljs-dev
<
2016-08-11
>
richiardiandrea00:08:52

@dnolen, I fixed CLJS-1515 and also noticed a failure in self-host-parity:

Testing cljs.spec-test

ERROR in (conform-explain) (TypeError:NaN:NaN)
Uncaught exception, not in assertion.
expected: nil
  actual: #object[TypeError TypeError: Cannot read property 'do_template' of undefined]

Testing cljs.clojure-alias-test

Ran 208 tests containing 17289 assertions.
0 failures, 1 errors.
Just to bring it up šŸ˜„

Yehonathan Sharvit04:08:51

Iā€™m having compilation issues with clojurescript version 1.9.183 (with the :rename feature). When requiring om.next. Here are my dependencies:

:dependencies [[org.clojure/clojure "1.9.0-alpha10"]
                 [org.clojure/clojurescript "1.9.183"]
                 [org.omcljs/om "1.0.0-alpha36"]]
And here is a github repo that reproduces the issue: https://github.com/viebel/tiny-cljs-build/tree/4607a2034f68eb9ec739c76bbe0e8987f444e61c When running lein cljsbuild once, the error I get is:
Caused by: clojure.lang.ExceptionInfo: contains? not supported on type: clojure.lang.PersistentList at line 19 resources/public/dev/js/om/util.cljc {:file "resources/public/dev/js/om/util.cljc", :line 19, :column 1, :tag :cljs/analysis-error}

thheller07:08:45

@anmonteiro @dnolen the :rename has a problematic case in :refer-clojure for things that are macros as well as functions

thheller07:08:31

(ns some.test
  (:refer-clojure :rename {+ plus}))

(plus 1 2)
(cljs.core/+ 1 2)

thheller07:08:52

the first produces cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$2((1),(2)); while the second is ((1) + (2));

thheller07:08:07

so the inline macro gets bypassed

thheller07:08:28

not sure if worth raising an issue over

thheller07:08:59

@viebel any idea where the resources/public/dev/js/om/util.cljc is even coming from since it is not in your repo?

thheller07:08:17

no idea what is happening but can confirm the error

Yehonathan Sharvit09:08:42

@thheller: resources/public/dev/js/om/util.cljc comes from org.omcljs/om

Yehonathan Sharvit09:08:12

Upgrading om version to 1.0.0-alpha41 solved the issue

Yehonathan Sharvit09:08:28

But I donā€™t know why ?!!??!

anmonteiro09:08:22

@thheller: @viebel thanks for reporting, I'll look into both when I have time

dnolen12:08:20

@thheller thanks for report! yeah we should look into that

mfikes13:08:13

@dnolen: If you end up applying self-host patches, I think one or more may conflict with the othersā€”making them not git apply. If so, just ping me and I can rebaseline the affected patch.

dnolen13:08:25

@mfikes everything applied cleanly it seems unless I missed a patch

mfikes13:08:53

I agree. I had a problem on my end. I think it is good now. Will test.

mfikes14:08:35

@anmonteiro: The change for CLJS-1716 caused a regression in self-host ability to (require '[clojure.spec :as s]) and then use macros in the cljs.spec namespace. (I havenā€™t created a minimal repro involving no downstream tooling yet.)

anmonteiro16:08:29

@mfikes: hrm, I'm happy to look at a repro for that one

anmonteiro16:08:03

I wonder why self parity tests didn't fail?

mfikes16:08:05

Iā€™ll see if I can produce one

anmonteiro16:08:20

Or was that not covered in the tests?

mfikes16:08:44

There probably isnā€™t a test case for it

mfikes20:08:55

@anmonteiro: Iā€™ve written a ticket with a proposed new unit test covering the issue mentioned above. http://dev.clojure.org/jira/browse/CLJS-1737

richiardiandrea20:08:35

Uhm, I am trying cljs master and for some reason in replumb's node repl I get:

cljs.user=> (require '[clojure.string :refer [trim]])
No such namespace: cljs.string, could not locate cljs/string.cljs, cljs/string.cljc, or Closure namespace "cljs.string"
I know that now we have aliases, but I see that node/js/compiled/out contains string.js so I wonder why it says it is missing...

mfikes20:08:10

@richiardiandrea: You are seeing a consequence of logic to, upon failing to load a clojure.* namespace to fallback trying to load a cljs.* namespace: https://github.com/clojure/clojurescript/blob/16af9f651f09e5c3f91098270ffacb806b907302/src/main/cljs/cljs/js.cljs#L333-L336

mfikes20:08:51

So, the underlying question is: ā€œWhy is clojure.string not loading for you?ā€ (I tried your require downstream with Planck master which is built against near-master of ClojureScript and it works there.)

richiardiandrea20:08:55

uhm, weird, it is working solid with cljs 1.9.93

richiardiandrea20:08:05

I'll investigate then, thanks a lot Mike

richiardiandrea20:08:50

funnily enough, the commit 4e50980 (`1.9.94`) right before the aliasing patch is working fine

mfikes22:08:29

@richiardiandrea: I added [clojure.string :refer [trim]] to the :require block of the ns form for cljs.clojure-alias-test and ran script/test-self-parity with no ill consequences. (You may be on to something, just sharing it canā€™t be reproā€™d this way.)

dnolen22:08:38

@anmonteiro: let me know if youā€™re gonna take http://dev.clojure.org/jira/browse/CLJS-1733, I may give it a go tomorrow, thatā€™s the last thing Iā€™d like to get in before a release

richiardiandrea22:08:10

@mfikes: very weird I will try browser too and report, after the release anyways, it does not seem a quick check/fix

richiardiandrea22:08:53

And it can be a replumb bug that surfaced only now of course

mfikes22:08:34

@dnolen: FWIW I think there are plenty of low-priority funky corner cases in Spec under self-host yet to be ironed out that are best saved for a subsequent release.

dnolen22:08:02

mostly concerned about non-self host for this release

anmonteiro23:08:26

@dnolen: I can't promise I'll have time to look at it tomorrow. In any case I'll let you know in advance

dnolen23:08:08

K I'll assign to myself then, I have a feeling I know what it is