-
Notifications
You must be signed in to change notification settings - Fork 176
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
Add CIDER log middleware #774
Conversation
@vemv @bbatsov Do we want to inline the logjam dependency or not? I gave it a try, but it looks like running the tests with the rewritten logjam library fail, because they reference the logjam library and not the re-written one. I also tried adding the non-rewritten logjam library to the test profile, but that also fails. If we want to inline I can take a look at somehow getting mr anderson to work with it, or get rid of the references in the tests (I'm using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - impresive work!
Some superficial suggestions.
@@ -1,5 +1,6 @@ | |||
{:hooks {:analyze-call {cider.nrepl.middleware.out/with-out-binding | |||
hooks.core/with-out-binding}} | |||
:lint-as {cider.nrepl.middleware.log-test/with-each-framework clojure.core/let} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(non-blocking)
you'd have to use this pattern in logjam https://github.com/metosin/malli/blob/master/resources/clj-kondo/clj-kondo.exports/metosin/malli/config.edn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean to export this symbol, so it is picked up by clojure lsp in other projects?
I think we don't need this here. It's a macro defined and used only in the cider-nrepl tests. It it not used by other libraries. But maybe you mean something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean to export this symbol, so it is picked up by clojure lsp in other projects?
Sure, if logjam includes that file, any consumers (including cider-nrepl) will pick it up. It's DRYer.
I'm fine with not inlining the dep - I don't expect any runtime conflicts with it. Btw, how are the tests passing on Clojure 1.8? I thought logjam required 1.9. |
Yeah especially given that it brings no transitive deps in. Maybe just add:
|
I was also wondering when I initially opened the PR. Now that we have logjam in a separate repo, and we don't ship the specs nor reference them, it's not a hard requirement for depending on it. It's only needed for tests. |
@vemv Thanks for the review. I hope I addressed your comments. |
Ah, even better! This means that the new functionality can land in the next CIDER release! |
You sure did - kudos! |
This PR adds the CIDER log middleware, now with logjam extracted into its own repository.
The initial PR was this one:
#773
And this for the CIDER side:
clojure-emacs/cider#3352
Before submitting a PR make sure the following things have been done:
Thanks!