This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-27
Channels
- # beginners (24)
- # boot (10)
- # cider (6)
- # cljs-dev (8)
- # cljsrn (9)
- # clojure (46)
- # clojure-brasil (7)
- # clojure-dev (7)
- # clojure-germany (1)
- # clojure-uk (5)
- # clojurescript (22)
- # cursive (2)
- # datomic (19)
- # defnpodcast (2)
- # dirac (94)
- # emacs (4)
- # fulcro (20)
- # graphql (2)
- # hoplon (2)
- # lumo (9)
- # off-topic (2)
- # om (1)
- # re-frame (8)
- # shadow-cljs (66)
- # spacemacs (5)
- # sql (1)
- # test-check (3)
Just discovered Dirac, wow, am blown away. But I have an issue where I can see all the refers and aliases of the current namespace in the autocomplete menu, but when I try to access or use them, I get back undefined. Using the fully qualified symbols works just fine. Any guidance on how I can resolve this?
hi, this will be tricky diagnose over slack, it would be great if you could isolate it to minimal case and share your project
btw. do you use figwheel or some hot-reloading? autocompletion goes out-of-sync for hot-reloaded code
Yeah, I have boot-figreload as well
just make sure that you are seeing the problem after first full load without any hot-reloading
Yeah, that's the case
Will create a minimal repro :thumbsup:
FYI, this is the function which is used to “understand” aliases: https://github.com/binaryage/dirac/blob/master/src/implant/dirac/implant/analyzer.cljs#L32
@adamrenklint wait, maybe you are not in proper namespace? did you use in-ns
to switch? please follow https://github.com/binaryage/dirac-sample#hello-world
Yeah, definitely did that. A minimal repro comes in ~10 minutes, just finishing up the instructions.
@adamrenklint having some problem running boot dev
on my machine, clojure.lang.ExceptionInfo: Call to clojure.core/defn- did not conform to spec:
Same as you 😕
I noticed my clojure updated recently (via homebrew), maybe they have some more strict specs included
Ok, let me install Clojure via Brew and see if I get the same error
hm, I switched brew to 1.9.0.297 and still the same issue, so that is probably not the case
Yeah, I have 1.9.0.315 via brew now, and boot dev
is still working
Need to lookup what this generate-lein-project-file!
is, never heard of it before
here is the full error: https://gist.github.com/darwin/338e5eec68cf1ed0e7c516a45830fd7c
I should be able to disable it via clojure.spec.skip-macros, but setting it as env variable does not work for me
Hmm, weird
:poop:
The only reference to the issue I find is here: https://clojurians-log.clojureverse.org/boot/2017-03-03.html
But yeah, sounds like your machine has other issues
the problem is that generate-lein-project-file! does not conform to fn or macro specs, so it looks like old code or I have too recent specs or my specs are somehow confused
It's weird, because the project I sent you has a boot.properties
file, so the Clojure and Boot version used should come from there
Of course, the Boot loaded (a Go app, I think) is the one installed with Brew or by other means
Try deleting ~/.boot 😸
That's what I do when things get messy
Oh BTW, I have JDK9. Not sure how that would make a difference in any way, but mentioning it anyway
:thumbsup:
I’m not familiar with boot, didn’t start using it, but I agree it is a better way than lein
Ok cool, so I'm not crazy 😛
@adamrenklint I think the issue is in your REPL, normally you should do (require 'dirac-repro.core)
before you in-ns into it
I’m not sure what boot is doing there, but we should be able to run stanalone clojurescript repl driven by boot and test it there
btw. the code generated by the REPL can be seen in devtools unders Sources/left tree/dirac-repl
(require 'dirac-repro.core)
followed by (in-ns 'dirac-repro.core)
and then as-aliased
generates dirac_repro.core.as_aliased
javascript
When you say your repl, which piece are you referring to?
org.clojure/tools.nrepl?
Sorry, a complete noob when it comes to REPLs, so not much experience to draw from
A child of save->reload trying to evolve 🙂
I’m not sure here, because whole REPL situation is pretty huge mess, right now I have unloaded whole context out of my head
I wrote this piece, when I had it in my head 😉 https://github.com/binaryage/dirac/blob/master/docs/about-repls.md
I’m now goint to try the same thing in dirac-sample project, which is driven by lein’s repl machinery, and compare the behaviour
@adamrenklint ok, now I understand
using namespace alias alone does not refer to the namespace javascript object, e.g. reagent
or as-aliased
alone is not treated as something meaningful
Ah ok
Thanks for digging into it, much appreciated!
I'll boot up my large project and try it there
btw. figwheel’s repl is able to do those requires automagically for you, because figwheel knows about your cljs project (for hotloading) and is loading them anyways
I described it here: https://github.com/binaryage/dirac/blob/master/docs/about-repls.md#dirac--figwheel
Ok, will read through that and play a bit 🙂
Is there a reference implementation of that setup somewhere?
Ok interesting, I'll give that a try tomorrow
Thanks a bunch for taking the time to help me!