Fold tracked keys only where the file system does - #793
Merged
Conversation
TrackedKeys lower-cased the path unconditionally. InlineKey folds only on Windows and macOS, and carries the reason: on Linux two paths differing only in case are two files, and giving them one key means the second takes over the first's entry. Tracked moves and deletes ride the same listing and had the opposite rule. On Linux two received files differing only in case - value=a and value=A from one parameterised test - shared a move key, and ViewerSession.EnqueueTracked keeps one entry per key, so the earlier pending file was dropped without a word. Both now go through InlineKey.FoldPath, so there is one answer to "when are two paths one file" rather than two that disagree. The tests assert the two agree rather than asserting a platform's answer, so they hold wherever they run - but they can only fail on Linux, where the two rules differ. The Ubuntu job is what enforces this; it passes on Windows either way.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TrackedKeys lower-cased the path unconditionally. InlineKey folds only on
Windows and macOS, and carries the reason: on Linux two paths differing only in
case are two files, and giving them one key means the second takes over the
first's entry.
Tracked moves and deletes ride the same listing and had the opposite rule. On
Linux two received files differing only in case - value=a and value=A from one
parameterised test - shared a move key, and ViewerSession.EnqueueTracked keeps
one entry per key, so the earlier pending file was dropped without a word.
Both now go through InlineKey.FoldPath, so there is one answer to "when are two
paths one file" rather than two that disagree.
The tests assert the two agree rather than asserting a platform's answer, so
they hold wherever they run - but they can only fail on Linux, where the two
rules differ. The Ubuntu job is what enforces this; it passes on Windows either
way.