[llvm] lit: improve long path support on Windows (PR #207250)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 11:50:33 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD llvm/utils/lit/lit/InprocBuiltins.py llvm/utils/lit/lit/ShellEnvironment.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- InprocBuiltins.py 2026-07-02 18:44:03.000000 +0000
+++ InprocBuiltins.py 2026-07-02 18:49:59.990129 +0000
@@ -178,11 +178,11 @@
def extended(path):
if not kIsWindows:
return path
path = os.path.abspath(path)
- if path.startswith('\\\\'):
+ if path.startswith("\\\\"):
return "\\\\?\\UNC\\{0}".format(path[2:])
return "\\\\?\\{0}".format(path)
stderr = StringIO()
exitCode = 0
--- ShellEnvironment.py 2026-07-02 18:44:03.000000 +0000
+++ ShellEnvironment.py 2026-07-02 18:50:00.058544 +0000
@@ -120,11 +120,11 @@
def extended(path):
if not kIsWindows:
return path
path = os.path.abspath(path)
- if path.startswith('\\\\'):
+ if path.startswith("\\\\"):
return "\\\\?\\UNC\\{0}".format(path[2:])
return "\\\\?\\{0}".format(path)
# Apply the redirections, we use (N,) as a sentinel to indicate stdin,
# stdout, stderr for N equal to 0, 1, or 2 respectively. Redirects to or
``````````
</details>
https://github.com/llvm/llvm-project/pull/207250
More information about the llvm-commits
mailing list