-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
:refer :all #163
Comments
The (ns koans.01-equalities
(:require [koan-engine.core]))
(koan-engine.core/meditations ;; <- this would need to be fully qualified
"We shall contemplate truth by testing reality, via equality"
(= koan-engine.core/__ true) So we use the (ns koans.01-equalities
(:require [koan-engine.core :refer [meditations __]])) ;; <- refers only to the symbols being used You could also use an alias in order to prevent the need to type the fully qualified namespace: (ns koans.01-equalities
(:require [koan-engine.core :as k])) ;; <- refers to nothing, but alias the external namespare as "k"
(k/meditations ;; <- now you can use the alias instead of the full name
"We shall contemplate truth by testing reality, via equality"
(= k/__ true) That's what I'd simply silence this warning by adding |
Thanks @samflores for the clear description! Agreed on all counts! Definitely would recommend doing it the way the linter is guiding you for "real" projects. My only hesitation in moving to |
Does this not work (without the |
|
I'm just getting started with Clojure, so this is more a question than a recommendation.
In the
:require
portion of each of the files it has a:refer :all
, like this:I'm using Calva, and it surfaced this warning:
use alias or :refer clj-kondo(refer-all)
Should the code referenced above be changed to the following?
What is the significance of including or omitting the
:all
?The text was updated successfully, but these errors were encountered: