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

Normalize marker expression order #5422

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

ibraheemdev
Copy link
Member

Summary

Normalize the order of marker expressions on construction. This removes the distinction between expressions like os_name == 'Linux' vs. 'Linux' == os_name throughout the codebase. One caveat here is that the in operator does not have a direct inverse, so we introduce MarkerOperator::Contains to handle that case.

I wanted to land this smaller change before some more intrusive changes as it simplifies the existing code quite a bit.

@ibraheemdev ibraheemdev added the internal A refactor or improvement that is not user-facing label Jul 24, 2024
@ibraheemdev ibraheemdev force-pushed the ibraheem/marker-smart-constructors branch from 37685b1 to 4d6e67a Compare July 24, 2024 20:30
@ibraheemdev ibraheemdev merged commit 39be71f into main Jul 24, 2024
55 checks passed
@ibraheemdev ibraheemdev deleted the ibraheem/marker-smart-constructors branch July 24, 2024 22:28
Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

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

I like it!

Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal A refactor or improvement that is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants