Fork me on GitHub
#cljs-dev
<
2016-01-06
>
mfikes02:01:28

If you have

(ns foo.core)
(defmacro kw [] ::a)

mfikes02:01:23

in regular ClojureScript this yields :foo.core/a, but in bootstrapped it yields, of course :foo.core$macros/a. (It’s unfortunate the $macros suffix leaks out in places.)

dnolen13:01:48

hrm, yeah - but not dissimilar from syntax-quote in macro source file where the ns name differs from the runtime ns name

bronsa13:01:46

could we not work around that with a smarter resolve-symbol impl?

bronsa13:01:14

or even just using *alias-map* -- mapping foo.core$macros to foo.core

bronsa13:01:38

resolve-ns short circuits on *alias-map* successful lookups

bronsa13:01:10

ah nevermind, it's using *ns*

spinningtopsofdoom15:01:18

@dnolen & @alexmiller : @mfikes has pointed out that if Lean HAMT's becomes a contib project / ported to CLJS then anyone who's made a PR would need to be contacted (ala test.check). Are there any legal technicalities I should be concerned with at the moment?

dnolen15:01:04

@spinningtopsofdoom: all contributors must have submitted a CA

spinningtopsofdoom15:01:11

As far as technical progress is concerned I'm working on getting assoc / dissoc up to current CLJS perf. There's about 25% slower in my benchmark tests right now

mfikes19:01:51

@dnolen: Tried on two different hosts. ClojureScript master locks up in script/test. Here is a full gist showing where it halts for me: https://gist.github.com/mfikes/78e6e114468bb9cc6598

mfikes19:01:13

@dnolen: If you are busy, I can bisect...

dnolen19:01:19

@mfikes: busy, yes a bisect would be helpful

mfikes20:01:25

@dnolen: It is something in the last pair of commits, related to parallel compilation. One thread gets stuck counting down, with the below in its call stack. I’ll see if I can figure out what it is.

java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
cljs.closure$parallel_compile_sources.invoke(closure.clj:808)

mfikes20:01:50

circular-deps.a and circular-deps.b are in the set it is trying to compile in parallel at the time. Perhaps just good old fashioned livelock. (Wondering why circular dep detection is not causing the whole thing to balk… digging.)

dnolen20:01:18

@mfikes: ah heh right

mfikes20:01:14

@dnolen: Yeah… I haven’t succeeded in finding if something actually looks for circularity.

dnolen20:01:25

nothing does

dnolen20:01:29

a is waiting for b, b is waiting for a

mfikes20:01:33

Makes perfect sense then simple_smile

mfikes20:01:47

Well, its not blocking me… I can always work with a few commits back. No need to rush.

mfikes20:01:05

Poor cljs.js-deps/dependency-orderwas asked to topologically sort something that can’t be sorted simple_smile

dnolen22:01:48

@mfikes: fixed, would be nice to see if it works for you

dnolen22:01:07

for 1538 you need ^boolean not ^:boolean

mfikes22:01:12

@dnolen Will get latest and try. Crap about the boolean thing 😞 Will fix.

mfikes22:01:11

@dnolen Master is good for me now.

dnolen22:01:58

@mfikes: thanks for the confirm

mfikes22:01:09

Very nice, circular dep detection works right in the REPL simple_smile

cljs.user=> (require 'foo.a)
clojure.lang.ExceptionInfo: Assert failed: Circular dependency detected, cljs.user -> foo.a -> foo.b -> foo.b

mfikes22:01:54

I slightly wonder about the last bit of the chain in that error. (In my case b -> a, not itself.)

mfikes22:01:21

Good enough though…

dnolen22:01:02

@mfikes: just a bug - try master

mfikes22:01:30

Cool, the chain is now cljs.user -> foo.a -> foo.b

dnolen23:01:14

@mfikes: ha still not right! try master simple_smile

mfikes23:01:12

Circular dependency detected, top.core -> foo.a -> foo.b -> foo.c -> foo.d -> foo.b and Circular dependency detected, top.core -> foo.a -> foo.b -> foo.c -> foo.d -> foo.d with master now. @dnolen ^ Looks good.