-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Make ValidationChangedObservable pipe pure #20
Conversation
Hmm, the CI checks failed, but it doesn't seem the PR caused the failure:
BTW out of scope for this PR, but wondering if we support custom delimiters for validation messages: |
I think you need to update the cake version. Use Punchcard or Splat as a example. |
Hopefully those 3 changes get it. |
Azure Devops has died without access to the internet. So will have to wait I guess. |
Codecov Report
@@ Coverage Diff @@
## master #20 +/- ##
==========================================
+ Coverage 33.09% 33.28% +0.18%
==========================================
Files 16 16
Lines 704 706 +2
Branches 82 82
==========================================
+ Hits 233 235 +2
Misses 463 463
Partials 8 8
Continue to review full report at Codecov.
|
What kind of change does this PR introduce?
Fixes #19
What is the current behavior?
Currently,
_validationSource
and_validations
won't stay synchronized due to the following code blocks:ReactiveUI.Validation/src/ReactiveUI.Validation/Contexts/ValidationContext.cs
Line 61 in 0b28a7e
ReactiveUI.Validation/src/ReactiveUI.Validation/Contexts/ValidationContext.cs
Lines 83 to 88 in 0b28a7e
_validations
collection is empty whenvalidationChangedObservable
ticks on a scheduler other thanImmediateScheduler
. This happens because thevalidationConnectable
pipe isn't pure — when using a scheduler other than immediate, the_validations
read-only observable collection gets updated too late.What is the new behavior?
Now, the
validationConnectable
is pure, andIsValid
behaves correctly with the default scheduler.What might this PR break?
All tests pass on my local machine, so probably nothing.