Fork me on GitHub
#cursive
<
2016-07-30
>
cfleming01:07:52

@kenny: Do you mean that it will require spec again even if it’s already required?

cfleming01:07:22

I’ll try that and see if I can reproduce it.

kenny01:07:13

What's interesting is that I get duplicated of all clojure.spec auto completes. The one that causes the re-require is the one that says something like this coll-of [pred & opts] (clojure.spec :as s). Right below that one is another row that looks like this coll-of [pred & opts] (clojure.spec). If I hit enter on the second one I will not get clojure.spec re-required.

kenny01:07:44

Also probably relevant is this is a cljs and clj project so I have both Clojure and Clojurescript as deps.

cfleming01:07:24

Ok, does this happen when editing clj or cljs, or both?

kenny01:07:05

I have only tried with clj. The cljs port of spec is too far behind to use right now.

cfleming01:07:14

Ok, thanks.

cfleming01:07:41

CLJ should never require CLJS, but it’s possible there’s a bug there - that require code is complex, and I’m planning to revise it shortly.

kenny01:07:06

I have not had that be a problem. I'm just wondering if it somehow has to do with Clojurescript's recent addition of aliasing Clojure namespaces to improve portability.

kenny01:07:55

I'll try it in a clj only project and see if I get the same issue.

kenny01:07:53

Also, the project I am having the issue in is in cljc

kenny01:07:17

Made a clj file in the same project and I am not having the issue. It would appear to only happen in cljc.

kenny01:07:21

Minimal example: 1. Make myns/core.cljc. 2. Paste this

(ns myns.core
  (:require [clojure.spec :as s]))

(s/coll)
3. Place cursor after the last l in coll. 4. ctrl + space to open auto complete You should see two coll-of completions like I described before.

cfleming03:07:14

@kenny: That’s perfect, thanks.