This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-30
Channels
- # announcements (14)
- # aws (2)
- # beginners (167)
- # calva (25)
- # cider (124)
- # cljs-dev (2)
- # cljsrn (7)
- # clojars (2)
- # clojure (113)
- # clojure-europe (2)
- # clojure-italy (6)
- # clojure-spec (30)
- # clojure-uk (90)
- # clojurescript (20)
- # code-reviews (16)
- # cursive (28)
- # data-science (2)
- # datomic (89)
- # duct (97)
- # emacs (4)
- # figwheel-main (12)
- # fulcro (37)
- # graphql (3)
- # java (3)
- # jobs (2)
- # juxt (3)
- # kaocha (37)
- # leiningen (2)
- # luminus (2)
- # off-topic (30)
- # onyx (2)
- # pathom (3)
- # qlkit (1)
- # re-frame (7)
- # reagent (2)
- # reitit (62)
- # remote-jobs (9)
- # shadow-cljs (26)
- # tools-deps (19)
- # vim (1)
- # yada (8)
btw, changing the clear all inline display of evaluation results
from ctrl+esc
to esc
was great for me. My sore pinky thank you
(I don't know when that changed, but I believe it wasn't long ago)
It was with the latest release. Unfortunatelly users of vscodevim are not as happy. But we will fix that too. 😃

Hi!
I’m using latest (1.3.61) calva for cljs project and some weird error started to appear.
For some reason “Evaluate current file” produces this Command 'Calva: Evaluate current file' resulted in an error
in a form of popup. I don’t see anything else in other windows. And I think it is reproducible in every file.
But I can evaluate forms without problems. And I see docs for core fns.
My ~/.lein/profiles.clj
:
{:user {:plugins [[lein-kibit "0.1.6"]]}
:repl {:plugins [[cider/cider-nrepl "0.19.0"]]
:dependencies [[cider/piggieback "0.3.10"]
[figwheel-sidecar "0.5.16"]]
:repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}}}
Lein v2.7.1
And this is how I start my figwheel app:
lein repl
(use 'figwheel-sidecar.repl-api)
(start-figwheel! "id1" "id2")
(cljs-repl)
Also I tried to select whole file and eval it with “Evaluate selection or current form”. In this case I actually see meaningful error in “Calva says”:
Error: clojure.lang.ExceptionInfo: No such namespace: hb.front.state, could not locate blah/front/state.cljs, blah/front/state.cljc, or JavaScript source providing "blah.front.state" in file <cljs repl> {:tag :cljs/analysis-error}
In this file ns
declaration looks like this:
(ns blah.front.offers-list.checkboxes
(:require-macros [reagent.ratom :refer [reaction]])
(:require [clojure.string :as string]
[blah.common.helper :as h]
[blah.front.state :refer [state]]
[reagent.core :as reagent]))
Tried to rollback to 1.3.60: still see docs, “Evaluate current file” produces “No results from file evaluation.” in “Calva says”. But “Go to definition” is not working.
For simple app created with figwheel template everything works fine.Evaluate current file
was (I don't know what changed in the latest version) a bit problematic, they are working on improving it
in the meantime what I do is select all
(cmd+a) and then evaluate current top level form
(ctrl+alt+p SPC)
because go to definition don't work before evaluating the file, so if you try evaluating the whole file and it doesn't work because of some syntax problem the go to definition will most likely not work
@claynon thanks for advice, but it is the same as for “Evaluate selection or current form”:
Error: clojure.lang.ExceptionInfo: No such namespace: blah.front.state, could not locate blah/front/state.cljs, blah/front/state.cljc, or JavaScript source providing "blah.front.state" in file <cljs repl> {:tag :cljs/analysis-error}
Also I noticed that sometimes switch clj -> cljs
in status bar doesn’t happen. I need to restart repl and vs codealso I tried to play with calva.projectRootDirectory
setting
cljs code in our project located under ./clojure directory, but project.clj
in a workspace root
but with no results
I think that if project.clj
is in workspace root, then that is the correct projectRootDirectory
.
@il.tmfv can you confirm that it doesn’t matter which file you are evaluating? Also, check that you don’t have dashes instead of underscores in the path to the files.
hm, I think I got it. I’ve done some more tests. We have 2 apps (build ids) in our project: “front” & “extranet” I start fighwheel with
(start-figwheel! "extranet" "front") ;;
But actually order of build-ids doesn’t matter. It feels like they sorted (not sure how) and (cljs-repl)
call starts repl for “extranet” anyway (with command from calva.startCLJSREPLCommand
setting).
So if I start figwheel with 2 builds then I will connect to repl for last completed build (in my case it is “extranet” each time), then I can navigate in shared files and in “extranet” files.
If I start figwheel with only “front”, then I can navigate in “front”-related and shared files.
But File evaluation still fails with popup. I can trigger file eval with saving file - then everything works fine (in the build scope as I described above).
Sorry about this. I’m not so experienced in cljs world 😐
-------
Maybe somebody knows how to switch repl build quickly?
Also maybe it can be implemented in calva?Is it right?
- I start repl it a terminal
- calva connects to it via lein repl :connect localhost:12345
- basically another process starts (I see extra java process)
- then calva sends command from calva.startCLJSREPLCommand
- and it starts cljs repl
So basically I need to change calva.startCLJSREPLCommand
command each time and restart vs code if I want to navigate in files from multiple builds, don’t I?
I think that we should have a way to switch between builds. We have that for shadow-cljs. But in waiting for that, what happens if you use the repl you started figwheel from to switch builds?
I will try tomorrow. I think I don't even need to restart figwheel, cljs-repl takes build id
I use figwheel main mostly these days, so I'm a bit rusty on figwheel- #figwheel ofc may have the answers you are looking for