arrdem / katamari

Roll up all your software into artifacts!
67 stars 4 forks source link

Apply dep rewriting in rule prep #19

Closed arrdem closed 5 years ago

arrdem commented 5 years ago

At present (v0.0.5) Katamari has two magical files kat-deps-defaults.edn and kat-deps-resolve.edn which are respectively global default deps and resolve clj "aliases".

This leads to #16 - parsing and using these files is a side-channel which doesn't correctly interact with Katamari's change detection system because most of the version pinning happens outside of that machinery.

Solution

Rework clojure-library and java-library to rewrite their :deps map during the roll.prep phase by applying the globally pinned coordinates. This allows the coordinates to behave as intended, while exposing to Katamari's rule-id machinery the deliberately pinned coordinates in a build. This will expand the rule structures for the purposes of list-tasks and show-request more than somewhat, but that cost is considered acceptable relative to having incorrect behavior in the face of version bumps.

arrdem commented 5 years ago

This should also let me back d540db4572a8121af042dfa52719b06e05744f31 out by just doing it with a prep transform rather than having to patch deps.