Fork me on GitHub
#leiningen
<
2018-07-23
>
troglotit11:07:37

Hey! Is there a way to use git submodules as libraries in Lein project? IIUC, Lein checkouts just adds classpath to my project, but I want to use my library as fully-fledged library with it’s own dependencies, etc.

manutter5111:07:45

How often do the submodules change? Could you just use lein install?

troglotit11:07:04

I don’t think that often. You mean I just cd my-library; lein install?

manutter5111:07:33

Yeah, something like that. Would let you use your lib as a dependency locally

troglotit11:07:20

I wasn’t sure that it’s possible, after all, when I build my project, deps of library should somehow “be imported”. But if you say so, I’ll try it. Thanks!

manutter5111:07:05

It should import your lib if you build an uberjar

kennytilton15:07:29

I am looking at the :scm option of lein projects and wondering about the nested :dir option

:scm {:name "git"
        :tag "098afd745bcd"
        :url ""
        ;; Allows you to use a repository in a different directory than the
        ;; project's root, for instance, if you had multiple projects in a
        ;; single git repository.
        :dir ".."}
I have a repo ‘matrix’ that includes both my JS and CLJS versions, where the home of the project.clj is matrix/cljs/matrix. I would try cljs/matrix as the :dir` but the example of ".." scares me. That is the parent of my project directory, in fact my home directory! Confused...

kennytilton00:07:19

Hmmm, #cljdoc is back to complaining about no SCM information. Could someone familiar with leiningen fill me in on the :dir option to the :scm block? My situation is indeed unorthodox with the CLJS project as a (nested) subdirectory of the repo directory. Thx.

martinklepsch18:07:58

⬆️ resolved 🙂