Skip to content
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

Too many levels of symbolic links #317

Open
adrianlzt opened this issue Jun 12, 2024 · 3 comments
Open

Too many levels of symbolic links #317

adrianlzt opened this issue Jun 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@adrianlzt
Copy link

I have a directory with many markdown files used to take notes. In that directory structure there are symbolic links doing circular paths. For example:
/home/adrian/adrianRepo/web/apps/google/programacion -> ../../../programacion/google
/home/adrian/adrianRepo/programacion/google/apps -> /home/adrian/adrianRepo/web/apps/google

This seems to configure marksman returning this error:

[ERROR][2024-06-12 18:04:14] .../vim/lsp/rpc.lua:770    "rpc"   "/home/adrian/.local/share/nvim/mason/bin/marksman"     "stderr"        "[18:04:14 INF] <LSP Entry> Starting Marksman LSP server: {}\n"
[ERROR][2024-06-12 18:04:18] .../vim/lsp/rpc.lua:770    "rpc"   "/home/adrian/.local/share/nvim/mason/bin/marksman"     "stderr"        "---------------------------------------------------------------------------"
[ERROR][2024-06-12 18:04:18] .../vim/lsp/rpc.lua:770    "rpc"   "/home/adrian/.local/share/nvim/mason/bin/marksman"     "stderr"        "\n"
[ERROR][2024-06-12 18:04:18] .../vim/lsp/rpc.lua:770    "rpc"   "/home/adrian/.local/share/nvim/mason/bin/marksman"     "stderr"        "Marksman encountered a fatal error\nPlease, report the error at https://github.com/artempyanykh/marksman/issues\n---------------------------------------------------------------------------\n"
[ERROR][2024-06-12 18:04:18] .../vim/lsp/rpc.lua:770    "rpc"   "/home/adrian/.local/share/nvim/mason/bin/marksman"     "stderr"        "Marksman version: "
[ERROR][2024-06-12 18:04:18] .../vim/lsp/rpc.lua:770    "rpc"   "/home/adrian/.local/share/nvim/mason/bin/marksman"     "stderr"        "1.0.0.0\n"
[ERROR][2024-06-12 18:04:18] .../vim/lsp/rpc.lua:770    "rpc"   "/home/adrian/.local/share/nvim/mason/bin/marksman"     "stderr"        "OS: Arch Linux\n"
[ERROR][2024-06-12 18:04:18] .../vim/lsp/rpc.lua:770    "rpc"   "/home/adrian/.local/share/nvim/mason/bin/marksman"     "stderr"        "Arch: "
[ERROR][2024-06-12 18:04:18] .../vim/lsp/rpc.lua:770    "rpc"   "/home/adrian/.local/share/nvim/mason/bin/marksman"     "stderr"        "X64\n---------------------------------------------------------------------------\n"
[ERROR][2024-06-12 18:04:18] .../vim/lsp/rpc.lua:770    "rpc"   "/home/adrian/.local/share/nvim/mason/bin/marksman"     "stderr"        "Too many levels of symbolic links : '/home/adrian/adrianRepo/programacion/google/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/ap
ps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/programacion/apps/gmail/script.md'\n"

I'm not sure how this could be fixed, but I think circular symbolic links could be normal.

Thanks!

@artempyanykh
Copy link
Owner

Thanks for reporting this @adrianlzt! I understand the problem. Not sure what's the best way to solve it though. Need to think for a bit.

(some vague concerns around uniqueness of paths to documents and also resolving symlinks to folders outside of the root folder; maybe reading workspace folder in a BFS fashion and picking the shortest paths could be enough...)

@artempyanykh artempyanykh added the bug Something isn't working label Jul 6, 2024
@adrianlzt
Copy link
Author

Maybe just ignoring symlinks? Or an option to ignore them.

@tmuehlbacher
Copy link

Also hitting this on the fwupd repo. I didn't look at the impl too closely but the Rust walkdir crate has some logic to do cycle detection by tracking the parent dirs. Maybe that's useful 🙂 https://github.com/BurntSushi/walkdir/blob/2.5.0/src/lib.rs#L973

Thanks for this nice LSP! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants