technomancy / slamhound

Slamhound rips your namespace form apart and reconstructs it.
Other
473 stars 38 forks source link

Weird ns substitution #65

Closed Josh-Tilles closed 10 years ago

Josh-Tilles commented 10 years ago

Slamhound suggests that a namespace refer to itself as user. (Q.v. korma/Korma#194)

Reproducing the bug should be simple:

  1. Clone Korma.
  2. Checkout 7e3882a (because it's the parent of the commit in which slamhound was run)
  3. Run slamhound on the src directory.
  4. Verify that slamhound altered the korma.sql.engine namespace, aliasing korma.sql.engine as user (as it did in Korma)
guns commented 10 years ago

Hello,

The project.clj referenced in that commit has:

I removed the :user and :dev keys from that project.clj, then revved the clojure dep to 1.4.0. Then the current version of slamhound appears to work.

Please tell me if this helps!

Josh-Tilles commented 10 years ago

Aha! Yep, that did the trick. I absentmindedly believed that step 2 was using the latest slamhound because I had previously specified slamhound 1.5.1 in ~/.lein/profiles.clj.

Nice catch!