Skip to content

Commit

Permalink
Fix ns-on-cp?
Browse files Browse the repository at this point in the history
  • Loading branch information
vemv committed Jul 24, 2023
1 parent b4512c6 commit 7cc8365
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* This helps clients avoiding the suggestion/insertion of candidates which are redundant
* e.g. `+` is already interned, so is `Thread`
* same for `:refer`s and `:rename`s
* Fix a bug the newly introduced .cljc detection.

## 3.8.0

Expand Down
5 changes: 3 additions & 2 deletions src/refactor_nrepl/analyzer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
(:refer-clojure :exclude [macroexpand-1])
(:require
[clojure.java.io :as io]
[clojure.string :as string]
[clojure.tools.analyzer :as ana]
[clojure.tools.analyzer.ast :refer [nodes]]
[clojure.tools.analyzer.jvm :as aj]
[clojure.tools.analyzer.jvm.utils :as ajutils]
[clojure.tools.namespace.parse :refer [read-ns-decl]]
[clojure.tools.reader :as reader]
[clojure.walk :as walk]
Expand Down Expand Up @@ -57,7 +57,8 @@
ast)

(defn- ns-on-cp? [ns]
(io/resource (ajutils/ns->relpath ns)))
(boolean (or (io/resource (-> ns str (string/replace \. \/) (string/replace \- \_) (str ".clj")))
(io/resource (-> ns str (string/replace \. \/) (string/replace \- \_) (str ".cljc"))))))

(defn- shadow-unresolvable-symbol-handler [symbol-ns symbol-name symbol-ast]
{:op :const
Expand Down

0 comments on commit 7cc8365

Please sign in to comment.