Fork me on GitHub
#cider
<
2018-05-15
>
tanzoniteblack00:05:05

example:

(ns my-test.reporter
  (:require [eftest.report.pretty :as pretty]))

(defn report [m]
  (case (:type m)
    :begin-test-run (println "Starting test run!")
    :begin-test-ns  (println "Testing ns: " (.getName (:ns m)))
    nil)

  (pretty/report m))
and then in your project.clj (if you're using lein):
:eftest {:report my-test.reporter/report}

devn06:05:40

@tanzoniteblack thanks. Are those the only hooks, or is there a way to hook on pass/fail? reads

devn06:05:59

If I was interested in hooking into the cider middleware or producing my own, do you have any suggestions on what to look at as prior art?

dominicm06:05:44

@devn would it work to do this from Emacs?

devn07:05:47

@dominicm sort of doubt it

devn07:05:18

I have deps I would want to bring in. Maybe I misunderstand what you’re suggesting?

dominicm07:05:56

@devn if you want Java involved then you need to do middleware, yeah

bozhidar07:05:12

> clone piggieback locally to a temporary location, then run lein install to place it in your m2 Why not just update his deps vector to use the snapshot? I’ve fixed the broken build and a snapshot should be on clojars now.

dominicm07:05:46

@devn nrepl lets you specify that you "expect" other middleware, that you must be placed before it. This lets you do things like:

:expects #{:test :test-all :test-var-query}
In your handler, you can override the transport, and inspect the returning messages for test results.

dominicm07:05:40

@devn See https://juxt.pro/blog/posts/nrepl.html particularly the "Internals of tools.nrepl message handling" and middleware descriptors.

hkjels08:05:41

I’m all of a sudden getting: java.lang.ClassNotFoundException: cider.piggieback Has there been any changes to cider that I need to accommodate?

hkjels08:05:07

hmm. I’ve been using com.cemerick/piggieback`

hkjels08:05:35

OK.. It worked perfectly with cider/piggieback

bozhidar08:05:24

Yeah, we had to rename the package once it was transferred to us. Sorry about the inconvenience! I’m glad you sorted this out so quickly!

Karol Wójcik08:05:54

@bozhidar I do not see the 0.3.4 version on clojars

Karol Wójcik09:05:25

@bhauman Works great now! Thank you very much sir 😉

👍 1
bozhidar09:05:54

I meant 0.3.4-SNAPSHOT on clojars 🙂

bozhidar09:05:08

OK, guess I’ll cut a new release then.

Karol Wójcik09:05:55

@bozhidar I did lein install @bozhidar how can I download the snapshot versions from clojars?

bozhidar09:05:14

On, damn. Seems we didn’t really setup auto-deployment from Travis CI here. Sorry about that! I’ll just cut 0.3.4 right away.

Karol Wójcik09:05:37

Ok! Thank you very much 🙂

bozhidar09:05:02

The new version is up.

👍 1
bhauman11:05:08

Thanks @bozhidar sorry for the churn on this. But since this really hasn't been done before, I'm cutting myself some slack ... 😉

bhauman11:05:46

@bozhidar I didn't know about auto-deployment of snapshots

bozhidar12:05:28

@bhauman It’s not really there. 😄 We have auto-deployment of snapshots for orchard and cider-nrepl, and I just assumed that me or @gonewest818 had done the same for piggieback, but not yet. We’ll likely do the same for nREPL. It’s good to eliminate the possibility to push some changes to clojars.

bozhidar12:05:18

And no worries about the bug - now you have a very good idea about the popularity of different repls: * figwheel problems are reported right away * nashorn problems are reported in a day or two, same for shadow * node problems in about a week 🙂

benedek12:05:34

Always bugs me that we have no way of getting feedback apart from here, github issues and anecdotal

benedek12:05:11

No "hard" data on usage, workflows, errors etc

dominicm12:05:38

don't be spying on me

benedek12:05:54

haha yeah i know

benedek12:05:08

Probably most our users would be the same mindset

benedek12:05:24

Incl myself :D

benedek12:05:56

Still we really flying blind in a way, are we not?

dominicm13:05:12

bug reporter in cider.el? 😄

dominicm13:05:47

C-x C-r C-e C-p C-o C-r C-t C-b C-u C-g?

benedek13:05:23

I remember a guy you probably know hacking on cider-spy

dominicm13:05:45

We were talking about cider-spy recently. He's still convinced it's a great idea. I don't really see much use for it in my day-to-day work, but I think he might be onto something.

benedek13:05:48

But based on your comments you dont think getting same data on how ppl use cider is a good idea either

benedek13:05:28

Suppose cider-spy could be an integrated, clj specific slack kinda

dominicm13:05:37

Quite different to be sending bookmarks & file information between co-workers, and sending usage data to us randos on the internet.

benedek13:05:49

I still think the lack of data on how cider is used is a problem

benedek13:05:22

Agree that it may not really possible to get it

dpsutton13:05:23

a good start would just be a google survey like cognitect does every year

benedek13:05:35

Yes that could be very valuable too

dominicm13:05:24

I'd love to know what people think would make a difference.

dominicm13:05:22

With replant, it's been interesting to watch my co-workers struggle with something, or try to do something (Someone was struggling with the fact they could only see the vars in open files), then I run off and try to make something that covers their usage more broadly. Hence the project-scoped apropos.

andre.stylianos13:05:40

Hello 👋 I'm running into a strange behavior on cljs after I update piggieback to either 0.3.3 or 0.3.4 Let's say I have this code:

(ns something.utils)

(def x 1)
This ns is required in my code, but if I enter that namespace using cider-repl-set-ns and try to evaluate something I get this:
something.utils> x
WARNING: Use of undeclared Var something.utils/x at line 1 <cljs repl>
1
It does evaluate correctly as it outputs 1, but I get that warning message for every var. If I do a (require 'something.utils) this doesn't happen. My other related deps: figwheel-sidecar "0.5.16" cider-nrepl I tried with all of 0.17.0, 0.17.0-SNAPSHOT and 0.18.0-SNAPSHOT. same behavior. Downgrading piggieback to 0.3.2 makes the warning go away Does anyone know what might be the cause? Tried nuking the m2 folder as well just to be sure, but no luck.

bozhidar14:05:50

@bhauman Seems like we’ve got another regression. 🙂 Hopefully this wouldn’t mean having to add more ugly code back.

gonewest81814:05:06

@bozhidar I need to get back my momentum here, been busy with family and career stuff. I’ll start by taking stock of the auto-publish and auto-doc generation across the projects to level-up whatever is lagging.

gonewest81814:05:44

Then back to truncating excessive output in the repl.

bozhidar15:05:32

@gonewest818 No worries, we all know how life is. Now I have a couple of “less busy” weeks and I’m trying to get a few things out the doors. I’d appreciate your help! > Then back to truncating excessive output in the repl. I can promise you that this is getting a dedicated release once it’s done.

bozhidar15:05:07

Btw, I wonder if we shouldn’t make this some core nREPL feature now that we control the project, but I guess we can decide on this down the road.

bhauman20:05:15

@andre.stylianos do you get the same behavior when you use (in-ns 'something.utils)?

bhauman20:05:57

we I reproduced the behavior

bhauman20:05:43

somehow the compiler-env is getting lost when the repl starts

andre.stylianos20:05:05

Glad you found it! I forgot to keep an eye on slack as I forgot about the "do not disturb" hours

bhauman21:05:09

@andre.stylianos it's fixed in 0.3.5-SNAPSHOT, you will have to install it manually as it's not deployed, keep in mind you will need to delete your compiled assets in order to see the change

andre.stylianos21:05:53

Thanks @bhauman! Will do that tomorrow morning :)