Skip to content
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

refactor: Remove unused generated templates #250

Merged
merged 1 commit into from
Apr 8, 2021
Merged

Conversation

worldbeater
Copy link
Collaborator

What kind of change does this PR introduce?

This PR removes the generated generic property validation classes that were reserved for future use. Since ReactiveUI.Validation now supports IObservable<T>-based validations (see #119), we are no longer planning to add extensions for those generic property validation classes, so removing the unused stuff might be reasonable.

What is the current behavior?

Currently, there are legacy generated classes available as undocumented public API of the library.

What is the new behavior?

Now, the generated classes are removed.

What might this PR break?

Those apps that are relying on the undocumented generated APIs might break at compile-time. The migration to the documented and more flexible ReactiveUI.Validation IObservable<T>-based APIs should be quite simple though, as described in README.md https://github.com/reactiveui/ReactiveUI.Validation#example

// A validator that validates multiple properties.
IObservable<bool> passwordsObservable =
    this.WhenAnyValue(
        x => x.Password,
        x => x.ConfirmPassword,
        (password, confirmation) => password == confirmation);

// Validator assignment to a property.
this.ValidationRule(
    vm => vm.ConfirmPassword,
    passwordsObservable,
    "Passwords must match.");

@glennawatson
Copy link
Collaborator

If it's like rxui and splat you'll need to add a nuget.config due to a ci server issue

@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #250 (87c772a) into main (e72eef1) will increase coverage by 23.17%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main     #250       +/-   ##
===========================================
+ Coverage   63.04%   86.21%   +23.17%     
===========================================
  Files          15       14        -1     
  Lines         893      653      -240     
===========================================
  Hits          563      563               
+ Misses        330       90      -240     

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e72eef1...87c772a. Read the comment docs.

@glennawatson glennawatson merged commit a65a45b into main Apr 8, 2021
@glennawatson glennawatson deleted the remove-template branch April 8, 2021 10:29
@worldbeater
Copy link
Collaborator Author

If it's like rxui and splat you'll need to add a nuget.config due to a ci server issue

Yeah already done that in one of dependabot PRs #249

@reactiveui reactiveui locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants