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 capturing bypass #366
Add capturing bypass #366
Conversation
Codecov ReportBase: 75.21% // Head: 75.42% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #366 +/- ##
==========================================
+ Coverage 75.21% 75.42% +0.20%
==========================================
Files 51 51
Lines 2740 2734 -6
Branches 256 258 +2
==========================================
+ Hits 2061 2062 +1
+ Misses 518 510 -8
- Partials 161 162 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Yeah, I had a conversation with Michiel Borkent when there was an earlier issue with |
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.
Based on the Slack conversation, it sounds like this might be intended for using in test code by users of Kaocha? In that case, I think we'd ideally have documentation for it.
@@ -12,7 +12,7 @@ | |||
[kaocha.result :as result] | |||
[kaocha.specs :refer [assert-spec]] | |||
[kaocha.util :as util]) | |||
(:import [clojure.lang Compiler$CompilerException])) | |||
(:import (clojure.lang Compiler$CompilerException))) |
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.
What's the rationale for using parentheses over brackets? Is it just to indicate the different semantics between require
s and import
s?
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.
To be clear, not arguing against this change, just wondering.
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.
The reason is that the first item in the list is special. In this case I agree with Alessandra Sierra https://stuartsierra.com/2016/clojure-how-to-ns.html
The practical result is that you get more sensible indentation
(:import (foo.bar Klass
OtherKlass))
(:import [foo.bar Klass
OtherKlass])
1c9ada5
to
1266ab0
Compare
Released in v1.75.1190 [lambdaisland/kaocha "1.75.1190"] ;; deps.edn
{lambdaisland/kaocha {:mvn/version "1.75.1190"}} ;; project.clj |
When using the output-capturing plugin, it is sometimes desirable to bypass it and still print things directly.
See https://clojurians.slack.com/archives/CCY2V0U6A/p1670084873985659 for a workaround.
This applies the same logic, but provides a more generic
bypass
macro.It seems
FileDescriptor
is not available in babashka, so until that changes this will be Clojure only.