test262 file path limit on Windows

51 views
Skip to first unread message

Tekman

unread,
Oct 8, 2020, 8:58:44 PM10/8/20
to v8-dev
Hi,

There were a few test files added in test262 that push the total path size beyond the 260 character limit on Windows machines; unfortunately, that makes it very difficult to build v8 because gclient sync fails with a "You have unstaged changes" error in test262, caused by the missing files.

If I try to manually run 'git reset --hard' in test262, this is what I'm seeing:

D:\work\engine\v8\test\test262\data>git reset --hard
error: unable to create file test/built-ins/String/prototype/split/arguments-are-objects-and-instance-is-string-first-object-have-overrided-to-string-function-and-value-of-function-that-throw-exception-second-object-have-overrided-value-of-function-that-throw-exception.js: Filename too long
error: unable to create file test/built-ins/String/prototype/split/arguments-are-objects-and-instance-is-string-first-object-have-overrided-to-string-function-second-object-have-overrided-value-of-function-and-to-string-function-that-throw-exception.js: Filename too long
error: unable to create file test/built-ins/String/prototype/split/arguments-are-objects-and-instance-is-string-first-object-have-overrided-to-string-function-that-throw-exception-second-object-have-overrided-value-of-function-that-throw-exception.js: Filename too long
fatal: Could not reset index file to revision 'HEAD'.

The repro steps are literally just running `fetch v8`, which fails with this error message:
v8\test\test262\data (ERROR)
----------------------------------------
[0:00:00] Started.
[0:00:01] Finished running: git config remote.origin.url
[0:00:01] Finished running: git rev-list -n 1 HEAD
[0:00:01] Finished running: git rev-parse --abbrev-ref=strict HEAD
----------------------------------------
Error: 12>
12> ____ v8\test\test262\data at ad8a5e9940ee60d1ecb6e150b7aecf09b17545dd
12>     You have unstaged changes.
12>     Please commit, stash, or reset.
Subprocess failed with return code 1.

Any tips about how to resolve this? It looks like on Windows 10 there is a registry hack to support filepaths longer than 260 characters, but that won't work on older Windows versions and it'll be a pain to configure in CI environments without administrative control. Can I temporarily hold back test262?

Thank you!

Tekman

unread,
Oct 8, 2020, 9:35:18 PM10/8/20
to v8-dev
It looks like this is the change that renamed the files and introduced the issue: https://chromium.googlesource.com/external/github.com/tc39/test262.git/+/834789514d095d8055cdb12e2b4df40fedd5f5e7

FWIW, it looks like this can be worked around locally in Windows 10 by using Group Policy to turn on "Enable Win32 long paths" in Computer Configuration > Administrative Templates > System > Filesystem and running `git config --system core.longpaths true` from an administrative command prompt. I didn't find a solution for CI loops (build agents) though.

Julio César Rocha

unread,
Oct 13, 2020, 10:55:42 PM10/13/20
to v8-dev
Out of curiosity, why wouldn't that approach work on CI build agents, if the ones in Azure Pipelines usually allow Administrator privileges?

Julio César Rocha

unread,
Oct 14, 2020, 10:29:43 PM10/14/20
to v8-dev
Another alternate approach is to do a partial checkout (omit a repo subtree).
Git supports it, but I'm not sure if this can be done in gclient. Taking a look...

Tekman

unread,
Oct 15, 2020, 9:03:25 PM10/15/20
to v8-dev
The repro for this issue is literally running `fetch v8` on a Windows machine; follow the official build instructions and when reaching the fetch v8 step, you'll see this error:

v8\test\test262\data (ERROR)
----------------------------------------
[0:00:00] Started.
[0:00:01] Finished running: git config remote.origin.url
[0:00:01] Finished running: git rev-list -n 1 HEAD
[0:00:01] Finished running: git rev-parse --abbrev-ref=strict HEAD
----------------------------------------
Error: 12>
12> ____ v8\test\test262\data at ad8a5e9940ee60d1ecb6e150b7aecf09b17545dd
12>     You have unstaged changes.
12>     Please commit, stash, or reset.

Am I not looking at the right instructions for building V8?
Reply all
Reply to author
Forward
0 new messages