This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-16
Channels
- # announcements (7)
- # aws (9)
- # babashka (31)
- # beginners (28)
- # calva (14)
- # clj-kondo (29)
- # cljs-dev (23)
- # cljsrn (16)
- # clojure (21)
- # clojure-france (1)
- # clojure-nl (2)
- # clojure-spec (20)
- # clojure-sweden (4)
- # clojure-uk (6)
- # clojurescript (62)
- # community-development (5)
- # conjure (81)
- # cursive (14)
- # datomic (5)
- # defnpodcast (2)
- # docker (1)
- # figwheel-main (11)
- # fulcro (17)
- # graalvm (5)
- # jobs-discuss (5)
- # kaocha (1)
- # off-topic (54)
- # pathom (1)
- # pedestal (1)
- # quil (1)
- # re-frame (34)
- # shadow-cljs (34)
- # tools-deps (39)
- # uncomplicate (2)
Hello! I've made the jump from the legacy version to the new one and it's looking awesome! Props for all the work, once again 🙂
I've got one question that I wasn't able to solve by looking at the current documentation, though maybe I just didn't find it. Do we currently have an equivalent way of configuring multiple connections such as when we could have a .conjure.edn
file with multiple conns configured? We have more than one service here, and I'm trying to figure out how to configure the connections and manage jumping from one to the other. The way we handled it in the legacy version was to declare the connections in the config file, all of them disabled by default and then :ConjureUp +service-name
to connect to the service we were working on at the moment. Is this natively supported or something that I should configure with some vim commands?
Hey! I'm glad to hear you've managed to update successfully! It's pretty different in some ways so I expect some friction, I'll help where I can.
So the multiple connections concept is gone (for now?) because nREPL supports multiple sessions which means through one connection you could run your JVM web server, shadow-cljs and core JVM Clojure development evaluations.
Rather than having many connections with many sessions (suuuuper confusing and hard to navigate IMO) I took the simpler route.
The intended approach now is to use .nrepl-port
auto connection when you have one REPL to worry about and :ConjureConnect [port]
commands when you have multiple.
I'd recommend a couple of mappings or commands you can run to easily connect to the REPL you're interested in. It should take the same amount of effort to switch REPLs but through massively different means. I think in the long run not having my own system of config files and rules about which file means what will be for the best. It's up to you and Vim Script to set it up for your needs which should be far more flexible than my own configuration and some regular expressions.
I hope that's not too awkward for you! Feedback is much appreciated so I can make it smoother going forward for real use cases.
Hey, definitely not an issue! It’s not the most common of cases and it’s something we can handle on our side without too much trouble.
Just wanted to be sure I wasn’t overlooking anything native before devoting some time to doing it manually on our end.
And your reasoning is sound for not including it as part of Conjure.
Thanks for the support. I’ll probably tinker with it more on Monday, but I really liked what I’ve been able to test so far. :thumbsup:
Finally happy that everything's as stable as I can get it for now so I can work on new / improved things!
Oh that's a fun bug, I guess you can't issue window commands or define cursormoved commands in the command-line window?
Trying to keep *1 *2 *3 in sync is causing me LOADS of problems :thinking_face: I can't eval any aux code for you since it messes them up.
Yeah, my thinking is that they're rarely used and of negligible value, apart from *e. I have never once used them in anger.
It's just a special REPL var that contains your last 1st, 2nd and 3rd evals. Every eval moves them along.
This means I can't ever perform an eval for you as part of an eval in your session since it messes with this history.
Trying to make ns switching and auto require much more robust across shadow-cljs and shadow, it's taken me all day and I'm still not there. Every solution I come up with has a trade off, the least worst one being "it messes with the *1, *2, *3 history"
Actually it works fine in cljs land, in-ns seems to not alter *1 which is great. In Clojure JVM land *1 is replaced by the result of in-ns. This just messes with the history because I want to execute in-ns before each eval.
well if you are talking over nrepl you can set :ns
as part of the message and shadow-cljs should respect it
I can use (do (in-ns foo.bar) *1)
to get around it, sort of. But that won't work in ClojureScript as far as I can tell, it wants in-ns to be a top level special form.
Wait what. That's not documented for nREPL. If that's a thing everywhere then this is a non issue.
to be honest I wouldn't want to build tools on top of nrepl or prepl. they are terrible protocols for tools imho.
nREPL has grown on me a little, but the docs missing some things like this have really tripped me up.
Considering standardising my default namespace to conjure.user
too so I don't have to constantly handle the difference between user
and cljs.user
{:op "eval" :code "::foo" :ns "foo.bar"}
as nrepl message should be supported by regular CLJ eval and shadow-cljs CLJS sessions
Also, is there a guarantee that if I send two eval messages they will be run in order?
So if I send a require and then use the resulting required namespace in two messages, could it get race-y? It can, right? Because require is async?
in shadow-cljs it will wait for the first message to complete before processing the next
in regular CLJS require is async and it will process the next directly, so it breaks things if you send too fast
Curses. Well another problem for another day, right now I'm focusing on solid support for shadow and JVM.
Any idea why clojure.test
would be undefined in shadow though, @thheller :thinking_face: I thought I had it working.
Ah, sorry. So I'm requiring clojure.test
and then trying to use clojure.test/run-all-tests
etc, but it's saying it's undefined. I don't think I need to use cljs.test
, that hasn't been the case for ages.
$ shadow-cljs node-repl
shadow-cljs - config: /mnt/c/Users/thheller/code/shadow-cljs/shadow-cljs.edn
shadow-cljs - connected to server
cljs.user=> (require 'clojure.test)
nil
cljs.user=> (clojure.test/run-all-tests)
Testing shadow.cljs.devtools.client.console
Testing shadow.cljs.devtools.client.node-repl
...
; --------------------------------------------------------------------------------
; run-ns-tests: dev.sandbox
; (err) ------ WARNING - :undeclared-ns ------------------------------------------------
; (err) Resource: :1:30
; (err) No such namespace: clojure.test, could not locate clojure/test.cljs, clojure/test.cljc, or JavaScript source providing "clojure.test"
; (err) --------------------------------------------------------------------------------
; (err) ------ WARNING - :undeclared-var -----------------------------------------------
; (err) Resource: :1:30
; (err) Use of undeclared Var clojure.test/run-tests
; (err) --------------------------------------------------------------------------------
; (err) clojure.test is undefined