reifyhealth / lein-git-down

A Leiningen plugin for resolving dependencies from Git
MIT License
82 stars 5 forks source link

FIXED - Hooke Scope Bug [163885052] #17

Closed manderson202 closed 5 years ago

manderson202 commented 5 years ago

When resolving jars, Maven/Aether concurrently runs the "get" command across all the missing dependencies. This makes sense when the wagon is simply retrieving a jar file from a remote repository, but we are building the jar from the source and part of the current Leiningen build process is to use alter-var-root as part of the robert/hooke library to alter behavior with "hooks". We are now scoping these root var changes, however the scoping is not thread local and so not thread-safe. This means that when we build the jar we also have to synchronize the function call so that only one thread is executing it at a time. This will slow down builds linearly per the number of git repositories that need to be resolved, but the trade-off is required to ensure safely building each dependency in isolation. When hooks are removed in Leiningen 3.0 we can revert the synchronization.

Closes https://github.com/reifyhealth/lein-git-down/issues/16

vemv commented 5 years ago

Thanks for the fix & release! 🙌