Fork me on GitHub
#conjure
<
2020-10-13
>
victorb17:10:05

Sometimes it seems like Conjure ignores my already opened log buffer and starts output stuff in the little floating window instead. I can't figure out if I'm doing something wrong or if this is to be expected, I can't reliably reproduce it, only happens sometimes

berkeleytrue17:10:40

I've run into that when I move around in the buffer

Olical17:10:44

It will do that if you can't see the bottom of the log buffer, this is so that you know there's new content / entries in the log while you're inspecting something from the past.

Olical17:10:18

This was something I planned in my own head and have never really taken feedback on / attempted to make configurable. Open to a discussion on it and eventual issues asking for config / changes 🙂

dave18:10:20

one option that looks kind of nice in my head is that you could display some sort of "look down" indicator instead of showing the bottom of the log buffer my thinking is, i'm already looking at the log buffer, so seeing another, smaller version of it pop up is perhaps a little jarring/confusing. i'd rather just see some indicator that tells me "hey, there's new stuff at the bottom of the buffer, just FYI." then i can press G whenever i'm ready to see the new stuff

berkeleytrue18:10:36

My expectation was that it would just append to the buffer.

uwo20:10:54

Has anyone encountered not being able to evaluate forms that contain reader conditionals while in a cljc file? I have one session open against a jvm-based repl. My repro is

;; attempt to evaluate in a cljc file:
(defn testing [] #?(:cljs :this :clj :that))

;; result in log:
; eval (root-form): (defn testing [] #?(:cljs :this :clj :tha...
; (err) Error printing return value at clojure.lang.Util/runtimeException (Util.java:221).
; (err) Conditional read not allowed

Olical20:10:14

I can't reproduce this :thinking_face: I've only ever seen this when something in the REPL itself has rebound the thing that allows you to use reader conditionals.

Olical20:10:28

(I just ran a reader conditional in a .cljc)

Olical20:10:42

How are you starting the REPL?

; eval (root-form): (defn testing [] #?(:cljs :this :clj :that))
#'dev.sandbox/testing

uwo20:10:23

I use lein repl and connect to that

uwo20:10:24

(as an aside, I was at v4.3.0 so I tried bumping to v4.6.0, but still the same error)

uwo20:10:35

does it matter that my repl is "no-env"

uwo20:10:40

; Assumed session: California Spangled ()

Olical20:10:35

Hmm, that means Conjure tried to check if you're Clojure or ClojureScript in your current session through a reader-conditional and got an error or nil.

Olical20:10:50

That session type works by reader conditionals, so it makes sense that it's broken if reader conditionals are playing up.

Olical20:10:02

Could you try ,sQ to kill all of your sessions, just in case?

uwo20:10:56

sure. here are the results:

; Closed all sessions (2)
; --------------------------------------------------------------------------------
; Assumed session: Scottish Fold ()
; --------------------------------------------------------------------------------
; Sessions (1):
; >1 - Scottish Fold ()
; --------------------------------------------------------------------------------
; eval (root-form): (defn testing [] #?(:cljs :this :clj :tha...
; (err) Error printing return value at clojure.lang.Util/runtimeException (Util.java:221).
; (err) Conditional read not allowed

Olical20:10:39

Oh yeah, I made no env link to a wiki page explaining the situations that it can occur 😅

Olical20:10:00

Can you use reader conditionals in the lein repl?

Olical20:10:21

(sorry about remote debugging, there's not really anything in Conjure for this, so I'm just trying to help diagnose where the issue lies)

uwo20:10:32

I appreciate you helping out!

uwo20:10:40

I am able to evaluate that form

Olical20:10:02

Fun times! So your REPL itself is configured... interestingly.

Olical20:10:42

Could be your tools.repl or Clojure version being held back by some dep :thinking_face:

uwo20:10:47

well, not quite. this does look like a repl issue because evaluating #?(:cljs :this :clj :that) returns nothing

uwo20:10:09

so there's my problem -- no conjure!

uwo20:10:16

thanks for your time!!

Olical20:10:17

Yay but also 😭

Olical20:10:48

No problem! I'm guessing it's a dependency causing it. I'd try lein repl in another project / fresh dir to see if that's okay

Olical20:10:59

If it is and it only recently broke, it's probably down to a recent dep change

uwo20:10:23

I'll let you know here when I find the culprit!

👍 3
uwo21:10:00

Okay, well this isn't minimal by any stretch, but I fixed it by removing the nrebl set up that I was listing in my lein/profiles.clj user profile:

{:nrebl {:resource-paths ["/Users/onno/opt/REBL-0.9.226/REBL-0.9.226.jar"]
         :dependencies [[rickmoynihan/nrebl.middleware "0.3.1"]
                        [org.clojure/core.async "0.4.500"]
                        [org.openjfx/javafx-fxml "11.0.1"]
                        [org.openjfx/javafx-controls "11.0.1"]
                        [org.openjfx/javafx-graphics "11.0.1"]
                        [org.openjfx/javafx-media "11.0.1"]
                        [org.openjfx/javafx-swing "11.0.1"]
                        [org.openjfx/javafx-base "11.0.1"]
                        [org.openjfx/javafx-web "11.0.1"]
                        [cljfmt "0.6.4"]]
         :repl-options {:nrepl-middleware [nrebl.middleware/wrap-nrebl]}
         :injections [(require 'nrebl.middleware)
                      (require '[cognitect.rebl :as rebl])]}
I could narrow it down further -- but I'll try that tomorrow

Olical21:10:11

Good spot! There may even be an issue on that project about this, I presume it's holding a common dependency back to a point of breakage, or it's not providing a flag to the REPL as it starts up as it should.

uwo21:10:39

yeah, my REBL setup is likely very outdated too (not to mention jury-rigged)

uwo21:10:13

Thanks again for your time; and sorry to waste it when I hadn't tried things out at my repl first. My bad!

Olical21:10:46

Not a problem! I like to triage and work out if it's something that I did and might be happening in lots of places without my knowledge quickly. Helping you out through rubber ducking is a huge bonus 🙂

metal 3
rafaeldelboni23:10:23

Hey @olical greetings from Brasil! :) Thanks a lot

😍 3
Olical10:10:19

So glad they made it!