You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warn when RequestHandler doesn't invoke response.onSubscribe() #25
Can we detect this after requestHandler.handle*() is called and print a warning or fail noisily and early? At least during development this should be the default.
I'm struggling to see why this is a concern. I buy that it may not be a check we care about, but why is "compiled code size" a big deal here? And how much increase are we talking about?
I would suggest relaxing the original proposal to this:
after requestHandler.handle* is called we validate that
a) response.OnSubscribe was called
b) response.OnComplete/OnError was called
This will simplify writing the handler for the cases when the handler wants to terminate right away. The subscription object is unnecessary for sending the terminating signal.
Activity
benjchristensen commentedon May 16, 2016
I'm struggling to see why this is a concern. I buy that it may not be a check we care about, but why is "compiled code size" a big deal here? And how much increase are we talking about?
yschimke commentedon May 16, 2016
My concern with the mixin approach is that it relies on a n00b user doing extra work to get warned about n00b errors.
benjchristensen commentedon May 16, 2016
Regarding logging, the entire RxJava library has no logging, so I'm quite alright with us avoiding what is generally just a waste of space.
We should support hooking in for insights when we want, but I don't like code littered with logging everywhere just because.
benjchristensen commentedon May 16, 2016
Agreed. If it's trivial though we shouldn't prevent correctness/safety guards.
lehecka commentedon May 31, 2016
I would suggest relaxing the original proposal to this:
after requestHandler.handle* is called we validate that
a) response.OnSubscribe was called
b) response.OnComplete/OnError was called
This will simplify writing the handler for the cases when the handler wants to terminate right away. The subscription object is unnecessary for sending the terminating signal.
lehecka commentedon Jan 26, 2017
the most relaxed solution was implemented. onSubscribe doesn't have to be called immediately.
Closing the issue as the discussion is closed now.
edenscm/hg: add GitHub Actions with CI for HG plus add fixes for getd…