Fork me on GitHub
#cider
<
2018-04-18
>
bozhidar06:04:14

@bhauman @thheller In a burst of unexpected productivity (and because of a dumb mistake of mine) - piggieback 0.3 is now out and it uses the updated ns cider.piggieback for consistency with the new artefact coordinates.

bozhidar06:04:34

I’ll leave it up to you to decide if you want to be doing some ns check for 0.2 and 0.3, but I’ve decided to skip this, as for end users it’s just a matter of updating one dependency. I’ll add some big warning about this in the release notes for CIDER 0.17. Plus this will certainly drive up the adoption of the new piggieback. 😄

bozhidar06:04:10

0.3 also drops support for rhino, as discussed in the past, so now the codebase is quite simpler.

dominicm06:04:38

@bozhidar I think you just broke fireplace... Which uses rhino by default to provide functionally when you haven't done anything yet. And has the namespace hard coded. Does this release have a different co-ordinate? Does CIDER have a default environment it connects to?

bozhidar06:04:43

Yes - it’s cider/piggieback now.

bozhidar06:04:29

No, CIDER prompts the user for the environment to use. vim-fireplace should just switch to the much better nashorn I guess. It’s pretty much a drop in replacement.

dominicm06:04:35

Tpope can be quite conservative, I wonder how hard it will be to convince him to drop those java versions.

bozhidar06:04:07

Well, piggieback doesn’t support them anyways, so there’s little point in him supporting them.

dominicm06:04:03

He might just say he doesn't support cider piggyback... What are the fixes/improvements?

bozhidar06:04:15

cider-nrepl will also stop support JDK 7 after the upcoming release, and in general I plan the same for nREPL once I have time to work on the long overdue 0.3 release.

bozhidar06:04:28

Everything else is cleanup at this point.

dominicm06:04:49

I don't understand the problem/benefit of that change?

dominicm06:04:19

Oh, faster. Okay.

bozhidar06:04:26

Each eval used to spin a new repl which was quite inefficient.

bozhidar06:04:57

Anyways, if he wants to do some changes - fine, if not - I don’t have time to deal with irrational people.

dominicm06:04:22

I've got some time before I start work, I'm going to go take a stab at this.

bozhidar06:04:34

I’m committing so much of my little free time for those projects, that I can’t deal with upgrade paths and stuff like this all the time.

bozhidar06:04:36

(I thought of making CIDER work with the old and new version, but I decided I have more important things to do)

dominicm06:04:42

It took 6 months for my pprint pr to merge, so I'm not hopeful, but maybe he's looking at this a bit more now.

bozhidar06:04:16

Also I could have made Rhino just an alias for Nashorn and no one wold have noticed, but again - this seemed like a waste of time.

bozhidar06:04:43

You should join the Dark Side - as you can see the Emacs maintainers are quite responsive. 😉

dominicm06:04:05

> cider.piggieback :as pback you're all monsters.... ;)

bozhidar06:04:32

(not to mention that 10 people are admins on clojure-emacs - we’ve got some very real democracy)

dominicm06:04:05

I'm planning on taking on/replacing fireplace eventually. My replant plugin augments it currently, using it to manage sessions and connections. I've got a second person actively contributing, and others seem to be picking up interest. There is the clojure-vim group where there's a few of us, but that's not yet connected to replant.

pablore15:04:17

what about AcidVim?

dominicm16:04:13

What about it? 😛

pablore16:04:03

Maybe it would be worth working on top of that instead of fireplace. The only problem would be that Acid only works on neovim

dominicm16:04:50

Acid had some novel ideas, but I don't know that it was ever sufficiently mature.

dominicm16:04:04

It could happen though, but I don't personally actively use acid.

bozhidar07:04:11

Might be good for the vim community. Seems tpope has lost interest in the project to some extent. I guess he’s not open to sharing ownership of the project?

dominicm07:04:57

No idea. ¯\(ツ)

dominicm07:04:44

He's a pretty busy guy, lots of vim plugins, high standards. He has made some commits over the weekend since my PR, some of them tidying up my pprint code.

manuel07:04:55

hi, with latest CIDER from MELPA I get:

Exception Failed to launch Figwheel CLJS REPL: nREPL connection found but unable to load piggieback.
This is commonly caused by
 A) not providing piggieback as a dependency and/or
 B) not adding piggieback middleware into your nrepl middleware chain.
