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

Evaluate options even if values are invalid #121

Merged
merged 1 commit into from Feb 27, 2019
Merged

Evaluate options even if values are invalid #121

merged 1 commit into from Feb 27, 2019

Conversation

dsnet
Copy link
Collaborator

@dsnet dsnet commented Feb 26, 2019

Rather than checking up-front whether the values are invalid,
give tryOptions a chance to operate on them and potentially ignore
the values. This is useful since a value can only be invalid if it
is a missing slice element or map entry, and provides FilterPath
combined with Ignore the ability to ignore such cases.

Some complexity is added to compareSlice to look for ignored elements
first before applying diffing so that we can decouple the stability
of the diffing algorithm from the primary result.

@dsnet dsnet requested a review from neild February 26, 2019 18:34
Rather than checking up-front whether the values are invalid,
give tryOptions a chance to operate on them and potentially ignore
the values. This is useful since a value can only be invalid if it
is a missing slice element or map entry, and provides FilterPath
combined with Ignore the ability to ignore such cases.

Some complexity is added to compareSlice to look for ignored elements
first before applying diffing so that we can decouple the stability
of the diffing algorithm from the primary result.
@dsnet dsnet merged commit fd81a2b into master Feb 27, 2019
@dsnet dsnet deleted the ignore-missing branch February 27, 2019 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants