-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
passing regex directly to cider-browse-spec-all #2163
Comments
@jpmonettas Can you take a look at this? I think we should definitely add some way to filter out non-project specs. Potentially we can have an inverse filter as well. |
…er-browse-spec-all to use it.
…er-browse-spec-all to use it.
Thanks for the fast response here!
I don't quite get this - aren't specs usually attached to namespaced keywords? Can't we used this? |
(ns geometry-project.core
(:require [clojure.spec.alpha :as s]))
(s/def :shapes/triangle (s/cat :base int? :height int?)) now if we are looking at the registry we will see a :shapes/triangle spec (meta (s/get-spec :shapes/triangle)) ;; => nil but what project it belongs to? |
I see your point. I was under the impression people often did it like this: (ns geometry-project.core
(:require [clojure.spec.alpha :as s]))
(s/def ::triangle (s/cat :base int? :height int?)) |
Yeah I think most people does like that, but have also done the other way so don't know if that feature is a good idea. |
problem
we should have something like cider-browse-spec-all which takes a regex as an argument (instead of querying the user for it)
this is so it is easy for users to say "show me all specs in src/" instead of showing all specs in clojure.core + included libraries
discussion
me:: the problem I was running into with spec ... was that it was showing me all types of specs from clojure core + external libraries
@bbatsov: Yeah, that totally makes sense. We should add some filtering for the specs that come outside the project. Please, file a ticket for this. Should be easy to do IMO.
current solution
(assuming that all src/ namespaces start with "aa.")
The text was updated successfully, but these errors were encountered: