Fork me on GitHub
#cursive
<
2019-03-26
>
danielcompton17:03:20

The EAP6 changes seem to be working well for deps.edn

kwladyka17:03:34

hmm probably the issue is about reload ns, which depend on ns which chagned

kwladyka17:03:19

Is there any solution for it in Cursive?

kwladyka17:03:16

like if NS depend on each other A->B->C and I change C reload ns in order C,B,A

danielcompton17:03:15

@kwladyka if you require A, then B and C will be reloaded

danielcompton17:03:39

I spoke too soon, there still seem to be issues resolving symbols with deps.edn

kwladyka17:03:39

doesn’t work for me

kwladyka17:03:58

ok so it is an issue about Cursive. Am I right?

calebp18:03:03

Does anyone have tips on how to deal with “cannot be resolved” messages for the com.datomic/ion-dev dependency? I would like to be able to see params and quick doc and get rid of the warnings. I suspect this is related to these deps being loaded from an s3 repo that requires creds, but I don’t know how to go about figuring that out.

danielcompton18:03:28

If I try and add the phonebook-api example project in juxt/edge, I get this error:

Error resolving <my directories>/edge/examples/phonebook-api: Manifest type not detected when finding deps for juxt.edge/app.logging in coordinate {:local/root "../edge.app.logging"}

cfleming20:03:29

@danielcompton That’s with eap6?

dominicm20:03:07

@danielcompton I'm not experiencing that in eap6, what version is clj -Sdescribe giving you?

cfleming21:03:59

I can’t repro that with eap6 either.

danielcompton21:03:46

{:version "1.10.0.442"
 :config-files ["/usr/local/Cellar/clojure/1.10.0.442/deps.edn" "/Users/danielcompton/.clojure/deps.edn" "deps.edn" ]
 :install-dir "/usr/local/Cellar/clojure/1.10.0.442"
 :config-dir "/Users/danielcompton/.clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :resolve-aliases ""
 :classpath-aliases ""
 :jvm-aliases ""
 :main-aliases ""
 :all-aliases ""}

dominicm21:03:21

and just to check, are you using the command line, or the api interface from cursive?

danielcompton21:03:36

That Sdescribe is from the CLI

cfleming21:03:43

@danielcompton How do you have deps configured in Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps?

danielcompton21:03:46

But the error I'm getting is when I add the module with Cursive

cfleming21:03:24

And does that show the right version there?

cfleming21:03:03

How are you adding that module?

danielcompton21:03:22

Project Structure > + > Import Module

danielcompton21:03:31

Then clicking on the deps.edn file

danielcompton21:03:42

It has kind of added it

danielcompton21:03:19

but nothing is resolved in the Clojure source files

cfleming21:03:27

So you’re trying to add that to an existing project?

cfleming21:03:32

Is that something that you’d want to do? I had assumed that the edge examples were standalone projects, but I don’t know much about edge.

dominicm21:03:03

"it depends" - what's a project in the context of cursive/intellij?

dominicm21:03:18

if it's defined as a single server, then no, you wouldn't usually do that. But if it's two things under the same company that may have runtime dependencies (e.g. an api which is called by a frontend), then yes.

dominicm21:03:44

You wouldn't run them in the same JVM maybe that's a better way to think about it 🙂

cfleming21:03:36

@danielcompton re: your issue about importing multiple deps.edn files, sadly the deps integration is based on an API in IntelliJ which doesn’t support that. I’m starting to think that using that API was a mistake for several reasons (including this one), but rewriting it to work more like e.g. leiningen is a pretty big job.

cfleming21:03:20

@dominicm In IntelliJ a project is generally a whole thing you might want to work on at once. It’s composed of one or more modules, which generally correspond to e.g. a lein or deps project (i.e. a module is roughly equivalent to project.clj/`deps.edn`/`pom.xml`)

dominicm21:03:10

I guess there's some room for ambiguity there then :thinking_face:. You very well may work on the api & frontend simultaneously making them one project.

cfleming21:03:04

Yes, I’d expect that. For example, my Cursive fulfilment is done via an SPA which talks to AWS lambda. I have that in one project, which contains one front-end module and one back-end Node module which runs on lambda.

dominicm21:03:37

Does cursive start 2 repls for that case?

danielcompton21:03:43

Edge has several example apps, as well as libraries in the same repo

danielcompton21:03:49

I would expect each one to be a module

danielcompton21:03:02

In the same way you could have a project.clj for each

cfleming21:03:58

Well, REPLing is difficult there since a) it’s CLJS and b) I can’t test the whole thing since it relies on AWS. I do more test-driven development for that project (not in the strict sense, I just use tests more than REPLs). But generally with a frontend/backend split, yes, you’d expect two REPLs.

cfleming21:03:33

@danielcompton What are you actually trying to achieve with this? You have a large project and you’re trying to import the various modules of it, right?

cfleming21:03:58

What does the structure of that look like?

cfleming21:03:14

Do you have one root dir, then apps + libs under that?

danielcompton21:03:32

Yeah, the edge project is basically what we're doing

danielcompton21:03:40

So there is examples/, and then lib/

cfleming21:03:55

When importing using deps, the dependent libs will be discovered automatically, but the top-level apps generally have to be imported individually.

cfleming21:03:16

Ok, let me see if I can repro by creating a single project with a couple of the edge example apps in it.

danielcompton21:03:25

Just clone the whole repo?

danielcompton21:03:35

Open it with idea .

danielcompton22:03:10

PEBCAK, I thought I'd updated Cursive plugin, but I hadn't facepalm

cfleming22:03:12

Ok, false alarm, eap6 looks good.