mranderson icon indicating copy to clipboard operation
mranderson copied to clipboard

Not replacing imports in top-level namespaces

Open jarohen opened this issue 3 years ago • 3 comments

Hey again :smile:

clj-tuple (a transient dependency of clj-http, in my case) has a top-level clj-tuple namespace, which isn't getting included in :import replacements. I reckon it's because clj-files->dirs has a (remove str/blank?), but removing this leads to target/srcdeps being included in clj-dirs, and I wasn't satisfied that I understood all the impacts of this before naively removing it :)

James

jarohen avatar Jun 23 '21 15:06 jarohen

all this reminds me #44 and #45 wlc to an other fold of dependency hell ;)

looking into these altho the jarjar update seems to be the most interesting?! trickiest?! so looking at that first

benedekfazekas avatar Jun 23 '21 15:06 benedekfazekas

So when i try inline clj-http "3.12.2" and grep for tuple in target/srcdeps i find only one occurrence where clj-tuple reference is correctly inlined in a require. any more pointers how to repro?

benedekfazekas avatar Jul 14 '21 09:07 benedekfazekas

Ah, sorry, took me a while to repro given my above description too :sweat_smile:

  • ^:inline-dep [clj-tuple "0.2.0"]
  • lein inline-deps (using a mranderson version without the explicit clojure.lang exclusion in #52, which confuses matters here!)
  • (:import [clojure.lang PersistentUnrolledVector]) in the transformed clj_tuple.clj.

There are clojure.lang classfiles in class-deps.jar here, so I'd expect these classes to be prefixed?

jarohen avatar Jul 14 '21 17:07 jarohen