This is what I have in my project.clj, under :profiles:
{:dev
   {:dependencies [[binaryage/devtools "0.9.9"]
                   [cider/piggieback "0.3.0"]
                   [day8.re-frame/re-frame-10x "0.2.1-react16"]
                   [figwheel-sidecar "0.5.14"]
                   [org.clojure/tools.nrepl "0.2.10"]]
    :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}
    :plugins [[lein-figwheel "0.5.14"]]}}
Am I missing something?

manuel07:04:46

Oh wait, could it simply be that latest master is not on MELPA yet and I am to eager to live on the bleeding edge? 😄

bozhidar07:04:19

@manuel I’m also reasonably certain @bhauman has to cut a new release of figwheel that’s compatible with the new piggieback (basically it has to know of the new namespace).

dominicm08:04:02

@bozhidar I don't suppose this looks familiar?

javax.script.ScriptException: TypeError: Cannot load script from .cljs_nashorn_repl/goog/undefined in <eval> at line number 1
        at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
        at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
        at cljs.repl.nashorn$eval_str.invokeStatic(nashorn.clj:46)
        at cljs.repl.nashorn$eval_str.invoke(nashorn.clj:45)
        at cljs.repl.nashorn$load_ns.invokeStatic(nashorn.clj:97)
        at cljs.repl.nashorn$load_ns.invoke(nashorn.clj:96)
        at cljs.repl.nashorn.NashornEnv._load(nashorn.clj:159)
        at user.Delegatingcljs_repl_nashorn_NashornEnv._load(Unknown Source)
        at cljs.repl$load_namespace.invokeStatic(repl.cljc:223)
        at cljs.repl$load_namespace.invoke(repl.cljc:179)
        at cljs.repl$load_dependencies.invokeStatic(repl.cljc:229)
        at cljs.repl$load_dependencies.invoke(repl.cljc:225)
        at cljs.repl$evaluate_form.invokeStatic(repl.cljc:512)
        at cljs.repl$evaluate_form.invoke(repl.cljc:452)
        at cljs.repl$evaluate_form.invokeStatic(repl.cljc:459)
        at cljs.repl$evaluate_form.invoke(repl.cljc:452)
        at cider.piggieback$eval_cljs.invokeStatic(piggieback.clj:214)
        at cider.piggieback$eval_cljs.invoke(piggieback.clj:213)
        at cider.piggieback$do_eval.invokeStatic(piggieback.clj:238)
        at cider.piggieback$do_eval.invoke(piggieback.clj:221)
        at cider.piggieback$evaluate.invokeStatic(piggieback.clj:261)
        at cider.piggieback$evaluate.invoke(piggieback.clj:259)
        at clojure.lang.Var.invoke(Var.java:381)
        at cider.piggieback$wrap_cljs_repl$fn__17019$fn__17021$fn__17022.invoke(piggieback.clj:290)
        at cider.piggieback$enqueue$fn__16999.invoke(piggieback.clj:196)
        at clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__4190.invoke(interruptible_eval.clj:190)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: <eval>:1 TypeError: Cannot load script from .cljs_nashorn_repl/goog/undefined
        at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
        at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
        at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
        at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
        at jdk.nashorn.internal.runtime.Context.load(Context.java:868)
        at jdk.nashorn.internal.objects.Global.load(Global.java:1545)
        at jdk.nashorn.internal.scripts.Script$Recompilation$21$34A$\^eval\_.nashorn_load(<eval>:1)
        at jdk.nashorn.internal.scripts.Script$Recompilation$38$51AA$\^eval\_.CLOSURE_IMPORT_SCRIPT(<eval>:1)
        at jdk.nashorn.internal.scripts.Script$Recompilation$201$189AA$\^eval\_.require(<eval>:19)
        at jdk.nashorn.internal.scripts.Script$493$\^eval\_.:program(<eval>:1)
        at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
        at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
        at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)

dominicm08:04:09

that was longer than I expected...

bozhidar08:04:45

No, it doesn’t seem familiar.

bozhidar08:04:44

Perhaps you’re not using the right clojurescript or something?

dominicm08:04:08

I'm on 1.9.x

bozhidar08:04:58

Hmm, I’m puzzle this. In piggieback there’s no nashorn specific code - it just delegates to cljs

bozhidar08:04:23

And that’s the case for all cljs repls.

bozhidar08:04:29

I’ve tested it myself and it works just fine.

bozhidar08:04:48

Ran this code to start a cljs repl

