klipse 2017-02-13

@viebel decided to take another look at my macro related issue, and here's something interesting I've found: https://tinyurl.com/hsmx6we

if I explicitly require the ns which declares the macro, it works

I’m a bit out of context

Could you please refresh my memory

implicit macro loading in self-hosted context, with klipse

I rememeber the general topic

But what was the specific issue

I remember somethign that was running fine on lumo but failed on klipse

take a look at the github project I linked, 2 really short namespaces

namespace a defines a macro x and loads it implicitly

namespace b loads a, refers and uses x

but on klipse, for some reason, b loads the function x, not the macro

Now I remember

what I've discovered now may be a hint to you, since you're familiar with how klipse loads / compiles / evals namespaces

I hope so

and I’m verry thankful to you

Will try to see if it helps

What is your exact use case?

I mean in what context do you want to load your library inside klipse?

I'd like to use klipse with codox

for a library I develop

Oh. I remember

I think that if you use the caching feature of the klipse theme it should work

I'll take a look at that

@viebel 2 things: first, it seems to work now (and is also a lot faster!), but klipse tries to evaluate the initial expressions before the require-statement is evaluated. Second, despite working with lumo, the way klipse loads namespaces is probably still messed up somehow

also, thanks for the help once again 🙂

1. Can you upload somewhere the html where you see that the initial expressions are evaluated before require-statement?

2. 100% agree - Still hoping to solve it. I tried to add ?verbose=1 in order to see the exact loading of the namespaces. But still wasn’t able to solve it

it's pretty easy to guess why it happens: my require-statement takes longer than 3 seconds, which I believe is the delay for auto evaluation

re-evaluate the second block, the first one isn't properly required yet

i.e. go for defschema

Could you add a (js/console.log “a”) in the require snippet and (js/console.log “b”) into the 2nd snippet?

And I’m in the train with a very bad cellular network

Write whatever you discover here and I’ll take a look when I get home

Oh, I see that the require statement failed

you can make it visible from the browser console

#error {:message "No such macros namespace: cljs.spec, could not locate cljs/spec.clj or cljs/spec.cljc", :data {:tag :cljs/analysis-error}}

But if I re-eval the require statement, the error disappears

hmm, I don't see that in the console

I mean, in the browser dev tools

the only errors I get are "use of undeclared var ..."