Content-Defined Dependency Shading

unsorted — cgrand, 9 March 2018 @ 14 h 16 min

Shading is the practice of renaming a dependency and embed it in a project to be sure it won’t conflict with another version of itself (it’s a good time to go watch or rewatch Rich Hickey’s Spec-ulation).

For Unrepl we rely on shading extensively as we don’t want the code injected by the client to interfere with running code or even tools running a different strain of Unrepl.

That’s how we ended with the idea of content-defined shading: choose a granularity of shading (e.g. namespace or all eps, or whole project), compute a hash (in our case SHA1, thus we are SHA-ding!) on it and use the hash in the renaming process.

Doing so we end with stable names that don’t depend on date, version or commit.


  1. You have brought up a very superb details , thanks for the post.

    Comment by suba suba — 11 June 2020 @ 13 h 08 min
  2. visit my site

  3. سلام و احترام از سایت خوبتون ، میتونین کالاهای دیجیتال رو با قیمت مناسب و کیفیت بالا از سایت ما خریداری کنید

    Comment by علی میرمسیب — 9 March 2024 @ 23 h 52 min

    Comment by علی میرمسیب — 9 March 2024 @ 23 h 54 min

RSS feed for comments on this post. TrackBack URI

Leave a comment

(c) 2024 Clojure and me | powered by WordPress with Barecity