-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ARROW-8477: [C++] Enable reading and writing of long filenames for Windows #6993
Conversation
cpp/src/arrow/util/io_util_test.cc
Outdated
@@ -446,6 +446,56 @@ TEST(CreateDirTree, Basics) { | |||
ASSERT_OK_AND_ASSIGN(fn, temp_dir->path().Join("EF")); | |||
ASSERT_OK_AND_ASSIGN(created, CreateDirTree(fn)); | |||
ASSERT_TRUE(created); | |||
|
|||
#ifndef __APPLE__ |
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.
Why did you have to disable this test on macOS?
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 experienced failures in the CI pipeline on macOS and I was unable to locate clear documentation of the path name limits (I'm not a macOS expert).
I figured it might be best to separately address macOS in another issue, if there's community support for that. (This patch leaves macOS builds and tests unchanged.)
If you believe this test should run as is under macOS, I'll remove the #ifndef and follow up on any issues.
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 was just wondering. According to Google searches, the path length limit on macOS may be 1024, which this test exceeds. We can keep it like that.
Looks like Windows long paths are enabled by default on Github Actions. Cool! |
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.
Thanks for the report and for the fix. WIll merge if CI green.
Your fixups look good. Thanks! |
The remaining CI failure is unrelated. |
…ndows This patch enables reading/writing of files with long (>260 characters) pathnames in Windows. In order for the new test to run under Windows, both (1) the test host must have long paths enabled in its registry, and (2) the test executable (arrow_utility_test.exe) must include a manifest indicating support for long paths (see https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#enable-long-paths-in-windows-10-version-1607-and-later). The test source code checks for (1) and the cmake file changes ensure (2). Closes #6993 from tpboudreau/ARROW-8477 Lead-authored-by: TP Boudreau <tpboudreau@gmail.com> Co-authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
Thanks @pitrou for jumping on this so quickly. |
This patch enables reading/writing of files with long (>260 characters) pathnames in Windows.
In order for the new test to run under Windows, both (1) the test host must have long paths enabled in its registry, and (2) the test executable (arrow_utility_test.exe) must include a manifest indicating support for long paths (see https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#enable-long-paths-in-windows-10-version-1607-and-later). The test source code checks for (1) and the cmake file changes ensure (2).