juxt / pack.alpha

Package clojure projects
MIT License
259 stars 35 forks source link

Update tools.deps to support new features and keywords, e.g. :git/sha #94

Closed RickMoynihan closed 2 years ago

RickMoynihan commented 2 years ago

I have a project which still uses pack.alpha to create build artifacts; unfortunately the project has now acquired a dependency that uses the new :git/sha key, and not the old :sha key.

This causes pack.alpha to choke, expecting a :sha key to be defined.

I have forked the repo and hacked together this fix for SKINNY jars only. I suspect similar changes would need to occur to support the other types of build. This PR is not complete, but the patches work well enough for me to buy me some time before migrating to tools.build / uber. I offer them in this draft PR as they may be instructive to others.

This PR updates the skinny jar functionality ONLY to use the latest tools.deps.alpha, and it updates the code to use the corresponding API changes.

Specifically the definitions for clojure.tools.deps.alpha.reader/merge-deps install-deps and slurp-deps have now moved; so we now use their new names.

Additionally the namespace which was being pulled into load extensions has now been moved/removed, so I've inlined all the current extensions explicitly.

SevereOverfl0w commented 2 years ago

Thanks for your work on this @RickMoynihan! I made a few tweaks and have merged it to master. I've tested out the other jar types, and they worked perfectly with your changes!