-
Notifications
You must be signed in to change notification settings - Fork 75
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 NoOpFactory
implicit in package object
#681
Add NoOpFactory
implicit in package object
#681
Conversation
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.
We intentionally didn't add an implicit method when adding NoOpFactory
, see. I personally beware of this kind of thing since it accidentally may hurt someone in $PROD. Especially considering that some $IDE can suggest import when implicit value is required. But I can be overthinking about this. So, if the majority will be happy with this implicit method, I will be happy too.
If this is so dangerous then I argue that |
Sorry, I don't quite follow your idea. I mean that if this method is just for tests, then it shouldn't be too hard to create an implicit instance on the user side. Or, probably, we can add this method straightforwardly to the |
Ok, fair enough. My motivation is that currently there is no We will have a bigger problem for Scala Native, because there is no standard logging framework there. |
To be fair, it's already isolated to the no-op module. If no-op was part of core that would be a bigger problem, but seems just as hard to add a no-op dependency as it is to add testing dependency :) |
Yeah, true. Probably initial authors considering this fine. So I'm speaking just as a random guy from the community 🙇🏻♂️ |
LGTM. The implicit |
@lorandszakacs actually I'm considering to retract this PR 😅 After some discussion I think it is wrong for
To which @ChristopherDavenport replies:
https://discord.com/channels/632277896739946517/839254871646404638/1011694989870366770 Instead, I think we should deprecate and discourage implicit use of the Sl4fj factory. |
I also lean towards deprecating the implicit creation of the factory in slf4j, in which case this indeed should be closed 😄 But I do not agree with encouraging people to not pass |
Why not provide this as a convenience but in an |
@armanbilge Shall we close this PR, and see if @bplommer's idea lands either in #683 or a follow-up? |
Ah yes, I think we're all agreed we don't want to do this. |
This is the no-op equivalent of:
log4cats/slf4j/src/main/scala/org/typelevel/log4cats/slf4j/package.scala
Line 23 in 4f02ef3