Fork me on GitHub

thanks very much!

Drew Verlee16:04:47

I think it would be really cool to write/blog/livecast someone translating a project.clj to a deps.edn. I mainly think this is cool because im having to do it right now and its very education, by which i mean, i have lots of things I dont yet understand 🙂


Oh, I did it by regex


:%s/\[\(\S\+\) \(".*"\)\]/\1 {:mvn\/version \2} is how I did it in vim.


Then I also ran :%s/\[\(\S\+\) \(".*"\)\ \(:exclusions \[.*\]\)]/\1 {:mvn\/version \2\r\3}

Drew Verlee16:04:52

is it that mechanical of a process? Its possible this hinges on my understanding of what deps.edn does vs what lein project.cljs do


@drewverlee deps.edn only specifies dependencies. So that's the only part that really converts over from project.clj.

Drew Verlee16:04:21

I guess your right, the only thing i have to transfer is the deps

Drew Verlee16:04:42

@dominicm out of curiosity, for those trying to use deps.edn, what are they using for 1) profiles 2) build stuff 3) deployment I’m guessing boot can still handle these responsibilities


There are tools, like pack.alpha which add uberjars on top.

dominicm16:04:07 has an example of doing most of this.


Edge doesn't have a pack example yet, bridge does:


(although it's out of date, see the pack readme!)

Alex Miller (Clojure team)16:04:05

aliases can serve some of the same purposes as profiles. pack.alpha and depstar are two build options.

Alex Miller (Clojure team)16:04:35

if you have consumers use git deps, you can skip build and deploy altogether :) (I am somewhat joking - this is not feasible for a number of cases)


@alexmiller I've been thinking about krei, there's an API for performing java complication in the jdk, so in theory if I search for an edn file describing how to build from source, it could be feasible.


Having git dependencies is a lot like working on a mono repo, which is the pain point krei was designed to solve.


I think it could work, in theory. Haven't tried that hard yet though.


@alexmiller Krei is a in-repl build tool. It scans the classpath for krei-file.edn files, and then builds sources on the classpath from that. Currently it supports cljs and sass, because that's what I need for the itch I'm scratching. But I think it could work for java too. Protobuf is probably important to target also.


Maybe I should split into manifests and try to parse information from pom files? Dunno.

Alex Miller (Clojure team)17:04:34

well I can tell you that parsing info from pom files suuuuucks


Only using edn it is!


@drewverlee Take a look at this commit where I converted core.cache from using Leiningen to clj/`deps.edn`:


And here's a slightly more comprehensive example from java.jdbc being switched over


So :profiles => various :aliases, "build" can either use tooling built on top of deps.edn (for example, I use boot-tools-deps with Boot on top of deps.edn and there's a Leiningen plugin, which is very much a work-in-progress), or it can use the JAR builders that are listed on that wiki page...