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

Make comparison of installed files case-insensitive #1483

Merged
merged 5 commits into from
Aug 28, 2024

Conversation

vicroms
Copy link
Member

@vicroms vicroms commented Aug 27, 2024

Fixes the check that prevents two ports from installing a file with the same name by making the comparison case insensitive.

@vicroms vicroms force-pushed the error-on-file-overwrite branch 2 times, most recently from 6f82d08 to 97098bd Compare August 27, 2024 22:27
@vicroms vicroms marked this pull request as ready for review August 27, 2024 22:57
@@ -234,11 +234,23 @@ namespace vcpkg
// The VS2015 standard library requires comparison operators of T and U
// to also support comparison of T and T, and of U and U, due to debug checks.
#if _MSC_VER <= 1910
Copy link
Member

Choose a reason for hiding this comment

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

We don't care about VS2015 so you can delete this if you want. Not worth resetting testing if that's the only change.

{
"name": "duplicate-file-a",
"version": "0.0.1"
}
Copy link
Member

Choose a reason for hiding this comment

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

Please format-manifest these.

@BillyONeal BillyONeal enabled auto-merge (squash) August 28, 2024 22:16
@BillyONeal BillyONeal merged commit b8b3c1b into microsoft:main Aug 28, 2024
6 checks passed
@dg0yt
Copy link
Contributor

dg0yt commented Sep 26, 2024

This change leads to a CI regression in https://dev.azure.com/vcpkg/public/_build/results?buildId=107274&view=results:

  • Android builds are on Linux with a case-sensitive filesystem.
  • tmx installs tmx.h
  • tmxparser installs Tmx.h.
  • CI now reports
 error: The following files are already installed in /mnt/vcpkg-ci/installed/arm64-android and are in conflict with tmxparser:arm64-android
 Installed by tmx:arm64-android  
 include/tmx.h

@dg0yt
Copy link
Contributor

dg0yt commented Sep 26, 2024

The CI run for the tool update, https://dev.azure.com/vcpkg/public/_build/results?buildId=107231&view=results, had a warning only:

warning: File /Users/vcpkg/Data/installed/arm64-osx/include/Tmx.h was already present and will be overwritten

@BillyONeal
Copy link
Member

@dg0yt I don't believe this is a regression, I believe this was broken before and we are finally detecting that it is broken.

@dg0yt
Copy link
Contributor

dg0yt commented Sep 27, 2024

Last vcpkg.ci run now, https://dev.azure.com/vcpkg/public/_build/results?buildId=107290

x64-android, case-sensitive filesystem: No error.

x64-osx, case-insensitive filesystem: warning

warning: File /Users/vcpkg/Data/installed/arm64-osx/include/Tmx.h was already present and will be overwritten

But there is the error in that vcpkg.pr run. Only for two in three android triplets.!?

@dg0yt
Copy link
Contributor

dg0yt commented Sep 27, 2024

Hm, this PR here claims to "Make comparison of installed files case-insensitive" but actually changes "case_insensitive_ascii_less", not "case_insensitive_ascii_equals".

The particular case of interest has this input set (order undefined):

include/tmx.h
include/Tmx.h.in
include/Tmx.h

@dg0yt
Copy link
Contributor

dg0yt commented Oct 3, 2024

vcpkg.pr https://dev.azure.com/vcpkg/public/_build/results?buildId=107523 Errors:

influxdb-cxx:x64-osx:/include/Proxy.h
libproxy:x64-osx:/include/proxy.h

coin-or-cgl:x64-osx:/lib/libCgl.a
games101-cgl:x64-osx:/lib/libCGL.a
# (Debug variant differs by to 'd` suffix.)

All ports were built from source, due to the CMake update (?) and touching the baseline.

vcpkg.ci https://dev.azure.com/vcpkg/public/_build/results?buildId=107290 Only warnings about overwriting.

BillyONeal added a commit to BillyONeal/influxdb-cxx that referenced this pull request Oct 9, 2024
In vcpkg's registry, before microsoft/vcpkg-tool#1483 , we missed that `influxdb-cxx` conflicts with `libproxy`, because the former spells the header `include/Proxy.h` while the latter spells it `include/proxy.h`. This caused the ports to silently damage each other on case insensitive file systems, such as on Windows and macOS.

Given that the names "Proxy.h", "Transport.h", and "Point.h" are all extremely likely to conflict with other users, and `influxdb-cxx` already seems to have  a convention for header names to be prefixed with "InfluxDB", we, the vcpkg registry maintainers, believe it would be best if these headers were renamed to resolve the conflict.
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.

3 participants