Fork me on GitHub
#cursive
<
2021-01-26
>
Rachel Westmacott09:01:04

is it known that :deps and :extra-deps in deps.edn files get autocomplete/intelligent suggestions on version numbers, but :replace-deps doesn't?

Rachel Westmacott14:01:52

annoyingly olical/depot doesn't understand :replace-deps either, but I've fudged around both:

:aliases   {:outdated {:replace-deps {}
                        :extra-deps {olical/depot {:mvn/version "2.1.0"}}
                        :main-opts  ["-m" "depot.outdated.main" "--every" "--write"]}}

Rachel Westmacott14:01:53

now I get to avoid all the project dependencies just to run a tool, and I get auto-suggestions in Cursive, and I get auto-updated dependencies in CI 😄

cfleming20:01:50

I wasn’t aware of that, no, but it does indeed seem to be the case! Can you file an issue for that, and I’ll get it fixed?

Oliver George22:01:43

Quick sanity check. Should Cursive play nicely with IntelliJ 2020.3

Oliver George22:01:59

Here's a screenshot in case you say "ah, try x"

Oliver George22:01:25

ns alias stuff working. intenting borked....

Oliver George22:01:33

higlighting all over the show.

Oliver George22:01:23

Thanks. Worked it out. I'm a goose.

Oliver George22:01:38

In case you see this again. My deps.edn didn't include clojurescript directly. I have to specify an alias to pick it up. I guess that without the alias CLJS namespaces didn't have cljs.core namespace available.

Oliver George22:01:48

Here's our deps.edn for reference

{:paths   ["src" "test"]
 :deps    {reagent                                               {:mvn/version "0.10.0" :exclusions [cljsjs/react cljsjs/react-dom]}
           re-frame                                              {:mvn/version "1.1.0"}
           day8.re-frame/async-flow-fx                           {:mvn/version "0.1.0"}
           datascript                                            {:mvn/version "1.0.1"}
           datascript-transit                                    {:mvn/version "0.3.0"}
           com.cognitect/transit-cljs                            {:mvn/version "0.8.256"}
           condense/cljsrn-react-native-community-datetimepicker {:sha "e19943aaccbde0a2285d654f43846bb960dc7090" :git/url ""}
           condense/cljsrn-react-native-community-geolocation    {:sha "6f89fc4f39cf720ef1216783d9b0bb063710d3aa" :git/url ""}
           condense/cljsrn-react-native-community-netinfo        {:sha "9cb857ad9fb94bd79e1c28259b745c85f18acb00" :git/url ""}
           condense/cljsrn-react-native-elements                 {:sha "3fc1767c10da63a185cf58656c7fb6a39f0ddf50" :git/url ""}
           condense/cljsrn-react-native-image-picker             {:sha "f5069504fd5d3b8ba37a01725f7d12c349cf204d" :git/url ""}
           condense/cljsrn-react-native-sqlite-storage           {:sha "2cc6ba2ba16d7dfd4851618528bb3928babd429a" :git/url ""}
           org.xerial/sqlite-jdbc                                {:mvn/version "3.28.0"}
           org.clojure/java.jdbc                                 {:mvn/version "0.7.10"}
           com.cognitect/transit-clj                             {:mvn/version "1.0.324"}
           clj-statecharts                                       {:sha "84708b306c678a37ab5866532950691a7551732e" :git/url ""}}
 :aliases {:krell        {:extra-deps {io.vouch/krell         {:sha "577980ba68eb78bd0e49b93a514af27713c17d44" :git/url ""}
                                       binaryage/devtools     {:mvn/version "1.0.2"}
                                       org.slf4j/slf4j-simple {:mvn/version "1.7.30"}}
                          :main-opts  ["-m" "krell.main" "-co" "krell.edn" "-c" "-r"]}
           :release      {:extra-deps {io.vouch/krell         {:sha "577980ba68eb78bd0e49b93a514af27713c17d44" :git/url ""}
                                       org.slf4j/slf4j-simple {:mvn/version "1.7.30"}}
                          :main-opts  ["-m" "krell.main" "-co" "release.edn" "-O" "simple" "-c"]}
           :figwheel     {:extra-paths ["target"]
                          :extra-deps  {org.clojure/clojurescript {:mvn/version "1.10.773"}
                                        com.bhauman/figwheel-main {:mvn/version "0.2.11"}
                                        binaryage/devtools        {:mvn/version "1.0.2"}}
                          :main-opts   ["-m" "figwheel.main" "-b" "figwheel" "-r"]}
           :node-repl    {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.773"}}
                          :main-opts  ["-m" "cljs.main" "--repl-env" "node"]}
           :browser-repl {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.773"}}
                          :main-opts  ["-m" "cljs.main" "-r"]}
           :masterdata   {:main-opts ["-m" "app.masterdata"]}}}

Oliver George23:01:44

Krell is used for builds. It was (is?) specifying a specific sha for clojurescript and resolution between mvn/versions and :git/url shas was a problem. This was our work around.

Oliver George23:01:34

Only thing I think Cursive might have done to help is warn that there was no clojure core namespaces available in the deps path.

cfleming23:01:25

That might be a good idea, the problem is also guiding people to how to fix it.

cfleming23:01:36

So did this work in previous IntelliJ versions, and the alias you were syncing got lost in the upgrade somehow?

Oliver George23:01:11

Perhaps just a new entry in that link would be enough to get people thinking. Seems like it's rare so won't be offended if you don't.

Oliver George23:01:24

Not sure how I got myself out of sync. Most likely I deleted and re imported the project for some reason. Perhaps clearing out the repo killed th impl files or cloning fresh. I don't recall - lots going on.

Oliver George23:01:48

It'd be a manual step to add an alias - easy to forget.

cfleming01:01:18

Actually, re-reading that doc there is this bit: > Also, you might have to configure your aliases (for deps) or your profiles (for Leiningen).

cfleming01:01:25

But it could probably be more visible.

👍 3