Skip to content

feat(NODE-7051): Normalize casing of shlwapi.lib #253

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

Merged
merged 1 commit into from
Jul 31, 2025

Conversation

tmm1
Copy link
Contributor

@tmm1 tmm1 commented Jul 22, 2025

I ran into this cross-compiling on a case-sensitive file-system. The official sdk uses Shlwapi.h and ShLwApi.Lib, but it is simplest to keep library names lowercase.

Description

What is changing?

Casing of -lshlwapi compile flag on windows, to ease cross-compilation.

Is there new documentation needed for these changes?

No

What is the motivation for this change?

Issue observed when using msvc on linux.

Improved dependency handling of shlwapi.lib

Library now handles situation on Windows where the casing of the library differs or the case sensitivity of the file system differs. Thanks to @tmm1 for the contribution.

Fill in title or leave empty for no highlight

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

I ran into this cross-compiling on a case-sensitive file-system. The official sdk uses `Shlwapi.h` and `ShLwApi.Lib`, but it is simplest to keep library names lowercase.
@tmm1 tmm1 requested a review from a team as a code owner July 22, 2025 07:00
@durran durran changed the title Normalize casing of shlwapi.lib feat(NODE-7052): Normalize casing of shlwapi.lib Jul 22, 2025
@durran
Copy link
Member

durran commented Jul 22, 2025

Hi @tmm1 , thanks for the contribution. We've tracked in our JIRA project and will triage this early next week.

@durran durran changed the title feat(NODE-7052): Normalize casing of shlwapi.lib feat(NODE-7051): Normalize casing of shlwapi.lib Jul 22, 2025
@durran
Copy link
Member

durran commented Jul 30, 2025

Hi @tmm1 . The current existing casing we have, Shlwapi.* is matching what is in microsoft's documentation - could you provide more detail of the error you are getting?

@tmm1
Copy link
Contributor Author

tmm1 commented Jul 30, 2025

Windows file-system api is case-insensitive, and its recommended to use lowercase. See for example similar change here: nodejs/node-gyp#3189

When I download the SDK and look inside, here is what I see:

❯ find . -ls | grep -i shlw
  1318015     76 -rw-r--r--   1 root     root        74178 Jul 20 20:38 ./Windows\ Kits/10/Lib/10.0.26100.0/um/x64/ShLwApi.Lib
  1317921     80 -rw-r--r--   1 root     root        80504 Jul 20 20:38 ./Windows\ Kits/10/Lib/10.0.26100.0/um/x86/ShLwApi.Lib
  1317771    152 -rw-r--r--   1 root     root       153602 Jul 20 20:38 ./Windows\ Kits/10/Lib/10.0.26100.0/um/arm64/ShLwApi.Lib
  1317320    128 -rw-r--r--   1 root     root       127002 Jul 20 20:38 ./Windows\ Kits/10/Include/10.0.26100.0/um/Shlwapi.h

@durran
Copy link
Member

durran commented Jul 31, 2025

Windows file-system api is case-insensitive, and its recommended to use lowercase. See for example similar change here: nodejs/node-gyp#3189

When I download the SDK and look inside, here is what I see:

❯ find . -ls | grep -i shlw
  1318015     76 -rw-r--r--   1 root     root        74178 Jul 20 20:38 ./Windows\ Kits/10/Lib/10.0.26100.0/um/x64/ShLwApi.Lib
  1317921     80 -rw-r--r--   1 root     root        80504 Jul 20 20:38 ./Windows\ Kits/10/Lib/10.0.26100.0/um/x86/ShLwApi.Lib
  1317771    152 -rw-r--r--   1 root     root       153602 Jul 20 20:38 ./Windows\ Kits/10/Lib/10.0.26100.0/um/arm64/ShLwApi.Lib
  1317320    128 -rw-r--r--   1 root     root       127002 Jul 20 20:38 ./Windows\ Kits/10/Include/10.0.26100.0/um/Shlwapi.h

Ah ok. All over the place - thanks for that. :)

@durran durran merged commit 1a91b69 into mongodb-js:main Jul 31, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants