Fork me on GitHub
#calva
<
2019-06-21
>
cheatex12:06:06

Hello again. I'm continuing my attempts to get new calva running. Here is the jack-in failure

cheatex12:06:55

It's from "Calva Jack-In" console

cheatex12:06:34

That is "calva says" output

cheatex12:06:40

I'm able to connect to a running repl. But it exposes some strange behaviors.

cheatex12:06:04

1. Completions aren't substituted on Enter. Say I type @app get completion @app-state (which is correct), but after pressing enter i get @app executed.

cheatex12:06:28

2. The invitation string jumps from app's namespace to cljs.user, while it seems that expressions i type are always evaluated in app's namespace.

cheatex12:06:32

3. When I evaluate expression resulting in some bigger map only small piece of it get printed.

cheatex12:06:23

Also printing/pretty printing/inline print actions do same output slicing. Looks like the shortening algorithm from inline printing is now applied everywhere.

cheatex12:06:55

Putting the repls back into terminal view isn't an option anymore, right?

pez12:06:58

There's an issue about that on github, and it's on the todo list.

pez12:06:59

1. Completions are a bit funky. You need to complete with tab before submitting. 2. When you evaluate something from a file in the repl window, the repl window will switch to the file's namespace to evaluate the expression, then switch back again. I'm considering changing this behavior. 3. How big is that bigger map? How much of it gets printed? Sounds like something you should report as an issue.

cheatex08:06:32

The 3rd issue is gone now

pez12:06:38

That cider-nrepl loading error is strange. This is a long shot, but maybe you have something in your profile or the project that interferes...

cheatex08:06:23

I don't have any profile files. Is there a way to show all configuration sources in lein console?

pez13:06:42

@hoppy , @dominicm , I am looking at how to support custom cljs repls. Do any of you have a public project I can test with? Or anyone else in this channel, of course.

hoppy03:06:30

yeah @U0ETXRFEW, I'm having a hard time understanding what you are looking for here.

pez06:06:15

@hoppy, as I recall, you had a cljs project that wouldn’t work with Calva’s jack-in, Maybe I recall this wrong.

pez10:06:01

@U0C8489U6, I guess it can be a figwheel repl, if it is customized in a way that Calva fails to spawn it. But rather it would be any cljs repl that the built in Calva configs do not support. I am basing my support for this via a JSON setting where the user will enter a few strings that Calva uses for spawning and for checking connection status. It looks like so if I configure a standard Fgwheel repl with it:

{
        name: "Foo",
        ns: "figwheel-sidecar.repl-api",
        startCode: "(do (use 'figwheel-sidecar.repl-api) (if (not (figwheel-sidecar.repl-api/figwheel-running?)) (figwheel-sidecar.repl-api/start-figwheel!)) (figwheel-sidecar.repl-api/cljs-repl))",
        startedRegExp: "Figwheel: Starting server at",
        connectedRegExp: "Prompt will show"
    }
I am not sure if this will suffice, and therefor would like some real world examples of custom cljs repls.

pez10:06:44

(Yes, that is a JS object, but it will be the corresponding JSON when it’s configured in settings.json. )

hoppy11:06:05

I have something of a frankenstein project that was using node and setting up the project with leiningen.

hoppy11:06:30

I'm not sure what the "right" way to set this up for calva would be

hoppy11:06:54

how do we want these to be done

pez11:06:02

It was your Frankenstein’s project I was thinking of. 😃

pez11:06:09

I’ll pack a vsix with the support I’m adding right now, and then we’ll see if you can get your project running with that.

hoppy11:06:10

perfect timing. Haven't worked on that in a while, but need to get it running to work on it tomorrow

dominicm12:06:30

@U0ETXRFEW https://github.com/juxt/edge is where it lives. It uses figwheel-main under the hood, but it's not using the main API, it has an alternative system for providing config. Instead you have to start with (dev-extras/cljs-repl) (after requiring that namespace ofc). You can generate a new app with bin/app --cljs acme/app

dominicm12:06:42

you'll need to start the nrepl with -A:dev:dev/build:build

dominicm13:06:30

one thing I'd find useful is the ability to include a file in generated projects which tells calva how to start the repl for this project.

pez13:06:40

If I get this to work, then that will be entirely possible.

dominicm13:06:43

Awesome 🙂

pez14:06:57

I run into problems starting my edge app:

Error building classpath. Manifest type not detected when finding deps for juxt.edge/app.logging in coordinate #:local{:root "../edge.app.logging"}

pez14:06:53

That’s when starting with ../bin/rebel --cljs -A:dev:dev/build:build, but also all other ways I’ve tried. 😃

pez16:06:43

I don’t know what I am doing wrong. I’m following the instructions here: https://juxt.pro/edge/docs/setup.html

pez18:06:18

Does those instructions work for you, @dominicm ?

cheatex08:06:23

@U0ETXRFEW I can share pet project of mine. There is some overengineering and crappy code, so I guess it's a good test target 🙂

pez08:06:07

Haha, yeah, that sounds like a perfect test target!

manas_marthi19:06:00

In VSCode, the default key binding for ctrl+, points to the settings menu. The number of times people access settings windows is far more less than the number of times s-expressions are executed. I modified calva key bindings to use ctrl+, (ctrl+oem_comma) instead of ctrl+alt+c. I also remapped the workbench settings keybinding to ctrl+, g so that it is still accessible. I left the Paredit settings unmodified. However, they are included in the below gist for reference. All the when clause of "when": "editorTextFocus && editorLangId == 'clojure'" so that their scope is limited to clojure only. https://gist.github.com/pikeview/317f639091f57c3055681b06f0dc791a