Reputation: 4537
I have a Leiningen project that is dependent on another Leiningen project. Both are on Github. I cloned the project I am dependent on to the checkouts
folder as a Git submodule, which works great in my development environment. I can use the classes from the dependency without even having to add it as a dependency in projects.clj
(despite the fact that the documentation says "If you have a project in checkouts without putting it in :dependencies then its source will be visible but its dependencies will not be found").
The main problem is that when I push the project to Heroku, the submodules are cloned automatically but there is no checkouts
directory under /app
. I guess that Heroku ignores checkouts
for some reason.
Presumably I am doing this wrong and there's a right way for me to work in parallel with two Git repos, one of which is dependent on the other. The main issue for me is that I need to be able to deploy my app easily to Heroku. What is the standard way to deal with this situation?
Update: I also noticed that my circle.yml
file, which is in the repo, is not in the /app
directory. I'm totally confused about what exactly is in the /app
directory and where the other stuff disappeared to.
Upvotes: 1
Views: 251
Reputation: 1046
The problem is that heroku runs lein with-profile production compile :all
which ignores checkout dependencies (see https://github.com/technomancy/leiningen/issues/1263).
A possible solution is to add :checkout-deps-shares [:source-paths]
to your production profile. It's discouraged (according to heroku engineers you really should use an uberjar in production) but it should do the trick.
Upvotes: 1