Fork me on GitHub
#calva
<
2019-04-08
>
pez04:04:18

@saikyun , can you describe the steps you take to start the repl and connect and such? Usually goto definition is a dependencies issue. But you also have those scheme warnings...

Alexander Kouznetsov06:04:56

Is anyone looking into implementing a symbol map for clojure files?

pez06:04:00

Welcome, @alexander.minolta! Not at the moment, that I am aware of. Wanna have a go at it?

Alexander Kouznetsov06:04:32

Thank you! Yeah, feels like very useful feature.

pez06:04:42

Indeed. I know someone, somewhere, made some experiments with it, but it was a long while ago, and that someone has left the building. 😃

pez07:04:16

If you do take it on. Please start by filing a feature request on the github repo and tell people you'll be working with a PR.

pez07:04:22

And the branch to base your PR on is pez/repl+jack-in. It has diverged quite a lot from master at this time.

Alexander Kouznetsov07:04:46

Could you please share a link to the description of the API referenced here?

(def operation
  {:EVALUATE "eval"
   :LIST_SESSIONS "ls-sessions"
   :LOAD_FILE "load-file"
   :COMPLETE "complete"
   :CLONE "clone"
   :CLOSE "close"
   :STACKTRACE "stacktrace"
   :INFO "info"
   :REFRESH "refresh"
   :REFRESH_ALL "refresh-all"
   :REFRESH_CLEAR "refresh-clear"
   :FORMAT_CODE "format-code"
   :TEST "test"
   :TEST_ALL "test-all"
   :RETEST "retest"
   :PPRINT "pprint"})

pez07:04:51

Not sure what it is you need here, but the file you picked up that from, shouldn't still be around any longer...

Alexander Kouznetsov07:04:45

I’m looking for a list of ops available.

Alexander Kouznetsov07:04:52

Such as this.client.write({ op: "load-file", session: this.sessionId, file, id, "file-name": opts.fileName, "file-path": opts.filePath })

pez07:04:34

Are you on pez/repl+jack-in? (Just checking)

pez07:04:17

I am not sure how to assemble the nrepl ops info, @U09LZR36F might know.

pez07:04:39

I think you've found the relevant Calva file, but anyway: calva/nrepl/index.ts.

Alexander Kouznetsov07:04:59

Yeah, would be great to know how to get symbol info.

dominicm07:04:44

There's a describe operation which will give you a list of ops available in your nrepl.

dominicm07:04:50

Is that what you mean?

Alexander Kouznetsov15:04:35

Kind of. I guess the extension relies on certain nrepl operations being available. I was wondering what is a set of them. I guess describe is one way to find out, the other might be just the documentation. Is this the one? https://github.com/clojure-emacs/cider-nrepl#supplied-nrepl-middleware

Alexander Kouznetsov15:04:32

Is there a way to extend the set of operations within the extension context?

pez06:04:23

How do you mean? Add ops on the fly?

Alexander Kouznetsov05:04:15

I tried pez/repl+jack-in branch but it doesn’t seem to build. So I will use master for now.

pez07:04:09

How didn’t it seem to build? Also you should use the dev branch now. I’ll see if I can pull the PR in there.

pez09:04:25

Now tried it. Very nice! See my comments on GitHub.

Alexander Kouznetsov05:04:09

It’s failing with:

[0] calva/calva-fmt/ts/providers/ontype_formatter.ts(11,40): error TS2345: Argument of type 'LineInputModel' is not assignable to parameter of type 'ReplReadline'.
[0]   Property 'parent' is missing in type 'LineInputModel'.
[0] 
[0] 10:39:29 PM - Found 1 error. Watching for file changes.

pez05:04:24

Did you follow the steps from that wiki page?

Alexander Kouznetsov05:04:18

You’re right, I didn’t.

pez05:04:38

The build process has changed considerably between master and dev.

pez09:04:36

Trying out 164 now. Now I get “No symbols found”, whatever I try with.

pez09:04:22

Also, can you try to not include whitespace changes in these PRs? It makes it a bit hard to see where to find “real” changes and also will make merging trickier.

Alexander Kouznetsov04:04:06

Sorry, all of these are automatic. I’ll try to avoid adding them next time.

pez06:04:37

It's pretty hard to avoid. But at least in files that otherwise edited, it would be extra good not to have them.

pez06:04:59

@hoppy, about that packaging problem on your setup. I am worried it is an indication of something lurking, so if you want to investigate it, I'd be happy. However, I don't know anything specific you can try. It is quite awful when it only shows up in the built artifact... Had you spotted something particular about that? (Sorry, lots of things going on, so my memory has a hard time keeping up.)

Saikyun11:04:13

@pez the repl server starts automatically when I start arcadia. 🙂 when connecting to that server I use Calva: Connect

Saikyun11:04:51

the thing is that I think there might be information that arcadia's nREPL-server isn't giving Calva, so I think I'd need to suplement Arcadias nREPL-implementation

Saikyun11:04:57

with what's missing

pez11:04:21

Is there a way for you to specify nREPL dependencies when starting Arcadia?

Saikyun11:04:10

atm there is no dependency management (it's coming I believe), so you'd have to add it manually to your project

Saikyun11:04:37

but I'm guessing that things like cider-nrepl aren't very compatible with clojure clr

pez11:04:42

I guess there is some clr nrepl project?

Saikyun11:04:22

though I'm not sure if arcadia uses this lib

pez11:04:33

Maybe @bozhidar knows something about efforts for getting nrepl to CLR?

pez11:04:04

I'm sure he would love you spearheading it, @saikyun 😃

Saikyun11:04:54

@pez I'm not sure if we're talking past each other. go to def works in cider-mode for emacs, so there seems to be something missing in calva

pez11:04:33

Yeah, there probably are things missing in Calva. Maybe CIDER does something special for CLR or Arcadia.

pez11:04:50

Can you peek at definitions?

Saikyun11:04:57

no, sadly not

Saikyun11:04:24

do you know what code is called in calva when you do go to definiton? I could have a peek there

pez11:04:32

It's probably in calva/nrepl/index.ts.

pez11:04:34

The provider is in: calva/providers/definition.ts which then uses the info op.

Sasho11:04:14

Hey @pez, just popping by to say thank you for the awesome plugin! I’m a Sublime Text user, so switching to VS Code is easy for me and your plugin provides access to the goodies, that emacs /vim users are enjoying.

pez11:04:29

Hello, @sasho.popov! Thanks for cheering us on!

🙂 4
pez11:04:05

Dear friends of Calva. This Calva 2 build includes a setting for giving the Jack-in process any environment variable definitions it might need. Meant for being used for Workspace settings mostly. As an example: in my project at work I need this:

"calva.jackInEnv": {
        "DATOMIC_URI": "datomic:"
    }

slipset12:04:11

Quick question, is there a way to enable calva-paredit for js files as well?

pez12:04:28

I have tried, @slipset. But at least with paredit.js things did not behave. We're going to replace paredit.js with @mseddon's stuff, though, so just maybe we will be able to give paredit to other languages as well.

slipset12:04:41

Just using Code a bit for Js work, as my Emacs tends to go hang it self at random points in time, and since I have my Clojure repl running inside Emacs, I don’t want to kill it off.

pez12:04:39

I keep trying to slurp and barf brackets in both JS and CSS and all over.

😂 4
Dmytro Bunin12:04:58

@pez when I try to jack in I get parse.aliases.map is not a function

pez12:04:23

You probably have aliases in your project file then, @dmytro.bunin?

pez12:04:04

You should be able to have that, of course, but I am probably doing the wrong thing with them....

Dmytro Bunin12:04:19

uh maybe it’s because the project is using boot

Dmytro Bunin12:04:30

I’ve only used the calva with tools-deps before

pez12:04:49

OK, so boot. Is the project open source?

pez12:04:22

It would be nice if Calva could support boot as well.

Dmytro Bunin12:04:50

oh well we are refactoring everything to tools.deps anwyays

Dmytro Bunin12:04:54

time to migrate 😄

pez12:04:14

lol. Yeah, maybe that's what will happen

pez12:04:50

Can you jack-in with tools-deps projects?

Dmytro Bunin12:04:57

I didn’t try yet

Dmytro Bunin12:04:46

I guess that’s not a boot issue then

Dmytro Bunin12:04:38

and yeah, in that project there are aliases

Dmytro Bunin12:04:49

same thing for different environment too

pez12:04:40

Yeah, I've changed the parser and it was a bit of work to make it play with the :profiles map in leiningen projects. Work that I haven't put into aliases yet.

Dmytro Bunin12:04:01

if I delete profiles

Dmytro Bunin12:04:04

I get this blob

pez12:04:07

Hmmm, I need to have a look.

Dmytro Bunin12:04:26

I meant aliases, not profiles

Dmytro Bunin12:04:18

is there a way not to include the cljs stuff when jacking in?

Dmytro Bunin12:04:23

cos it’s only a clojure service anyways

Dmytro Bunin12:04:58

welp gonna use the calva: Connect for now

Dmytro Bunin12:04:06

I hope this helps somehow 😄

pez12:04:45

Is there a way to see that there is no need for cljs stuff, you'd say?

Dmytro Bunin12:04:15

Im not sure I understand the question

Dmytro Bunin13:04:00

I think in cider there are two different commands to start the cljs and clj repls

pez13:04:41

I meant in the deps.edn file. (I'm embarrassingly unfamiliar with those.) If you would be parsing the file, what would you use to decide wether cljs repl deps should be injected or not?

pez13:04:22

I'm guessing that might be what's going wrong with piggieback there. It assumes clojurescript is present.

Dmytro Bunin13:04:52

we don’t use clojurescript ourselves, so I am embarrassingly unfamiliar with cljs setup of tools.deps too

pez14:04:43

I'll figure it out.

Sasho13:04:59

With Calva, is it possible to put some kind of a breakpoint statement somewhere in the code, stop execution at that point and start stepping in/over the code?

pez14:04:20

@sasho.popov, no, there's no debugger in Calva yet.

Sasho14:04:32

O.K., thank you very much.

Sasho14:04:51

If I start a repl with lein repl in a terminal in VS code, if I exit the repl, the nrepl server is not shutdown - I can reconnect to the same port and see in my repo, that I have the file .nrepl-port. What is the proper way to shutdown a nrepl server?

Sasho14:04:55

I see, that if I exit VS code altogether the .nrepl-port is cleaned up. So the logic is - as long as I have VS Code open, I shouldn’t need to kill the nrepl server?

pez14:04:07

I usually start my repl from a terminal outside vscode. That way I know where it is and how to kill it. 😃 But that is also because I restart vscode very often, due to maintaining Calva while working with other things.

Sasho14:04:17

Got it, thank you!

guillaume14:04:35

Saw this lib in #announcements https://github.com/Ivana-/bb-debug Thought it might be of interest for integration in calva…

pez15:04:29

Is that your repo, @U0A6H3MFT?

pez15:04:50

@saikyun might be interested as well.

ivana15:04:22

yes, it is my repo

ivana16:04:58

it can be integrated with any editor which can highlight given string/column number

ivana16:04:40

with some limitations about macroexpanded forms (they have not relations with source code text)

pez16:04:44

@sasho.popov, have you seen?

pez16:04:26

@U0A6H3MFT, I’m guessing this is hard to do for ClojureScript?

ivana16:04:41

i think so. not about for swing gui windows, but mainly cause of absence eval form in cljs, as I remember

ivana16:04:57

I am going to make a youtube stream about use this debugger and its some technical details at 17:00 UTC (in a 15 minutes). everybody are wellcome, but it will be IN RUSSIAN 🙂 https://www.youtube.com/watch?v=-YdGuODInSM

ivana18:04:12

my shame, I forgot that on one main window sharing all watcher windows was unvisible! 😞 only at the end of stream one man said me about it an I show the interactive watchers to. sorry for this

pez18:04:44

Next time you'll be thinking about things like that. 😀❤️

ivana18:04:50

all previous times I shared whole screen and did not think about such problems. but recently google hangouts changed his interface and I can not share whole screen on translation start, and had to share anything I can.....

Sasho06:04:04

@pez Yes, thank you, I’ll look into this!

bozhidar14:04:10

> Maybe @bozhidar knows something about efforts for getting nrepl to CLR?

bozhidar14:04:30

The original nREPL CLR project was never completed and is effective dead.

bozhidar14:04:50

Today there’s a newer project that works, at least to some extent.

bozhidar15:04:46

Generally it’d be really nice if there was an official nREPL CLR (and that wouldn’t be hard to implement IMO), but no one has expressed any interest in working on such a project unfortunately.

bozhidar15:04:43

If he had the server we could easily have added CLR support to third-party middleware using .cljc.

pez16:04:03

An nREPL bridge. That’s cool!

bozhidar16:04:00

Yeah, it’s pretty similar to what piggieback does for ClojureScript.

bozhidar16:04:57

I guess something like this could be extended to CLR itself, but it will be limitted to evaluation-only. Still, that certainly beats having nothing. 😄