This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-06
Channels
- # adventofcode (112)
- # announcements (6)
- # beginners (197)
- # boot (3)
- # calva (52)
- # cider (25)
- # clara (14)
- # cljdoc (6)
- # clojure (147)
- # clojure-austin (6)
- # clojure-berlin (7)
- # clojure-brasil (2)
- # clojure-europe (3)
- # clojure-india (4)
- # clojure-italy (8)
- # clojure-new-zealand (2)
- # clojure-nl (7)
- # clojure-russia (7)
- # clojure-spec (29)
- # clojure-uk (63)
- # clojurescript (103)
- # core-async (5)
- # cursive (11)
- # datomic (16)
- # devcards (1)
- # emacs (28)
- # figwheel-main (3)
- # fulcro (97)
- # graphql (4)
- # hyperfiddle (1)
- # jobs (1)
- # kaocha (3)
- # lumo (9)
- # nrepl (4)
- # off-topic (29)
- # onyx (1)
- # pathom (4)
- # pedestal (8)
- # re-frame (24)
- # reagent (1)
- # reitit (13)
- # ring-swagger (7)
- # rum (11)
- # shadow-cljs (79)
- # sql (46)
- # tools-deps (67)
- # yada (8)
Last week at the ClojureBridge Bilbao (https://clojurebridge.org/events/2018-12-01-bilbao) I was trying to help some developer with her laptop to configure Calva (as she uses VS Code in her daily job)
i followed the instructions, the nREPL server was running and everything but some how the UI was stuck while trying to connect ... đ
after some more debugging (~15min later) i found out that for some reasons she didn't have localhost
as 127.0.0.1
in /etc/hosts
.... really strange, don't ask me why ...
which takes me to the the UI feeling of "Connecting..." and just waiting if something is happening or not ...
after checking the Calva code, I noticed the usual pattern/problem of trying to open a connection without a timeout ...
Oh, i saw this kind of stuff happening when asking the IDE to jump into a symbol without having a connection to nREPL first, @iperdomo
I made some changes and I was wondering if this is good enough to write an issue and open a PR - https://gist.github.com/iperdomo/5f24c8bcb5a47262d16847f3f3d74142
a failure in connection could have helped me debugging the issue faster, instead of several attempts of enabling/disabling the extension
The extension for emacs uses regex to find the keyword in a namespace and it needs that you specify a fully qualifyed keyword
@iperdomo: Thanks for sharing that information, and thanks for thinking about how Calva could have helped you to quicker pinpoint the problem, Iâll pull that PR right away, if you file it. I am right now looking at the connection scenario and figuring on what a better UI would be. Iâd love to speak to others about that as it will be quite a rewrite of how itâs done today either way, because the current code is really hard to maintain.
@mateus.pimentel.w does that Emacs extension try to look at the context of the keyword, or does it try to see if any fully qualified keyword corresponds to a an effect etcetera?
it kind of just gets the namespace of the keyword and searches for it there ( replacing the ::namespace/keyword by ::keyword )
Sounds like it could be something one could generalize to work with non-reframe things as well.
Yeah, it is cider/nrepl
that provides the info
op, like @spacemods mentioned the other day.
In the Calva context we can benefit from the fact that we can write stuff in ClojureScript so we can use libraries like rewrite-cljs
and stuff to structurally find things in the code, and do not always have to resort to regexps.
@pez ok, will open an issue and a PR ... i still need to make sure that i'm able to override those default values with a config ...
@iperdomo I donât think it should be configurable. When things work the connection is instant, so the timeout should be something short.
On settings and config: I generally try to avoid to add those whenever I can. It often opens up a can of cases and makes things harder to maintain, and there is always Emacs for people who love to tweak their editor.
@iperdomo assuming you have found the How to Contribute wiki page, and noticed that this piece of info is lacking. đ Iâll add it there, but for now. youâll need the vcse
packaging tool. npm install -g vsce
, should do it. Then to package the extension run vsce package
. Itâll produce a VSIX package that you can then install in VS Code. In the Extensions pane there is a small meatballs-menu with the option to install from local VSIX package. Version you package something âhigherâ than the current Calva extension and it will not be constantly replaced (In package.json
).
i found the wiki page, yes, and i managed to run all the steps ... so nothing is complaining