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

[platform-expression] fix compare() #282

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

maksqwe
Copy link
Contributor

@maksqwe maksqwe commented Nov 22, 2021

No description provided.

@ras0219-msft ras0219-msft merged commit 93c2aa3 into microsoft:main Nov 22, 2021
@ras0219-msft
Copy link
Contributor

Thanks for the fix!

What bad behavior caused you to identify this bug? We'd like to add a test case to improve coverage.

@maksqwe
Copy link
Contributor Author

maksqwe commented Nov 22, 2021

Just saw this typo in the code.
Test case: when do some search using "vcpkg search ..." this function compare two expressions, for example in ffmpeg vcpkg.json there are platforms which return wrong result from compare().

{
  "name": "ffmpeg",
  "default-features": false,
  "features": [
    "opengl"
  ],
  "platform": "!uwp & !(windows & arm)"
},
{
  "name": "ffmpeg",
  "default-features": false,
  "features": [
    "dav1d"
  ],
  "platform": "!(uwp | arm | x86 | osx)"
},

Complexy of !uwp & !(windows & arm) is 7, when !(uwp | arm | x86 | osx) is 6 and has bigger length.

@maksqwe maksqwe deleted the fix_platform_expr_compare branch November 22, 2021 23:41
BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Nov 26, 2021
BillyONeal added a commit to microsoft/vcpkg that referenced this pull request Nov 26, 2021
* Update tool to 2021-11-24.

* Reformat ports affected by microsoft/vcpkg-tool#282
omartijn pushed a commit to resolume/vcpkg-public-registry that referenced this pull request Jul 11, 2022
* Update tool to 2021-11-24.

* Reformat ports affected by microsoft/vcpkg-tool#282
sandercox pushed a commit to sandercox/vcpkg-public-registry that referenced this pull request Jan 4, 2024
* Update tool to 2021-11-24.

* Reformat ports affected by microsoft/vcpkg-tool#282
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.

2 participants