Fork me on GitHub
#dirac
<
2016-11-23
>
darwin11:11:51

@denisj I believe that this is caused by generated javascript code in this shape: if (condition) { var pod_id = 1; } else { var pod_id = 2; }, even if you stop at a breakpoint in one such if branch, it displays all pod_id vars in the local list

darwin11:11:27

genereated js by cljs typically gets a lot of branches like that

darwin11:11:27

to avoid it, we would have to generate var pod_id; if (condition) { pod_id = 1 } else { pod_id = 2 }

denisj11:11:15

I'm not quite following (yet sorry), which line of my cljs is causing the if (condition) { ....}

darwin11:11:56

I don’t know, I was describing general situation where I saw this duplication

darwin11:11:13

look at your generated js code and try to identify similar patterns

darwin11:11:53

maybe it is also a bug in devtools

denisj11:11:10

ok will do. As mentioned we see this a lot so it's a bit of a pain when debugging, above is just an example. Notice in the Closure bindings/vars list which corresponds to the first let in my cljs, all is correct and as expected, as opposed to the inner fn & let.

darwin11:11:28

I can definitely confirm this problem, just didn’t look into it (yet)

darwin11:11:04

please note that locals list displays names translated by source maps, so this could be another source of problems

denisj11:11:04

always many things to do 🙂 all good, thanks. Great work btw it's coming along and seems to be stabilising lately too.

darwin11:11:19

this functionality is not well tested

darwin11:11:57

yeah, thanks, hopefully Dirac will be feature complete by January, and then I will just maintain it 🙂

darwin11:11:10

so it will be stable for some real work

darwin11:11:02

last thing I wanted to implement is proper addition of macros in code completions, but this is quite hard task to do, I would have to “export” them during code generation

denisj11:11:23

famous last words 🙂 will leave you plenty of free time for other pet projects