-
-
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
Create a spec browser, similar to the namespace browser #1918
Comments
I've started work on this. Is adding a separate middleware for spec alright ? I guess we'll be adding a lot more feature focusing on spec. |
Sure. |
@cskksc can you tell me how you're checking for the existence of spec? I've had conversations with some clojure core people, and nothing about spec is official. From what I've gathered, spec will be packaged with >1.9 and won't need to be a listed dependency in the project.clj file, nor will it have a version (ie, cider-nrepl on 1.4 and the person's project on 1.8 or whatever). However, we can't require this in the file if the clojure version is <1.9. Alex Miller mentioned there was no plan to separate out into its own dependency (think core.match) nor will it be backported. I was just wondering what your middleware layer will look like and how it will degrade nicely in the presence of clojures 1.7 or 1.8. This should definitely be standardized and will be a conditional wart on CIDER while we support versions prior to spec. |
@dpsutton We already have something similar in the middleware at spec.clj, and it's used in info.clj, to display the associated spec with docstrings. Although, when I started working on this particular feature, instead of re-defining the
|
Fixed by #2025. |
Often I find myself wondering either:
I'd like something like
cider-browse-ns
which gives me a list of all available specs in the app. We can get this by querying the registry of known specs.When you click on a spec the definition of the spec should be displayed (this is available with
(s/form (s/get-spec :qualified/spec))
)Bonus points if the buffer can be sorted in two different ways:
my-longish-prefix/some-spec
)some-spec
)The latter sort is useful because it would group:
user/id
line-item/id
Together when you search for
id
.Additional bonus points if you can query nested specs, i.e. after hitting RET on a spec, in the browser, to show its definition, it would be nice to be able to click on constituent spec definitions in the popup buffer to see their definitions.
The text was updated successfully, but these errors were encountered: