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

Use != for mtime comparison instead of > #21036

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Nov 22, 2024

This improves some behavior, but also reveals misbehavior such as #21034.

See "mtime comparison considered harmful" for details of why comparators other than equality/inequality should not be used with mtime.

Release Notes:

@@ -3412,7 +3412,8 @@ async fn test_local_settings(
});
}

#[gpui::test(iterations = 10)]
// TODO(#21034): This test is flaky for some execution orders. Set iterations back to 10 once fixed.
Copy link
Contributor

@mikayla-maki mikayla-maki Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'd prefer to fix this bug as part of this PR, rather than put a TODO on it, unless there's a good reason to suppress the tests (e.g. the tests disabled on Linux due font sizing inconsistencies compared to what we get on macOS )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, should probably just do the fix! Unfortunately it may be fairly involved, as it requires the effects of proto::UpdateBufferFile and proto::BufferSaved to be applied together rather than separately. I believe the effects of this would be hard to see in the UI since they are emitted at the same time.

This improves some behavior, but also reveals misbehavior such as #21034.

See ["mtime comparison considered harmful"](https://apenwarr.ca/log/20181113) for details of why comparators other than equality/inequality should not be used with mtime.
@notpeter notpeter added the cla-signed The user has signed the Contributor License Agreement label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants