Skip to content

Commit

Permalink
0.2.0 release
Browse files Browse the repository at this point in the history
- fixes no ns declaration results in nullptr
- mranderson uses mranderson
- version changed to 0.2.0
  • Loading branch information
benedekfazekas committed Sep 23, 2014
1 parent a9317ec commit c0a07af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
9 changes: 5 additions & 4 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
(defproject thomasa/mranderson "0.2.0-SNAPSHOT"
(defproject thomasa/mranderson "0.2.0"
:description "Leiningen plugin to download and use some dependencies as source."
:url "https://github.com/benedekfazekas/mranderson"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:eval-in-leiningen true
:dependencies [[com.cemerick/pomegranate "0.3.0"]
[org.clojure/tools.namespace "0.2.5"]
[me.raynes/fs "1.4.4"]])
:plugins [[thomasa/mranderson "0.2.0"]]
:dependencies [^:source-dep [com.cemerick/pomegranate "0.3.0"]
^:source-dep [org.clojure/tools.namespace "0.2.5"]
^:source-dep [me.raynes/fs "1.4.4"]])
18 changes: 9 additions & 9 deletions src/leiningen/source_deps.clj
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@
(info (format "retrieving %s artifact. modified dependency name: %s modified version string: %s" art-name art-name-cleaned art-version))
(info " modified namespace prefix: " repl-prefix)
(doseq [clj-file clj-files]
(let [old-ns (->> clj-file (fs/file srcdeps) read-file-ns-decl second)
new-ns (replacement repl-prefix old-ns nil)
new-deftype (replacement repl-prefix old-ns true)]
;; fixing generated classes/deftypes
(when (.contains (name old-ns) "-")
(doseq [file (clojure-source-files [srcdeps])]
(update-deftypes file old-ns new-deftype)))
;; move actual ns-s
(move-ns old-ns new-ns srcdeps [srcdeps])))
(when-let [old-ns (->> clj-file (fs/file srcdeps) read-file-ns-decl second)]
(let [new-ns (replacement repl-prefix old-ns nil)
new-deftype (replacement repl-prefix old-ns true)]
;; fixing generated classes/deftypes
(when (.contains (name old-ns) "-")
(doseq [file (clojure-source-files [srcdeps])]
(update-deftypes file old-ns new-deftype)))
;; move actual ns-s
(move-ns old-ns new-ns srcdeps [srcdeps]))))
;; fixing prefixes
(doseq [file (clojure-source-files [srcdeps])]
(doall (map (partial update-file file prefixes) (keys prefixes))))
Expand Down

0 comments on commit c0a07af

Please sign in to comment.