File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 97
97
:all
98
98
(sort dependency-comparator referred)))
99
99
100
+ (defn- type-preserving [f x]
101
+ (when x
102
+ (when-let [r (f x)]
103
+ (cond
104
+ (string? x) (str r)
105
+ (symbol? x) (symbol r)))))
106
+
100
107
(defn- ns-prefix
101
108
" Extracts the prefix from a libspec."
102
109
[{:keys [ns ]}]
103
- (if (prefix ns )
104
- (symbol (prefix ns ))
105
- :none ))
110
+ (or (type-preserving prefix ns )
111
+ :none ))
106
112
107
113
(defn- ns-suffix
108
114
[{:keys [ns ]}]
109
- (-> ns suffix symbol ))
115
+ (type-preserving suffix ns ))
110
116
111
117
(defn- by-prefix
112
118
[libspecs]
139
145
[libspecs]
140
146
(vec
141
147
(for [libspec libspecs]
142
- (create-libspec (update-in libspec [ :ns ] #( -> % suffix symbol ))))))
148
+ (create-libspec (assoc libspec :ns ( ns- suffix libspec ))))))
143
149
144
150
(defn- create-libspec-vectors-with-prefix
145
151
[libspecs]
You can’t perform that action at this time.
0 commit comments