-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[vcpkg] Use std::filesystem when Visual Studio is greater than 2015 #12774
[vcpkg] Use std::filesystem when Visual Studio is greater than 2015 #12774
Conversation
In the process of testing this now, thank you.
and many others. I'm using the latest: |
Yeah, we need to turn off that warning, because that deprecation is not a thing we can deal with rn since we need to work back to VS2015 |
I think this is just another reason to get off std::filesystem. |
OK, just did a git pull, and it did re-build this time without errors. |
So far so good. |
Nope, the dreaded issue is back!
FWIW I'm running this through a Windows Powershell using the very very latest Microsoft Visual Studio Comunity 2019 - 16.7.0. |
Can you try running it under procmon and see which process is holding the file locked? |
And can you try to use powershell with admin permission? |
Admin permissions is not something I want to have to revert to sorry @JackBoosY and I can't anyway, since for some reason Windows hides my network drive in Admin mode (I never figured out why). Could the issue be that I'm working from a network drive? I'll try again from C: and let you know. I wasn't aware that Windows performed so poorly when accessing network drives. |
OK. Somewhat incredibly anticlimactically, this patch isn't required. The issue is that vcpkg doesn't work with network drives. I tried again with a fresh vcpkg install on C: and everything worked perfectly. That's possibly the reason other users are having issues also.... It would be great if it DID work on network drives, but, it doesn't. |
From network driver... that's we didn't expected. I think that also affect WSL. |
Is it both VS2015 and being on a network drive needed to trigger the problem? We intend to remove all |
@BillyONeal no, only the location of vcpkg. I'm not sure what would happen if both VS2019 AND vcpkg were on the network location, since that's not my use-case. Moving all my stuff to C: is working perfectly now. |
Have you tried e.g. |
I already had used subst. And it didn't work with vcpkg. |
toolsrc/src/vcpkg/base/files.cpp
Outdated
#if defined(_WIN32) | ||
return vcpkg::Strings::to_utf8(p.native()); | ||
#else | ||
return p.string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be p.native()
since we're making an assumption that it'll be UTF-8.
toolsrc/src/vcpkg/base/files.cpp
Outdated
#if defined(_WIN32) | ||
return vcpkg::Strings::to_utf8(p.generic_wstring()); | ||
#else | ||
return p.string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That can't be right, it at least needs to be generic_string
# Conflicts: # toolsrc/vcpkglib/vcpkglib.vcxproj # toolsrc/vcpkgtest/vcpkgtest.vcxproj
If you need someone to test this once the PR has stabilized, please let me know! |
@etheory it should be stable now; the one concern I want to fix is getting CMake to support compiling with VS 2015 (so we can continue to test VS2015 even without the VS build system), which will be fixed in a different PR. |
I see, so it's not just being a network share, it's also a "samba" server. It's possible that they don't implement our attempts to canonicalize the vcpkg root path. :/ |
I'm testing this now....
|
Should I test this again? As far as I'm aware this PR has been approved but still doesn't fix the issue I'm encountering? |
@etheory unfortunately, there's nothing much we can do if it doesn't fix your issue; |
Thanks for your fix Jack! |
If that's the case, it might be pertinent to add to the vcpkg documentation that it doesn't work when run on network drives. |
It does work on network drives, just not those hosted on whatever software this Synology uses. |
…icrosoft#12774) Co-authored-by: Nicole Mazzuca <[email protected]> Co-authored-by: Billy Robert O'Neal III <[email protected]>
…icrosoft#12774) Co-authored-by: Nicole Mazzuca <[email protected]> Co-authored-by: Billy Robert O'Neal III <[email protected]>
std::experimental::filesystem
std::filesystem
Fixes #9132.