Fork me on GitHub
#calva
<
2019-10-30
>
Byron Miller18:10:41

newbie question - if i generate a project with lein such as lein new compojure and then i open that with Calva - what do i need to do so that the project is processed and my jacked-in repl can resolve say (defroutes app-routes ... inside src/projc/handler.clj without saying "unresolved symbols" that are defined in project.clj?

pez18:10:42

Dear Calva-friends: Please help test this RC of Calva. https://1823-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.56-dev-dc80b5f2.vsix It contains these changes: * Provide option to select the initial view colum for REPL window * Removed useWSLconfiguration option because the the use of Calva is fully supported through the Remote - WSL extension. * REPL window freezes when the evaluation takes a long time * REPL window gets sluggish with large data structures * REPL colours and logo get too much attention Which should mean that @m373h4n, @filipematossilva and @mattly might be extra interested in providing testing help. There has been some needed changes in our Clojure lexer, which shouldn’t break anything, but hey, it is central code in Calva so we need to be extra careful before releasing.

Filipe Silva20:10:47

@U0ETXRFEW how do I use that file?

Filipe Silva20:10:15

oh inside vscode I have a "install from .vfix" command

Filipe Silva20:10:17

that must be it

pez20:10:18

Yeah, sorry. That’s it. 😃

pez20:10:38

Please note that I have just changed my mind about the repl column setting and posted a new vsix for the testing. See channel.

Filipe Silva20:10:57

I am testing the "open repl window on connect" option as that was the one I really cared about

Filipe Silva20:10:33

I'll install the other one and keep using it as normal

Filipe Silva20:10:43

how do I go back to the released version?

Filipe Silva20:10:50

ah I see on the page you linked

pez20:10:55

I think there is a “Use another version…” option on the Calva entry menu in the extensions pane. That should also be mentioned on that wiki page.

pez20:10:39

Oh, it was already mentioned. Haha.

mattly18:10:26

Woo! Hopefully I can get a chance to look tonight

pez18:10:51

@byronm have you loaded the file?

Byron Miller18:10:24

(defproject test2 "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url ""
  :min-lein-version "2.0.0"
  :dependencies [[org.clojure/clojure "1.10.0"]
                 [compojure "1.6.1"]
                 [ring/ring-defaults "0.3.2"]]
  :plugins [[lein-ring "0.12.5"]]
  :ring {:handler test2.handler/app}
  :profiles
  {:dev {:dependencies [[javax.servlet/servlet-api "2.5"]
                        [ring/ring-mock "0.3.2"]]}})

;; => Syntax error compiling at (project.clj:1:1).
;;    Unable to resolve symbol: defproject in this context

Byron Miller18:10:36

not sure i'm loading it how calva expects it 🙂

naproxen18:10:11

Cool, I am excited! I'll test tomorrow morning!

pez19:10:11

@byronm you can't load the project file. It's special.

Byron Miller19:10:04

So i'm using wsl, I see the repl loaded all of the jars/deps

Byron Miller19:10:40

and loaded namespace in repl

Byron Miller19:10:20

i'll try this on my mac

pez19:10:34

@byronm, I think that it is that the linter doesn’t know about the defroutes macro. See ifhttps://calva.readthedocs.io/en/latest/linting.html can offer some guidance.

Byron Miller19:10:03

Is Calva Not understanding the :refer :all? do i have something goofy in there?

Byron Miller19:10:15

ahh, i'll go check that out

pez19:10:51

It’s not Calva really, it’s clj-kondo that advices you to not use :refer :all. (But it is Calva that brings in clj-kondo, so your question belongs here anyway.)

borkdude20:10:43

@byronm clj-kondo advises against :refer :all because not using it mostly yields clearer code here are some options you can use to silence the warnings for compojure: https://github.com/borkdude/clj-kondo/blob/master/screenshots/compojure-config.png

borkdude20:10:08

the :clj-kondo/config bit needs to go inside .clj-kondo/config.edn in your root project folder

David Hoyt20:10:07

Inspect fails under calva. The Swing window is "invalid." It works perfectly with command line repl, but not under calva. Any help?

pez20:10:42

@david.hoyt, have you looked “under” the vscode window?

David Hoyt22:10:19

Oops. My bad. Thanks.

pez20:10:57

@m373h4n, @filipematossilva and @mattly, use this build for your testing instead. It skips having a setting for REPL window view column, and instead remembers where the window was last moved to and re-opens it there. It’s less maintenance for Calva devs this way and less things for the users to have to know about. https://1827-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.56-dev-ff643ad1.vsix

scaturr20:10:18

I apologize if this has been asked, but I can't seem to find an answer 😞

scaturr20:10:27

I can't seem to get inline evaluation to work

scaturr20:10:44

Everything gets sent to the CLJ REPL tab

pez20:10:12

Tell us what command you are using, @scaturr

scaturr20:10:23

ctrl+alt+c+e

scaturr20:10:35

oddly enough, when I use the command palette manually it works as expected

pez20:10:12

Maybe you do not release ctrl+alt before you press e?

scaturr20:10:22

😱 that is it

scaturr20:10:28

😅 thank you

pez20:10:49

Glad the mystery is cleared! 😃

scaturr20:10:00

Great work on this!

pez22:10:14

Hey, I only know that because I too thought it wasn’t working at first and I also thought “invalid” meant invalid. 😃