-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Chang this warning to DEBUG level output #599
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
Conversation
This just adds noise to our log files. Thoughts on making it a DEBUG warning?
|
👍 |
|
So, this warning isn't just for funsies, it indicates something that can be a real bug and troll the fuck out of you if you didn't realize what's happening - it means that if you do something like: this.WhenAnyValue(x => x.Foo.Bar.Baz)
.Subscribe(Console.WriteLine);
// Later, in another part of town...
// We changed Foo, but since it's a POCO object, WhenAnyValue won't work correctly because
// it didn't know to switch to the new Foo.
this.Foo = new BarType();
// Later, when you're about to ship
Console.WriteLine("WHY THE FUCK DOESNT MY CONSOLE WRITELINE FIRE OMG IM ABOUT TO BE FIRED THIS IS TERRIBLE"); |
|
Can we make it a #DEBUG only warning? How do I turn off this warning in my app? |
|
@haacked Make a static property on |
|
How about using the |
|
The big issue for me at least is that we can't resolve these warnings - because they're UserControls or types we don't own. If we could treat these like FxCop rules and handle/mute them at compile time, it'd be ✨✨✨ |
Are you sure? I'm pretty sure that this will strip the method completely in the Release build of ReactiveUI.dll, no? (i.e, it's not the app's Debug/Release, it's this library's) The problem is, nobody uses the Debug build of ReactiveUI.dll - otherwise there's a ton of stuff I'd downgrade to debug-only. Because this isn't tracing a bug in RxUI, it's helping users to trace a bug in their app |
No :). Methods with the |
|
@jlaanstra that documentation directly contradicts what you just said. 😄
AFAIK, ReactiveUI release builds do not specify the |
|
@jlaanstra sorry, I should have read further. My reading comprehension skills are not so good. |
|
And I just verified @jlaanstra's claim with Reflector. 😄 Learn something new every day. In retrospect, it makes total sense. Why would |
Spread the word! :) Not enough people know about this feature, while it can be very useful. |
|
@jlaanstra In that case I am +:100: to marking that with |
|
@jlaanstra will do! I feel a blog post coming up. |
So what are other places where we would like to have this? There are a couple more of these "You might be breaking your app" warnings where we should add this I think. |
|
We can do this whenever, punted (though you can still make it in RxUI 6.x of course) |
|
Let's schedule this in for RxUI v7? Are there any other areas you want to also slap with |
|
I think there's still some misunderstanding (possibly mine) of the conditional compilation feature. How would we use it in this scenario? We can't mark And if we were to separate the logging call into a separate method and mark that with Conditional compilation only works for parameterless methods that the client code calls directly, unless I'm missing something. |


This just adds noise to our log files. Thoughts on making it a DEBUG warning?