This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-14
Channels
- # beginners (31)
- # boot (9)
- # cider (10)
- # cljs-dev (9)
- # cljsrn (16)
- # clojure (222)
- # clojure-austin (4)
- # clojure-france (13)
- # clojure-italy (21)
- # clojure-nl (2)
- # clojure-russia (71)
- # clojure-spec (9)
- # clojure-uk (39)
- # clojurescript (50)
- # cursive (16)
- # datomic (69)
- # dirac (2)
- # figwheel (1)
- # graphql (19)
- # hoplon (4)
- # jobs (1)
- # klipse (3)
- # leiningen (4)
- # liberator (3)
- # luminus (9)
- # lumo (9)
- # off-topic (3)
- # om (21)
- # onyx (11)
- # parinfer (2)
- # pedestal (8)
- # planck (19)
- # re-frame (17)
- # reagent (12)
- # remote-jobs (1)
- # ring-swagger (3)
- # spacemacs (17)
- # specter (23)
- # sql (1)
- # unrepl (64)
- # untangled (19)
- # yada (5)
@mfikes re ns-resolve
: as far as I can tell, it does not handle resolving vars from namespaces which have not been loaded. Trying to eval
a (require ...)
before the actual eval
(which resolves the symbol) does not always work, as in some cases the analyzer complains that the require
isn't at top level. Would you say it's safe wrap it with (binding [cljs.analyzer/*allow-ns* true] ...)
? At first glance it seems to work ..
Hmm. I don’t have a strong opinion other than it should strive to mimic Clojure as closely as possible
Ahh. Right. Interesting that you can’t eval a require… you could drop to using cljs.js
directly from self hosted to cause a require to occur, I suspect
yeah, it's strange, if I have say (def x (somehow-resolve 'foo.bar/y))
, then the analyzer (`parse`) sees a 'def
form, disallows 'ns*
forms, and then throws at the 'ns*
form
Are you attempting to write a function that will potentially load a namespace as a side effect?
I suppose if your code isn’t meant to be portable, it doesn’t really matter (in other words, you wouldn’t expect this code to work in regular JVM ClojureScript)