Fork me on GitHub
#cider
<
2018-05-14
>
bozhidar06:05:40

Seems unlikely. Did you try to manually require it?

bozhidar06:05:37

@dominicm No, frankly I haven’t tried anything about this. But I was brave and upgraded to Java 10 to test the classpath stuff. Somewhat funny Java 9 is already dead. 🙂

bozhidar06:05:08

Btw, isn’t this just what you end up using by default? (just looking at the code and its history)

dominicm06:05:43

@bozhidar I don't see a require to the default namespace, where is it? Main usage is through the util namespace.

bozhidar06:05:22

@kwcharllie379 I found the problem. There’s no require in the command CIDER uses for nashorn. If you changed this to "(do (require 'cljs.repl.nashorn) (cider.piggieback/cljs-repl (cljs.repl.nashorn/repl-env)))" it should work. I’ll update the default.

Karol Wójcik06:05:04

@bozhidar seems that node repl is broken by default as well

Karol Wójcik06:05:05

When node repl started then it immiedietly dies because of socket close

bozhidar06:05:05

it’s broken on piggieback 0.3.2 for a different reason, try 0.3.3

Karol Wójcik06:05:28

Ok I will give it a try

dominicm07:05:59

@bozhidar I did, yep! Thanks.

benedek08:05:22

@bozhidarre. migrating clean-ns over to cider: if this happens i would like the feature broken up (again) into subfeatures — so to say — so clients or users can run the whole shebang in one go OR just parts of it. like sort requires/imports only or remove unused only etc

bozhidar08:05:36

I’d start with the simplest functionality and take it from there. E.g. whatever used to be slamhound doesn’t have any external deps, right? It’d be easy to move this over.

bozhidar08:05:17

I’m not sure how removed unused is implemented currently, but I assume it’s not rocket science either.

bozhidar08:05:40

I’m not very familiar with the code, so you’ll have to enlighten us as to what’s most feasible.

Karol Wójcik15:05:06

@bozhidar nashorn works well but the node repl still have some errors

Karol Wójcik15:05:25

When i try to evalute something in the repl I got

To quit, type: :cljs/quit
nil
cljs.user> '()
error:
java.io.IOException: Stream closed
	at java.base/java.io.BufferedWriter.ensureOpen(BufferedWriter.java:107)
	at java.base/java.io.BufferedWriter.write(BufferedWriter.java:224)
	at java.base/java.io.Writer.write(Writer.java:162)
	at cljs.repl.node$write.invokeStatic(node.clj:47)
	at cljs.repl.node$write.invoke(node.clj:46)
	at cljs.repl.node$node_eval.invokeStatic(node.clj:66)
	at cljs.repl.node$node_eval.invoke(node.clj:61)
	at cljs.repl.node.NodeEnv._evaluate(node.clj:235)
	at cljs.repl$evaluate_form.invokeStatic(repl.cljc:553)
	at cljs.repl$evaluate_form.invoke(repl.cljc:484)
	at cider.piggieback$eval_cljs.invokeStatic(piggieback.clj:133)
	at cider.piggieback$eval_cljs.invoke(piggieback.clj:132)
	at cider.piggieback$do_eval.invokeStatic(piggieback.clj:159)
	at cider.piggieback$do_eval.invoke(piggieback.clj:140)
	at cider.piggieback$evaluate.invokeStatic(piggieback.clj:182)
	at cider.piggieback$evaluate.invoke(piggieback.clj:180)
	at clojure.lang.Var.invoke(Var.java:381)
	at cider.piggieback$wrap_cljs_repl$fn__1403$fn__1405$fn__1406.invoke(piggieback.clj:211)
	at cider.piggieback$enqueue$fn__1383.invoke(piggieback.clj:115)
	at clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__860.invoke(interruptible_eval.clj:190)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:844)

Karol Wójcik15:05:37

I will try to investigate what is wrong

dominicm15:05:51

@kwcharllie379 what piggieback version are you using?

Karol Wójcik15:05:31

With the newst clojurescript version

dominicm15:05:37

That looks exactly like the error I had on 0.3.2

dominicm15:05:45

or .1, not sure.

Karol Wójcik15:05:56

Maybe I will try to clean my deps wait.

dominicm15:05:11

Oh wait, I'm lying I think

dominicm15:05:17

node is known broken with 0.3.2+

dominicm15:05:36

I didn't open a gh issue though

dominicm15:05:50

I just pinged bhau man

Karol Wójcik15:05:46

Did you try to solve the problem?

bozhidar15:05:11

@dominicm @bhauman fixed the problem you reported in 0.3.3

bozhidar15:05:48

I didn’t really try the fix then, perhaps he didn’t fully address the problem.

bozhidar15:05:51

Anyways, file a ticket.

bhauman16:05:17

@bozhidar @dominicm this is fixed in 0.3.3

bozhidar16:05:26

Not according to @kwcharllie379 🙂

Karol Wójcik16:05:21

I will file a ticket. But I am trying to fix it know 😄

bhauman16:05:34

I'm thinking you have stale deps

bhauman16:05:43

because this is under test coverage

Karol Wójcik16:05:28

Ok so I will try to remove whole m2 and then check whether it works correctly

bhauman16:05:06

also your target directory and hope that you aren't bringing in AOTed code somehow

Karol Wójcik16:05:18

I flushed the target and m2 then still the problem occurs

bhauman16:05:09

Then I would conclude that you are pulling in the earlier version?

Karol Wójcik16:05:20

I will try to match my project.clj to the one which exists in piggieback

bhauman16:05:09

are you using the latest version of Cider?

bhauman16:05:17

and which versions of cider/piggieback are now in your .m2/repository

Karol Wójcik16:05:01

my cider version is 0.18.0-snapshot and the version of cider/piggieback is 0.3.3

Karol Wójcik16:05:17

On which java version did you test?

bhauman16:05:00

let's make a minimal test case

bhauman16:05:22

Yeah I just did:

bhauman16:05:32

lein new figwheel nodepiggie

bhauman16:05:50

changed the cider/piggieback version to 0.3.3

bhauman16:05:22

changed the compiler options to

bhauman16:05:01

then did lein repl

bhauman16:05:01

actually that's not a minimal case

bhauman16:05:08

it was just easy to do

bhauman16:05:25

@kwcharllie379 OK I just got the error

Karol Wójcik16:05:49

I do not know how figwheel is connected to bare node 😛

bhauman16:05:12

I'm a bit confused as to what happend

bhauman16:05:25

I'm looking into it, again I apologize

Karol Wójcik16:05:20

Uff! That's good because I felt ashamed. 😄 Don't apologize I'm grateful that you're trying to help.

Karol Wójcik16:05:20

Firstly I thought that it's because of nvm but then I installed node system-wide. It's seems that repl wait's for the some input and when the input's goes through it immediately close.

bhauman16:05:52

I'm really confused tests that were passing are all failing now so I'm not sure what's going on

bhauman17:05:52

@kwcharllie379 dang it's the latest version of CLJS

bhauman17:05:16

it works for "1.9.946"

bhauman17:05:47

I'll have to use a ReplEnv wrapper again 😞

😓 4
dominicm17:05:49

But then other bugs? Or slow?

bhauman17:05:13

the problem is we need to fully initialize the repl and prevent it from calling tear-down which in now in a finally block

bhauman17:05:36

I should have seen this before

Karol Wójcik17:05:48

It's much work?

bhauman17:05:40

it's turning out to be but it needs to be done

bhauman17:05:52

almost finished

bhauman18:05:34

@kwcharllie379 if you install the cider.piggieback 0.3.4-SNAPSHOT locally it should work

Karol Wójcik23:05:05

@bhauman Will check it tomorrow. I have one question though: By locally you mean that I have to clone the piggieback repo to m2? I thought that it's already published to clojars but I do not see that version there.

bhauman23:05:59

clone piggieback locally to a temporary location, then run lein install to place it in your m2

devn23:05:53

howdy folks

devn23:05:20

long time user, but am interested in hooking into the test middleware

devn23:05:39

i want to play tones for passed or failed tests

devn23:05:46

anyone have a suggestion for where to start?

tanzoniteblack23:05:34

@devn easiest way I've found to do things like what you're asking is to use https://github.com/weavejester/eftest/ instead of the normal clojure test, you can then define your own custom report function which can call out to one of the built in reporters (like eftest.report.pretty), but also add your own code to run in addition