amperity / lein-monolith

Leiningen plugin for working with monorepos.
Other
214 stars 18 forks source link

Dependencies in profiles aren't included in dependency calculations #51

Closed drewinglis closed 4 years ago

drewinglis commented 4 years ago

If you have a project with a profile dependency on another project:

(defproject project-b "MONOLITH-SNAPSHOT"
  ,,,
  :profiles {:test {:dependencies [project-a "MONOLITH-SNAPSHOT"]}})

lein monolith each with-profile +test do clean, deps, install will allow project-b to run before project-a, which can cause the build to fail. We should include profile information with the dependency calculation.

aengelberg commented 4 years ago

Could lein-monolith optimistically consider all of each project's profiles as part of reality for the purpose of computing the topological order of projects? This would avoid needing to infer what a given each command is going to try to do, and probably add more predictability in general. (Or maybe this is precisely what you are suggesting.)