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

[scripts/vcpkg_apply_patches] Warn of patches that mismatch whitespace #43657

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WangWeiLin-MV
Copy link
Contributor

@WangWeiLin-MV WangWeiLin-MV commented Feb 6, 2025

There was a full text git diff when the patch was updated https://github.com/microsoft/vcpkg/pull/43311/files#diff-18617bc1c604f064b8369ec5f499f0c6cc6fc28501d5bfce7946efdc5e28bebb.

It is due to the existing patch used CRLF instead of the LF in original file. Which results in subsequent patch modifications, requiring mixing of EOL or keeping mismatched EOL to avoid full text update.

As a mitigation, change the implicit --ignore-whitespace --whitespace=nowarn to explicit option X_PATCHES_IGNORE_WHITESPACE to prevent patches introduced unexpected EOL. 911b7c1#diff-b9d68c8c82e07d27d215ef4ac2fc2f97ad664bc18051fe6d238941dacf848c20

Throw warning only since there are more than 100 ports affected by this issue https://dev.azure.com/vcpkg/public/_build/results?buildId=112204&view=logs&j=f79cfdd7-47a8-597f-8f57-dc3e21a8f2ad&t=4f03addf-ef5a-50a2-71be-19894d9df4e3&l=47901

@WangWeiLin-MV WangWeiLin-MV added info:internal This PR or Issue was filed by the vcpkg team. category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly labels Feb 6, 2025
@WangWeiLin-MV WangWeiLin-MV changed the title [scripts/vcpkg_apply_patches] Add option PATCH_IGNORE_WHITESPACE [scripts/vcpkg_apply_patches] Add option X_PATCHES_IGNORE_WHITESPACE Feb 6, 2025
@WangWeiLin-MV WangWeiLin-MV force-pushed the scripts/apply-patch/option-ignore-whitespace branch 5 times, most recently from 8b4f45e to 911b7c1 Compare February 6, 2025 09:17
@WangWeiLin-MV WangWeiLin-MV changed the title [scripts/vcpkg_apply_patches] Add option X_PATCHES_IGNORE_WHITESPACE [scripts/vcpkg_apply_patches] Warn of patches that mismatch whitespace Feb 7, 2025
@WangWeiLin-MV WangWeiLin-MV force-pushed the scripts/apply-patch/option-ignore-whitespace branch 7 times, most recently from 24c512b to 9bfecb2 Compare February 7, 2025 05:16
@WangWeiLin-MV WangWeiLin-MV force-pushed the scripts/apply-patch/option-ignore-whitespace branch from 9bfecb2 to 30fb07b Compare February 7, 2025 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants