Fork me on GitHub
#cursive
<
2017-12-12
>
cfleming00:12:48

@p-himik Yes, I’m planning to add that.

cfleming01:12:16

@chrisdevo BTW I’m assuming those are the wrong way around? Currently that only works with nREPL.

echristopherson01:12:58

I didn't know there were AMAs outside of reddit

echristopherson01:12:12

ARGH, what is wrong with web developers that more and more sites override really useful and commonly-used things like ctrl+f?

echristopherson01:12:20

sorry, venting in the wrong place

p-himik08:12:42

It's not a big deal, at least for me, but Cursive doesn't work on JDK9: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter. Apparently, JAXB API has been removed from Java SE 9.

cfleming08:12:39

@p-himik That’s only when running IntelliJ itself with JDK9, right?

p-himik09:12:14

Well, I didn't try to run anything on JDK9, so I can't say for sure. When I encountered that error, I just switched back to JDK8 completely.

Alex Miller (Clojure team)14:12:34

I used JDK 9 from within Cursive yesterday with no problem

grzm17:12:39

Is there a shortcut for "require namespace" other than using Find Action? Or just a command available so I can bind my own shortcut? I didn't see anything in Preferences under keymap.

martinklepsch20:12:40

@cfleming hey 🙂 Looking into exposing dynamic boot dependencies in a static way. What do you need for proper integration? a java classpath string, dependencies vector or are both equally good?

martinklepsch20:12:14

I guess I can make a pom.xml from a dependencies vector?

Alex Miller (Clojure team)21:12:27

btw, clj has an -Spom option that will generate a pom.xml

Alex Miller (Clojure team)21:12:12

useful to go from deps.edn -> pom.xml -> working Cursive project

martinklepsch21:12:04

@alexmiller is that available in the tools.deps API somewhere?

Alex Miller (Clojure team)21:12:59

clojure.tools.deps.alpha.gen.pom/sync-pom

Alex Miller (Clojure team)21:12:20

or if you want the tool edge wrapper, that’s in clojure.tools.deps.alpha.genmf

cfleming21:12:33

@alexmiller Right, but @p-himik is talking about using it to run IntelliJ, not projects within IntelliJ.

cfleming21:12:43

I’m actually surprised IntelliJ itself works.

cfleming21:12:56

@p-himik Do you have any particular reason for wanting to do that?

cfleming21:12:32

@martinklepsch Ideally I’d like a dependencies tree. I can build the tree myself if you give me a map of {project dep -> [its dependencies]} or something like that.

cfleming21:12:54

But for dependencies I need both the coord and the artifact jar(s)

cfleming21:12:01

I’m very curious how you’re planning to do this, since any task can add deps at any time, right?

martinklepsch21:12:25

right but tasks shouldn’t really do this except inside pods

martinklepsch21:12:41

IMHO a task that adds dependencies to your global env is broken 😛

cfleming21:12:44

I actually chatted to Micha a while ago about this.

cfleming21:12:04

In my experience, users still get upset even if they’re doing broken things 🙂

cfleming21:12:38

Although in general I don’t have a problem saying that “if you do really crazy things you’re on your own”

cfleming21:12:50

Adding deps in tasks does seem potentially useful though.

Alex Miller (Clojure team)21:12:52

programmable builds are a great idea. programmable (ie not data) deps is not. imho.

cfleming21:12:27

I definitely agree with that.

cfleming21:12:02

Gradle actually has a really nice model, which is basically that - partly declarative but the build is imperative.

cfleming21:12:16

You can tell they thought a lot about tooling it when they designed it.

p-himik21:12:35

@cfleming No reason at all. Just saw that IDEA has a support for it, decided to try.

cfleming21:12:09

Ok - do they officially support running IntelliJ under JDK9? I hadn’t seen anything about that.

cfleming21:12:34

I know they’re going to move their JDK build to JDK9 at some point, but I can imagine that might take a while.

p-himik21:12:08

Maybe I misunderstood, and they just support Java 9 as a language.

martinklepsch21:12:14

This is a separate problem - prefetching dependencies in CI - but I think a solution for Cursive could follow a similar approach: https://clojureverse.org/t/statically-expose-pod-dependencies-idea-proof-of-concept/1179

p-himik21:12:19

Regarding programmable builds - interesting how in Python world people more and more often talk about moving from programmable to static builds, because programmable builds cause way too much problems.

martinklepsch21:12:22

It’d be an interesting experiment to replace Boot’s dynamic env with tools.deps static one.

cfleming21:12:44

@martinklepsch That looks nice. The problem is that I can’t only support boot projects that are structured in a certain way.

martinklepsch21:12:23

yeah, I mean this post is really about a different issue, in your project you probably don’t really care to much about dependencies in pods that you don’t really have access to anyways

cfleming21:12:18

Well, I do, since presumably the project has code which needs those deps.

cfleming21:12:15

All this for Cursive is so that I know which libraries the project needs - presumably if a pod needs them, some code in the project does too, unless it’s a jar for a tool of some kind (web service code generation or something)

martinklepsch21:12:25

maybe we’re misunderstanding each other but what tasks do in pods is opaque to the user, they don’t have access to whatever is happening inside a pod

martinklepsch21:12:20

pods are intended for dependencies your project does not depend on besides some minor tooling concern, whose API is exposed through the boot task

cfleming21:12:37

Right, but assuming the code in the pod is user code from the project (which it may not be if it’s e.g. a tool of some kind) then it’ll need those deps.

cfleming21:12:12

Can you give me an example of the sort of thing a pod is designed for?

martinklepsch21:12:27

We create a pod with some dependencies we need to do the job of the task but otherwise don’t need for the project itself

cfleming21:12:04

Yeah, in that case Cursive wouldn’t care.

martinklepsch21:12:40

If a project contains code using pods (not too common but def. possible) that would be problematic I guess

martinklepsch21:12:50

but this is definitely more of an edge case

martinklepsch21:12:51

@cfleming I presume if everyone using Boot were to use deps.edn this whole issue would be solved as well right?

cfleming21:12:02

I probably can say “you’ll get better support if you do this” though.

cfleming21:12:51

BTW anyone using IdeaVim with Cursive probably should take a look at https://twitter.com/ideavim/status/940640661774233600