Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzing symbols with refer all in namespace, assume current workspace incorrectly #14

Open
irotem opened this issue Jan 6, 2021 · 0 comments

Comments

@irotem
Copy link

irotem commented Jan 6, 2021

When analyzing a file such which has a refer all (which is known to be bad practice) the analyzer
does not add the extra information to possible unresolved symbols that can match the symbol

for example in:

(ns samples.web
  (:require [compojure.core :refer :all]
            [compojure.route :as route]))
(defroutes app
           (GET "/" [] "<h1>Hello World</h1>")
           (route/not-found "<h1>Page not found</h1>"))

We receive a symbol list of

samples.web/defroutes
samples.web/GET
compojure.route/not-found

The :refer :all in clojure matches the symbol of GET with compojure.core/GET.
but in grasp it does not match anything and defaults to the current namespace

I would suggest adding all possible matches shown below and adding a metadata remark on the symbol:

compujure.core/GET
samples.web/GET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant