clojure-android / lein-droid

A Leiningen plugin for building Clojure/Android projects
Eclipse Public License 1.0
645 stars 56 forks source link

disabled removal of :private metadata in release build #34

Closed sergv closed 11 years ago

sergv commented 11 years ago

This is fix for the following scenario: I've defined two identically named private functions,

(ns namespace1
  ;; ...
  (use [namespace2]))

(defn- log [msg] 
  ;; ...
  )
;; ...
(ns namespace2
  ;; ...
  )

(defn- log [msg]
  ;;...
  )

in two different namespaces, namespace1 and namespace2. After stating (use [namespace2]) in the definition of namespace1 and building in release mode application fails as soon as it loads namespace1 with stacktrace stating that log function is already defined in namespace2.

Please note that trying to change use specification to exclude log function,

(ns namespace1
  ;; ...
  (use [namespace2] :exclude (log)))

does not seem to help. But after disabling removal of :private metadata in lein-droid's internals this scenario works correctly.

alexander-yakushev commented 11 years ago

Thank you. I can't remember why I included :private as metadata to strip, it seems unreasonable in the first place.