-
Notifications
You must be signed in to change notification settings - Fork 214
SequenceAllSatisfy is mapped to SequenceContainsWhere, and not SequenceAllSatisfy #1626
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
Open
AZero13
wants to merge
1
commit into
swiftlang:main
Choose a base branch
from
AZero13:sequence
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, we might have a compatibility issue here that we need to address. I believe as it stands today, this registers
SequenceContainsWherewith both thePredicateExpressions.SequenceContainsWhereandPredicateExpressions.SwquenceAllSatisfyidentifiers.PredicateCodableConfigurationwill take the last identifier registered when the same type is registered with multiple identifiers, so today I think we've been encoding/decodingPredicateExpressions.SequenceContainsWherewith thePredicateExpressions.SequenceAllSatisfyidentifier. Changing this would break any existing archives that already have a serializedSequenceContainsWherestored under theSequenceAllSatisfyidentifier. It would also break sending a serialized archive from a newer runtime to an application that deserializes it with an older runtime.I'm not sure how many of those archives exist today in the wild. We can try to quantify that, but we might need to instead think about a compatible way to move forward even if these identifiers are incorrect so that we can solve the problem (allowing serialization of SequenceAllSatisfy) without breaking existing serializations of
SequenceContainsWhere. Perhaps we leave a comment here about the unfortunate identifier mismatch and use a new identifier for the realSequenceAllSatisfytype?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you okay with the new identifier route
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's probably the best way to go. Let's update the
SequenceContainsWhereline above to use the incorrect identifier (with a comment explaining why the identifier doesn't match) and then forSequenceAllSatisfywe can come up with a new identifier to use.In terms of a new identifier since the appropriate one is "taken" in existing archives, maybe something like
PredicateExpressions.SequenceAllSatisfy.corrected? @parkera @itingliu do you have any suggestions? I'm not sure if we've had a pattern before around naming and evolving archive keys that were incorrect historically that we should follow here.