marmistrz opened Issue #1358:
Windows distinguishes between file symlinks and directory symlinks. It's possible to create a dangling symlink, but the type (file/directory) has to be specified upfront, upon creation.
The behavior in case of type mismatch is inconsistent. Precisely, suppose that a dangling file symlink is created
foo -> bar
and later, a directorybar
is created. Then:* under msys64 bash,
cd foo
succeeds and the directory view is the same when access either directly or through the symlink
* under cmd (both windowed and as a child process from msys64 bash).cd foo
fails withThe directory name is invalid
* under Windows Explorer, the dangling symlink is invisibleWe should decide how WASI should handle a request to create a dangling symlink. Possible ideas:
- default to file symlinks, make sure that WASI can correctly handle them even in case of type mismatch and neglect the fact that they may be broken outside WASI
- as in 1., but correct the symlinks when encountered/upon close/etc.
- deny creating dangling symlinks altogether and modify the tests to disallow it (it may break existing code! so probably a bad idea)
cc @kubkon @sunfishcode @peterhuene
marmistrz labeled Issue #1358:
Windows distinguishes between file symlinks and directory symlinks. It's possible to create a dangling symlink, but the type (file/directory) has to be specified upfront, upon creation.
The behavior in case of type mismatch is inconsistent. Precisely, suppose that a dangling file symlink is created
foo -> bar
and later, a directorybar
is created. Then:* under msys64 bash,
cd foo
succeeds and the directory view is the same when access either directly or through the symlink
* under cmd (both windowed and as a child process from msys64 bash).cd foo
fails withThe directory name is invalid
* under Windows Explorer, the dangling symlink is invisibleWe should decide how WASI should handle a request to create a dangling symlink. Possible ideas:
- default to file symlinks, make sure that WASI can correctly handle them even in case of type mismatch and neglect the fact that they may be broken outside WASI
- as in 1., but correct the symlinks when encountered/upon close/etc.
- deny creating dangling symlinks altogether and modify the tests to disallow it (it may break existing code! so probably a bad idea)
cc @kubkon @sunfishcode @peterhuene
marmistrz labeled Issue #1358:
Windows distinguishes between file symlinks and directory symlinks. It's possible to create a dangling symlink, but the type (file/directory) has to be specified upfront, upon creation.
The behavior in case of type mismatch is inconsistent. Precisely, suppose that a dangling file symlink is created
foo -> bar
and later, a directorybar
is created. Then:* under msys64 bash,
cd foo
succeeds and the directory view is the same when access either directly or through the symlink
* under cmd (both windowed and as a child process from msys64 bash).cd foo
fails withThe directory name is invalid
* under Windows Explorer, the dangling symlink is invisibleWe should decide how WASI should handle a request to create a dangling symlink. Possible ideas:
- default to file symlinks, make sure that WASI can correctly handle them even in case of type mismatch and neglect the fact that they may be broken outside WASI
- as in 1., but correct the symlinks when encountered/upon close/etc.
- deny creating dangling symlinks altogether and modify the tests to disallow it (it may break existing code! so probably a bad idea)
cc @kubkon @sunfishcode @peterhuene
marmistrz labeled Issue #1358:
Windows distinguishes between file symlinks and directory symlinks. It's possible to create a dangling symlink, but the type (file/directory) has to be specified upfront, upon creation.
The behavior in case of type mismatch is inconsistent. Precisely, suppose that a dangling file symlink is created
foo -> bar
and later, a directorybar
is created. Then:* under msys64 bash,
cd foo
succeeds and the directory view is the same when access either directly or through the symlink
* under cmd (both windowed and as a child process from msys64 bash).cd foo
fails withThe directory name is invalid
* under Windows Explorer, the dangling symlink is invisibleWe should decide how WASI should handle a request to create a dangling symlink. Possible ideas:
- default to file symlinks, make sure that WASI can correctly handle them even in case of type mismatch and neglect the fact that they may be broken outside WASI
- as in 1., but correct the symlinks when encountered/upon close/etc.
- deny creating dangling symlinks altogether and modify the tests to disallow it (it may break existing code! so probably a bad idea)
cc @kubkon @sunfishcode @peterhuene
peterhuene commented on Issue #1358:
I think I'm leaning towards a preference to default to a file symlink and document that (Windows-specific) behavior.
Last updated: Dec 23 2024 at 12:05 UTC