(do (require 'cljs.repl.nashorn)
      (cider.piggieback/cljs-repl
       (cljs.repl.nashorn/repl-env)))

dominicm08:04:09

So that bit seems to work fine, but then when I run :Eval (+ 1 1) (which I think sends (ns edge.main) (+ 1 1)) I get 💥

bozhidar08:04:28

For me the rest works as well, so it must be something with the way vim communicates with nrepl.

bozhidar08:04:50

Although the message for clj and cljs eval should be exactly the same.

dominicm08:04:43

the message is quite suspect, about what it's trying to load... :thinking_face:

bozhidar08:04:41

I guess you can try on a simpler project? Edge is fancy! Might be something unrelated.

bozhidar08:04:09

I’ve got just one demo project with only the bare minimum deps and I usually test cider against it, (which is what I did right now)

dominicm08:04:28

@bozhidar have you got a link I can use for that?

dominicm08:04:35

Everything I have is boot or deps.edn.

dominicm08:04:51

boot doesn't support the cider.piggieback yet

bozhidar08:04:03

You can simply use piggieback as well.

bozhidar08:04:17

I haven’t committed the other one, but I guess I should do it.

bozhidar08:04:02

Does boot have to know something about piggieback? Lein certainly doesn’t.

dominicm08:04:16

boot-cljs-repl knows about piggieback, yep

dominicm08:04:53

@bozhidar the piggieback project itself wouldn't work because there's no cljs there.

bozhidar08:04:58

Are you sure about this? 🙂 Try lein with-profile 1.9 repl.

bozhidar08:04:21

We can’t really run its tests without cljs.

dominicm08:04:32

Oh, fireplace works way different to how you're thinking

dominicm08:04:54

I need to have a .cljs file open, to be in the context of cljs. There's no "REPL Buffer"

bozhidar08:04:21

Oh, got it. I just started some repl buffer and did some evaluations in it.

bozhidar08:04:34

You really need to become an Emacs user! Life without a repl is…

dominicm08:04:36

hehe. I have something "close enough".

dominicm08:04:51

fwiw, I'm getting the same issues with the mies lein template.

dominicm08:04:36

d4:code41:(ns cljs.user (:require hello-world.foo))2:id30:fireplace-bianca2-1524041215-92:ns9:cljs.user2:op4:eval7:session36:4fac591c-e5d0-4c02-8b96-9b22c834493ae this is what's blowing up

dominicm08:04:04

d4:code49:(ns cljs.user (:require hello-world.foo :reload))2:id31:fireplace-bianca2-1524041215-132:ns9:cljs.user2:op4:eval7:session36:5d429fe2-7588-4383-af14-677724f03ac0e <-- blows up too

dominicm08:04:26

@bozhidar I can reproduce without fireplace, if you open a cljs repl, and use REPL-y (basically, use lein repl).

user=> (require 'cljs.repl.nashorn)
nil
user=> (cider.piggieback/cljs-repl (cljs.repl.nashorn))
CompilerException java.lang.ClassNotFoundException: cljs.repl.nashorn, compiling:(/tmp/form-init7664251244487051022.clj:1:29)
user=> (cider.piggieback/cljs-repl (cljs.repl.nashorn/repl-env))
To quit, type: :cljs/quit
nil
cljs.user=> (ns cljs.user (:require hello-world.foo))
<massive exception from above>

dominicm08:04:53

lein update-in :dependencies conj '[refactor-nrepl "2.4.0-SNAPSHOT"]' -- update-in :repl-options:nrepl-middleware conj refactor-nrepl.middleware/wrap-refactor -- update-in :dependencies conj '[cider/piggieback "0.3.0"]' -- update-in :repl-options:nrepl-middleware conj cider.piggieback/wrap-cljs-repl -- update-in :plugins conj '[cider/cider-nrepl "0.17.0-SNAPSHOT"]' -- repl <-- my repl start command.

dominicm09:04:27

@bozhidar this might be a general nashorn bug, rhino still works with cider.piggieback.

dominicm09:04:44

oh, it doesn't beyond the (ns …) form 😂

dominicm09:04:12

it works for a single evaluation, 😔 okay

bozhidar09:04:29

Interesting.

bozhidar09:04:38

What works for a single evaluation - nashorn?

dominicm09:04:04

rhino works for a single evaluation, and subsequent ones fail: java.lang.RuntimeException: No Context associated with current Thread

bozhidar09:04:54

I deleted a lot of code to support rhino - I’d be really surprised if it worked without it. 😄

dominicm09:04:15

I had wondered if it was support for "legacy rhino", I was also just curious

bozhidar09:04:42

But does something like (+ 1 1) for you in nashorn? It sure works for me.

bozhidar09:04:34

As for rhino - it hasn’t been updated in many years in the jdk, they just decided to replace it with something else. So the only rhino is the legacy one.

dominicm09:04:59

by legacy rhino, I meant the cljs.repl.rhino aspect.

bozhidar09:04:00

AFAIK the engine itself is the reason why the cljs support for it was so fucked up.

dominicm09:04:59

(+ 1 1) works in nashorn, but not the (ns …) thing

dominicm09:04:58

cljs.user=> (ns cljs.user (:require hello-world.foo)) ;; :boom:
cljs.user=> (ns cljs.user (:require cljs.core hello-world.foo)) ;; fine

bozhidar09:04:01

Hmm, so it seems you found some clojurescript bug then. 🙂

bozhidar09:04:26

Or perhaps the two of us know nothing about cljs - I’m reasonably certain that’s true for me. 😄

dominicm09:04:22

@bozhidar I think this is still a piggieback bug, doesn't happen when using nashorn directly

dominicm09:04:28

https://github.com/swannodette/mies using mies, modify the scripts/repl.clj to require nashorn :as node, and then run ./scripts/repl, and the above thing which throws using nrepl, is fine.

bozhidar10:04:10

Interesting.

bozhidar10:04:21

Can you try with 0.2.2 before we made this change?

dominicm10:04:14

0.2.2 works

dominicm10:04:27

user=> (require 'cljs.repl.nashorn)
nil
user=> (cemerick.piggieback/cljs-repl (cljs.repl.nashorn/repl-env))
To quit, type: :cljs/quit
nil
cljs.user=> (ns cljs.user (:require hello-world.foo))
true
cljs.user=>

bozhidar10:04:21

Damn, now we have our answer then. Can you please file a ticket and ping @bhauman there. I guess he knows how to fix this, as unlike me he actually knows cljs. 🙂

bhauman12:04:14

I'm looking at this now.

bhauman12:04:10

@dominicm what version of clojurescript are you using?

dominicm12:04:02

1.9.946 was what I used in mies

dominicm12:04:05

(require
  '[cljs.repl :as repl]
  '[cljs.repl.nashorn :as node])

(repl/repl (node/repl-env))
^^ with this as scripts/repl.clj

bhauman12:04:55

that shouldn't matter right?

bhauman12:04:06

this is about nashorn loading scripts

bhauman12:04:18

oh nashorn as node

dominicm12:04:46

Sorry, I was lazily attempting to give my instructions for updating the mies template

bhauman12:04:44

so this works for me (ns hello.there (:require [goog.object :as bobj]))

dominicm12:04:36

wrong person, but yeah. I think it's potentially specific to cljs.user

bhauman12:04:03

I just did this (ns cljs.user (:require hello-world.foo)) and got the right response

bhauman12:04:13

clojure.lang.ExceptionInfo: No such namespace: hello-world.foo, could not locate hello_world/foo.cljs, hello_world/foo.cljc, or JavaScript source providing "hello-world.foo" in file <cljs repl> {:tag :cljs/analysis-error}

dominicm12:04:12

oh, I added hello-world/foo.cljs too, just an empty ns

dominicm12:04:29

(ns hello-world.foo)

bhauman12:04:39

in the repl or in a file?

dominicm12:04:45

In the file

dominicm13:04:01

uh, that's of course hello_world/foo.cljs

dominicm13:04:55

@bhauman is that reproducible now?

bhauman13:04:16

its reproduced

bhauman13:04:03

also (require 'hello-world.foo :reload)

bhauman13:04:41

I've confirmed that it is my eval commit

soulflyer14:04:04

Seeing a small oddity with cider-nrepl 0.17.0-SNAPSHOT from emacs. M-x cider-repl-set-ns no longer works for me, although it did yesterday. I get this message, even though I just started the repl by doing C-c M-j:

‘cider-repl-set-ns’ needs a ClojureScript REPL.
If you don’t know what that means, you probably need to jack-in (‘C-c M-j’).
Doing (in-ns 'whatever) works fine though, so this is not a show stopper.

bozhidar15:04:10

@soulflyer Do you see this for a Clojure or a ClojureScript REPL?

soulflyer15:04:32

clojurescript repl

bozhidar15:04:47

Did you update piggieback?

bhauman15:04:09

@bozhidar I have a fix for piggieback

bozhidar15:04:01

@bhauman Great! What turned out to be the problem?

bhauman15:04:52

default repl options needed to be calculated when operating outside of the repl

bhauman15:04:30

AFAIK requiring is the only place that its a problem and it really only needed an output-dir

bhauman15:04:56

@bozhidar when neil took the basic deps out of the project.clj, do you know the thinking there? https://github.com/clojure-emacs/piggieback/commit/7f93cdbad2776233d890a952ee088de54420c8a4

gonewest81817:04:48

I was mainly offline for a few days, inconvenient timing to say the least. Main motivation was to align the travis setup similar to orchard and cider-nrepl, and which includes configuring tests to run in a matrix of clojure versions (in this case 1.9 and a snapshot of 1.10) and jvm versions. Apologies for the disruption. I did express a doubt in the PR about pulling the deps. I should have lobbied harder to get eyes on it.

soulflyer15:04:12

@bozhidar I tried updating piggieback, but was getting problems similar to ones @manuel mentioned earlier so rolled it back out again. I'm now on 0.2.2 from com.cemerick

bozhidar15:04:55

Well, that’s the problem - cider doesn’t work with it anymore. You’re not getting errors, but it’s just not compatible.

bozhidar15:04:10

@bhauman No idea. I thought he assumed they were something to be provided and moved them to the testing profiles. @gonewest818 You around?

gonewest81816:04:35

Was traveling back from a meeting... not at all caught up on this thread.

bozhidar15:04:41

I noticed the problems with this when I tried to run the tests today and they weren’t working without a profile, so I just left him a comment on GitHub.

bhauman16:04:14

I'm a gonna revert to the hard deps for now

bhauman16:04:25

actually I'll wait no rush

bozhidar16:04:27

@soulflyer So, for this to work properly we need a version of figwheel that knows about the changed namespace, which I assume is coming soon. Inf I have some time I might make cider work with both namespaces as well.

dpsutton16:04:09

hmm. and without updating or pulling CIDER, I'm getting errors starting up figwheel

dpsutton16:04:27

Exception Failed to launch Figwheel CLJS REPL: nREPL connection found but unable to load piggieback.
This is commonly caused by
 A) not providing piggieback as a dependency and/or
 B) not adding piggieback middleware into your nrepl middleware chain.

example profile.clj code:
-----
:profiles {:dev {:dependencies [[com.cemerick/piggieback <current-version>]
                                [org.clojure/tools.nrepl  <current-version>]]
                 :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}}
-----
Please see the documentation for piggieback here 

Note: Cider will inject this config into your project.clj.
This can cause confusion when your are not using Cider.  figwheel-sidecar.repl/eval38042/fn--38043 (repl.clj:167)

bozhidar16:04:30

Because your middleware gets updated automatically.

bhauman16:04:46

@bozhidar I'm the name change was a bit intense

dpsutton16:04:53

lein figwheel raw still works

soulflyer16:04:56

@bozhidar So my best plan is to sit tight and wait a bit?

bhauman16:04:57

in terms breaking things

bhauman16:04:19

it literally breaks everyone

bhauman16:04:43

even if I update figwheel everything is going to be broken

bozhidar16:04:54

Fair enough. I’ll add some fallback in cider, so no one will have to update for a while.

bozhidar16:04:17

I overdid it in a hurry and now I’ll suffer the consequences. 🙂

bhauman16:04:18

or we could keep cemerick?

bhauman16:04:38

I'm thinking this is the best way

bhauman16:04:19

folks who rely on it directly shouldn't have to change sources

bozhidar16:04:30

It’s confusing to have different coordinates and namespace. That how I ended up doing this. Had changed one instance of cemerick to cider accidentally and was confused by the problem that caused for a while, so in anger I renamed everything to be consistent.

bhauman16:04:27

yeah probably a trade off here

bozhidar16:04:28

We have a much more painful change coming - changing the sources for nREPL itself, so that’s a good exercise in dealing with tough changes.

bhauman16:04:15

it doesn't cost that much to keep it the same

bhauman16:04:39

where as the costs of changing could be god knows what

bhauman16:04:45

for folks out there

bozhidar16:04:50

For nREPL it can’t be done. Once it goes out of clojure-contrib it will have to have a new namespace and a new coordinate.

bhauman16:04:08

talking about piggieback only here

jmckitrick16:04:20

Shouldn’t I be able to connect cider to a rhino repl in a cljs node project?

jmckitrick16:04:35

I’m documenting an old project, and I thought I could but I forget how, lol.

jmckitrick16:04:50

I have it running, but jumping around in code isn’t working.

bozhidar16:04:57

But do end users really care about this? I don’t think anyone uses piggieback directly.

bhauman16:04:01

yeah some do

bhauman16:04:17

they rely on it directly though

bhauman16:04:26

so they can use it at the lein repl

bhauman16:04:53

and this is currently in the lein figwheel template

bhauman16:04:21

which means its lingering like that in tons of projects

bozhidar16:04:44

Yeah, but that’s the library itself, not its namespaces. I thought you wanted us to change the coordinate for it. 🙂

bhauman16:04:32

the coordinate not the ns 🙂

bhauman16:04:54

yes its a tiny bit confusing

bhauman16:04:49

hmmm there is no problem having the two piggieback middlewares installed?

bhauman16:04:00

cemerick and cider

bhauman16:04:15

there shoudn't be

bozhidar16:04:33

There’ll be a problem only if you decide to activate both of them.

bhauman16:04:52

which is hard to do from a cljs.repl

bhauman16:04:05

but from a different session

bhauman16:04:33

even from a different session it shouldn't be a problem

bhauman16:04:39

different vars

bhauman16:04:42

Anyway I just cleaned a bunch of junk out of piggieback the delegating repl env is no longer needed

bozhidar16:04:17

Overall I really think that if we just add a bit of conditional code to cider-nrepl and figwheel to know both namespaces (the old and the new) very few users are going to notice anything. Things are going to work for people who don’t upgrade and they are going to work for everyone else as well.

dominicm16:04:32

I disagree with you @bhauman. Multiple coordinates with the same namespaces is a recipe for trouble. I think it's better if clients do an or and use resolve.

bhauman16:04:48

good enough

bhauman16:04:08

I'm in agreement

bhauman16:04:20

@dominicm please try the latest piggieback

bozhidar16:04:23

OK, guess we all have agreement. I’ll update the cider-nrepl code.

dominicm16:04:07

I'll try right now @bhauman

bozhidar16:04:14

Now that piggieback is getting slimmer and slimmer maybe even @thheller is going to like it. 🙂

bhauman16:04:30

good with that 🙂

bhauman16:04:19

@bozhidar if we get the go ahead from @dominicm I'd say we should cut another release, although I'd like to put the dependencies back in

bozhidar16:04:49

Go ahead and put those in. We can adjust the build afterwards.

dominicm16:04:57

@bhauman Very promising! I just did (js/print "hello")

dominicm16:04:00

so much faster

dominicm16:04:10

like, this is a zoooom.

dominicm16:04:24

(again, you notice this so much more in vim)

bhauman16:04:24

yeah its supposed to be freaking quick

dominicm16:04:05

@juhoteperi needs contacting to fix boot-cljs-repl

dominicm16:04:49

@bhauman really fast with figwheel too, this is amazing.

dpsutton16:04:51

the nice thing about jack in clojurescript is that you get two inspirational quotes. got a good mix of alan kay and madonna 🙂

dominicm16:04:44

controversy: Why does cider include inspirational quotes?

dpsutton16:04:53

so i'm running lein -U figwheel raw and i can get a clojuresript repl up. but cider-jack-in-clojurescript is still not working. Exception Failed to launch Figwheel CLJS REPL: nREPL connection found but unable to load piggieback.

dpsutton16:04:12

because that's the kind of whimsy you expect in an emacs package

richiardiandrea16:04:16

Awesome I am following like the final of the world cup 😃

🙂 12
dpsutton16:04:28

how would i diagnose what's going on. it feels like a figwheel error. but not figwheel's fault

bozhidar17:04:17

I’ve just made cider-nrepl aware of piggieback 0.2

bozhidar17:04:21

Sorry for all the problems I might have caused by my reckless actions in the morning, but it seems this inspired us all to do a lot of work pretty fast and in the end of the day backwards compatibility was preserved so it’s a win-win, as far as I’m concerned. 🙂

dominicm17:04:10

> inspired We're looking for an inspired rockstar developer who can work evenings, mornings, lunches and nights? 😄

bozhidar17:04:37

Sounds like me! 😄

bozhidar17:04:05

@dominicm The quotes are a legacy from SLIME - our spiritual predecessor.

bozhidar17:04:51

I found them to be lost of fun, that’s why I’ve added them to CIDER as well. Everyone should get a bit of fun and inspiration before they start hacking. 🙂

💯 8
jmckitrick17:04:13

And a sip of cider 😉

bozhidar17:04:13

@bhauman Should I cut a new release or you want to make more changes and cut it yourself?

nate17:04:49

hello, I am having a rather odd issue with the find-symbol op

nate17:04:20

I've gotten the same problem from a couple vim plugins that are using find-symbol

nate17:04:30

I have schema checks throughout my application

nate17:04:52

and this is the error when using find-symbol:

(not (instance? lib.broadcaster.model.Model a-lib.broadcaster.model.Model))

nate17:04:26

looks like a- is getting appended?

nate17:04:02

any ideas?

benedek17:04:37

Generally speaking find symbol can get confused on macros, but this is just a stab im the dark

dominicm17:04:38

@bozhidar the unixer in me wants an inspirational plugin, that cider calls into

gonewest81817:04:43

Check out cider-connection-message-fn. I happen to have that configured to use adafruit-wisdom.el but you could just as easily hook up dad-joke.el or hit an API like https://theysaidso.com/api/#

dominicm20:04:05

yeah, so why is this built-in to cider? 😮

bhauman17:04:01

@dpsutton are you understanding what's going on?

bhauman17:04:43

@bozhidar yeah cut a release

dpsutton17:04:44

Went to lunch while things settled. I'll have to try when I get back

dpsutton17:04:06

I didn't follow the issue because I was at work. But I'll look into it when I get back

bhauman17:04:40

its just because cemerick.piggieback was renamed to cider.piggieback and figwheel couldn't find it

soulflyer17:04:38

Let me see if I got this right: cider-nrepl will now work with cemeric/piggieback, I just have to wait for it to appear on melpa (or pull the source from git). Meanwhile there is a new version of cider/piggieback on the way. Once that is released I can switch over to that and all should be fine. Is that about right?

dpsutton17:04:29

And a piggie back was released looking for this? I guess that's what I missed

dominicm17:04:35

Interestingly, it never broke for vim

bhauman17:04:59

@dpsutton what happened was that cider-snapshot was updated

dpsutton17:04:09

Got you. Thanks

bhauman17:04:34

and figwheel doesn't understand the presence of cider.piggie yet

dpsutton17:04:44

I need to learn these other parts in cljs. I've read your stuff a while back and I'm looking forward to the codebase now that you've worked so much on cleanup

bhauman18:04:35

@dpsutton would love to have your eyes on it

soulflyer18:04:15

Ah ha. Restart everything and I'm picking up the updated cider-nrepl and its working with piggieback 0.2.2. Many thanks, appreciate the efforts @bozhidar

eggsyntax18:04:18

@soulflyer I haven't gotten a successful startup yet. What versions of the relevant libs are you pointing to, and are you using com.cemerick/piggieback or cider/piggieback? And yeah, thanks to everyone for your hard work figuring this out ❤️

soulflyer18:04:07

I'm using 0.2.2 at com.cemerick

👍 4
soulflyer18:04:15

I think emacs was hanging on to the earlier version of cider-nrepl. Killed it off and restarted it and it picked up the version of cider-repl with the fix to allow it to see either 0.2.2 from cemerick or 0.3.0 from cider

dpsutton18:04:42

I'm seeing this in the cider-nrepl jar

(def cider-piggieback?
  (try (require 'cider.piggieback) true
       (catch Throwable _ false)))

(def cemerick-piggieback?
  (try (require 'cider.piggieback) true
       (catch Throwable _ false)))

dpsutton18:04:46

both require cider-piggieback

eggsyntax18:04:50

Still no luck for me. I'll worry about something else for the moment until things settle a bit more. @soulflyer I'd love to know what versions of the other libs you're pointing at -- CIDER, cider-nrepl, figwheel... @bozhidar @bhauman etc -- dunno how many folks are likely affected by the problem, but might be worth throwing something up in #announcements once there's a clear path forward for users -- or if it's just a matter of waiting, no need to change version numbers, maybe let folks know they'll have to wait a while.

soulflyer00:04:38

@eggsyntax sorry, was sleeping. Looks like you got it all figured out anyway.

👍 4
dpsutton18:04:24

@bozhidar can you update that real quick?

dpsutton18:04:15

if anyone with merge abilities is around this should fix our stuff now: https://github.com/clojure-emacs/cider-nrepl/pull/523

dpsutton18:04:21

or at least fixes it for me at work

dpsutton18:04:41

i've got it lein installed at work and working away now

dpsutton18:04:01

thanks @gonewest818 any chance you can cut a release as well? i think that will get everyone operational again

gonewest81819:04:14

If I’m not mistaken the merge should auto-publish a snapshot. or do you mean bump the version, non-snapshot?

gonewest81819:04:41

I’m sorry to be dense … been away a while and still catching up on what’s been happening.

dpsutton19:04:18

nah just pushing the snapshot

gonewest81819:04:44

Ok, then this is the deploy job, currently pending. It runs after everything else passes (and your pull request passed so it’s just a matter of waiting).

dpsutton19:04:13

you added that recently, right?

gonewest81819:04:29

yes, the auto-deploy is relatively new.

dpsutton19:04:37

nicely done 👍

eggsyntax19:04:10

Running against git cleaned project, got same error. No distinct cider-nrepl dir in .m2 repository, but deleted cider & trying it again.

dpsutton19:04:42

delete and use - U option to force the upgrade

dpsutton19:04:52

although deleting should accomplish this for you

eggsyntax19:04:16

Delete what? & -U with what? Sorry, not sure what you mean.

dpsutton19:04:03

the -U option to lein forces checks for lein updates i think, even snapshots. but i was saying to delete ~/.m2/repository/cider

eggsyntax19:04:26

Ah, def, already deleted it. If that doesn't work I'll try the -U.

dpsutton19:04:11

in emacs go browse into the jar file in ~/.m2/repository/cider/cider-nrepl/cider/nrepl/util/cljs.clj and see if the update is there

eggsyntax19:04:11

Confirmed that it's got

(def cider-piggieback?
  (try (require 'cider.piggieback) true
       (catch Throwable _ false)))

(def cemerick-piggieback?
  (try (require 'cemerick.piggieback) true
       (catch Throwable _ false)))

eggsyntax19:04:36

(probably redundant since it's working, which is the key test 😉 )

dpsutton19:04:21

the checks used to be identical so it couldn't recognize cemerick piggieback. in process of moving from cemerick -> cider.piggieback

eggsyntax19:04:43

Yeah, I remember seeing that. Thanks for doing so much work on this!

dpsutton19:04:03

I corrected one typo. @bozhidar and @bhauman and @dominicm have done the most work on CIDER recently

metal 4
dominicm19:04:33

When running tests for the current file, does cider reload the current file?

eggsyntax19:04:14

It's fetching /cider-nrepl-0.17.0-20180418.191838-35.jar, which I think must be the current version.

dpsutton19:04:29

looks pretty fresh

dpsutton19:04:41

but go look at the code. there have been a few releases today

dpsutton19:04:47

emacs should let you navigate into the jar just fine

eggsyntax19:04:11

Bingo, I can confirm I've got a working cljs repl for the 1st time today 🙂

bozhidar19:04:14

@dpsutton Sorry about the copy/paste snafu. I was in a hurry for a dinner appointment and didn’t read through this carefully.

dpsutton19:04:31

no worries. that's why there's a bunch of us looking at it 🙂

dpsutton19:04:54

very easy to fix a typo when you did all the necessary checks

bozhidar19:04:11

If only I had written the if in the morning… 😉

bozhidar19:04:03

Anyways, I’m glad this is behind us, although I guess now I should return to cider the option to start rhino, for people on 0.2.x. Or not… 🙂 I wonder if anyone will miss it.

eggsyntax19:04:00

@bozhidar Can't speak for anyone else, but for me this issue is tiny in comparison to the enormous benefits I've gotten from CIDER. I remain extremely grateful for all your work and vision on it 🙂

bhauman19:04:55

by the way I've been wanting to make these changes to piggieback for years, everyone should notice faster evals

metal 20
bhauman19:04:39

its just really complex to evaluate against an existing repl-env, it took me 4 hours this morning to track down a tiny piece of the puzzle

dpsutton19:04:31

need to get @cfleming in on any potential changes to piggieback as well

bhauman20:04:28

@cfleming cemerick.piggieback -> cider.piggieback

bozhidar20:04:43

Great work, @bhauman! I’m very happy that things are finally moving in the piggieback world again.

bozhidar20:04:52

@eggsyntax Thanks! You’re welcome! I have this tendency to move fast and break things… I guess I’d be a good fit for facebook. 😄 😄 😄

😂 8
bozhidar20:04:45

Btw, I’ve fixed the CI and deployed piggieback 0.3.1, so I guess we can finally put this fun episode behind us and get some rest.

bozhidar20:04:16

I was supposed to be working on one slide-deck the entire deck, and at 11 pm I guess I should finally start doing this. 😄

dpsutton20:04:08

What's a slide deck? Presentation for a talk?

dpsutton20:04:18

you give so many talks!

bozhidar20:04:27

Guess so. 🙂 I have 4 talks in the next couple of months, but they are all at Ruby conferences. I hope this year I’ll manage to do a few Clojure talks as well - so many interesting updates and ideas to share, so little time…

cfleming21:04:33

@bhauman is that just a package change?

cfleming21:04:49

Or are there other differences?

bhauman21:04:13

so yeah its a coordinate/ns change, and now it works a lot better, minus rhino though

cfleming21:04:14

Ok, loss of Rhino is no problem. I’m actually not doing anything with piggieback myself at the moment, users have to configure it manually if they want to use it.

dominicm21:04:51

We need a council of tooling for changes like this 😛