This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rome_fs): Add support for symbolic links (symlinks) (#3706)
* feat(rome_fs): Add support for symbolic links (symlinks) * Rename PathInterner and update the FileSystemDiagnostic struct * Update comments * Replace PathBuf with String in FileSystemDiagnostic error_kind * Add integration tests for Windows
- Loading branch information
Filip Kieres
authored
Nov 16, 2022
1 parent
08e7e5b
commit 00266da
Showing
14 changed files
with
408 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
crates/rome_cli/tests/snapshots/main_commands_check/fs_error_dereferenced_symlink_unix.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: crates/rome_cli/tests/snap_test.rs | ||
assertion_line: 223 | ||
expression: content | ||
--- | ||
# Emitted Messages | ||
|
||
```block | ||
/tmp/rome_test_broken_symlink/broken_symlink internalError/fs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Dereferenced symlink | ||
i Rome encountered a file system entry that is a broken symbolic link: /tmp/rome_test_broken_symlink/broken_symlink | ||
``` | ||
|
||
|
18 changes: 18 additions & 0 deletions
18
...s/rome_cli/tests/snapshots/main_commands_check/fs_error_dereferenced_symlink_windows.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: crates/rome_cli/tests/snap_test.rs | ||
assertion_line: 223 | ||
expression: content | ||
--- | ||
# Emitted Messages | ||
|
||
```block | ||
C:\Users\User\AppData\Local\Temp\rome_test_broken_symlink\broken_symlink internalError/fs ━━━━━━━━━━ | ||
! Dereferenced symlink | ||
i Rome encountered a file system entry that is a broken symbolic link: C:\Users\User\AppData\Local\Temp\rome_test_broken_symlink\broken_symlink | ||
``` | ||
|
||
|
28 changes: 28 additions & 0 deletions
28
...me_cli/tests/snapshots/main_commands_check/fs_error_infinite_symlink_exapansion_unix.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
source: crates/rome_cli/tests/snap_test.rs | ||
assertion_line: 223 | ||
expression: content | ||
--- | ||
# Emitted Messages | ||
|
||
```block | ||
/tmp/rome_test_infinite_symlink_exapansion/prefix internalError/fs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Infinite symlink expansion | ||
× Rome encountered a file system entry that leads to an infinite symbolic link expansion, causing an infinite cycle: /tmp/rome_test_infinite_symlink_exapansion/prefix | ||
``` | ||
|
||
```block | ||
/tmp/rome_test_infinite_symlink_exapansion/prefix internalError/fs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Infinite symlink expansion | ||
× Rome encountered a file system entry that leads to an infinite symbolic link expansion, causing an infinite cycle: /tmp/rome_test_infinite_symlink_exapansion/prefix | ||
``` | ||
|
||
|
28 changes: 28 additions & 0 deletions
28
...cli/tests/snapshots/main_commands_check/fs_error_infinite_symlink_exapansion_windows.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
source: crates/rome_cli/tests/snap_test.rs | ||
assertion_line: 223 | ||
expression: content | ||
--- | ||
# Emitted Messages | ||
|
||
```block | ||
C:\Users\User\AppData\Local\Temp\rome_test_infinite_symlink_exapansion\prefix internalError/fs ━━━━━━━━━━ | ||
! Infinite symlink expansion | ||
× Rome encountered a file system entry that leads to an infinite symbolic link expansion, causing an infinite cycle: C:\Users\User\AppData\Local\Temp\rome_test_infinite_symlink_exapansion\prefix | ||
``` | ||
|
||
```block | ||
C:\Users\User\AppData\Local\Temp\rome_test_infinite_symlink_exapansion\prefix internalError/fs ━━━━━━━━━━ | ||
! Infinite symlink expansion | ||
× Rome encountered a file system entry that leads to an infinite symbolic link expansion, causing an infinite cycle: C:\Users\User\AppData\Local\Temp\rome_test_infinite_symlink_exapansion\prefix | ||
``` | ||
|
||
|
17 changes: 0 additions & 17 deletions
17
crates/rome_cli/tests/snapshots/main_commands_check/fs_error_symlink.snap
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.