precept 2017-12-23

I thought i would give a try to precept again ... but i run in quite a few issues.

first i tried in a toy project of mine...but i run into problems with the session macro when reloading with figwheel ... it looks like it doesn't keep the fully qualified var names for my schemas... instead using locally qualified names

Ok. Do you have a snippet of the code that seems to be the problem or a description of the error?

🙂

ah you're faster than i am =)

No I spoke too soon 🙂

see this code is in ss.precept.rules ns, and i get errors saying that ss.precept.rules/db-schema doesn't exist

although i'm providing a fully qualified name for my dbschema

so i thought i would give a spin to your examples

but there i see you are cheating ! there is no reloading due to ns ^:figwheel-no-load todomvc.app

(also there are quite a few warnings during compilation but we'll let that slide)*

Thanks haha. Hopefully if I’m thinking of the same warnings you’re seeing they’re coming from Clara

anyways i've been looking at clara issues, and it seems they have a fix about this kind of namespaced var issues in their macros, maybe that's related

Did you start your project using the template or something else?

not not using the template

the clara thing was fixed maybe a week ago...let me try to find it

Hm ok. Have you tried restarting figwheel or refreshing the browser? I’m not sure the session recompiles when it receives new arguments or not

Ok. Thanks. I’m only aware that they added hot reloading for CLJS, not sure about namespace related issues

i've been playing with it for half a day =) refreshing and restarting all vm aswell as figwheel itself

it seems very brittle

i'm using latest clojure and clojurescript though

Ok. That should be fine

Is this a public repo where I could take a look?

i was afraid you would ask that ... I'll try to make a minimal example

btw thanks for your lightning fast responses =)

Totally up to you. I’m looking through the source right now and trying to think and not ask a lot of silly questions…there’s a lot of trickyness to macros, especially in CLJS. But I’m working on a project that uses a db-schema and client schema right now and not getting any errors

Np. Sorry you’ve burned half a day on this

precept has me quite excited, so there 's no problem there =)

In what I’m working on I’ve required the schemas at the top

mhhh do you think the fact i'm using cider might pose a problem ?

Glad to hear it. It’s just been me working on it and I haven’t had much time due to work recently so I’m sorry for the brittleness

I don’t think so…

Have you tried requiring the schemas at the top? I’m not using fully qualified in what I have working and sometimes even with fully qualified if they’re not required things don’t work

[precept-visualizer.schema :refer [db-schema client-schema]]
(session visualizer-session
  'precept-visualizer.rules 'precept-visualizer.other-rules
  :db-schema db-schema
  :client-schema client-schema
  :reload true)

i haven't tried that

hum you're not even qualifying the vars and it works

That’d be my best guess. I’m also using a .cljc file for the schemas but it should work with cljs too

let me try it here and i'll get back to you !

Ok cool. I’ll try to think of something else but I think that might be it…seems like I’ve run into it before even with other clojure things

allright looks like it works with non-qualified names when explicitely importing them

so i guess my mistake, sorry for the bother !

No problem at all. Really glad it worked

It’s counterintuitive to me...like what’s the point of a fully qualified ns