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

vim.loader luac cache file names gets too long on ecryptfs #29372

Open
n-e-g opened this issue Jun 17, 2024 · 2 comments
Open

vim.loader luac cache file names gets too long on ecryptfs #29372

n-e-g opened this issue Jun 17, 2024 · 2 comments
Labels
bug issues reporting wrong behavior lua stdlib
Milestone

Comments

@n-e-g
Copy link

n-e-g commented Jun 17, 2024

Problem

vim.loader stores files stored in ~/.cache/nvim/luac and compiled files are encoded as full path to the original source file.
On linux OS when ecryptfs is enabled on home directory this leads to file names exceeding max file length (143 characters)
preventing plugin to be loaded.
This is similar but not exactly the same as #25008

Steps to reproduce

Enabling telescope with file-browser extension on Linux OS with ecryptfs enabled on home directory leads to the following error:

Failed to run `config` for telescope-file-browser.nvim
                                                                                                                                                                
...m/lazy/telescope.nvim/lua/telescope/_extensions/init.lua:10: 'file_browser' extension doesn't exist or isn't installed: vim/loader.lua:0: ENAMETOOLONG: name 
too long: /home/neg/.cache/nvim/luac/%2fhome%2fneg%2f.local%2fshare%2fnvim%2flazy%2ftelescope-file-browser.nvim%2flua%2ftelescope%2f_extensions%2ffile_browser%2
fmake_entry_utils.luac                                                                                                                                          
                                                                                                                                                                
# stacktrace:                                                                                                                                                   
  - /telescope.nvim/lua/telescope/_extensions/init.lua:10 _in_ **load_extension**                                                                               
  - /telescope.nvim/lua/telescope/_extensions/init.lua:62 _in_ **load_extension**                                                                               
  - ~/.config/nvim/lua/plugins/telescope.lua:17 _in_ **config**                                                                                                 
  - ~/.config/nvim/init.lua:17                 

Expected behavior

Cached plugin file names should be wither hashes of target file names or stored in a way that file names does not exceed max file length.

Neovim version (nvim -v)

v0.10.0

Vim (not Nvim) behaves the same?

Operating system/version

Debian 6.7.12-1 (2024-04-24) x86_64 GNU/Linux

Terminal name/version

gnome-terminal

$TERM environment variable

xterm-256color

Installation

build from repo / official release binary

@n-e-g n-e-g added the bug issues reporting wrong behavior label Jun 17, 2024
@zeertzjq zeertzjq added the lua stdlib label Jun 17, 2024
@lewis6991
Copy link
Member

It's unlikely that vim.loader can be supported with ecryptfs.

@justinmk justinmk added this to the backlog milestone Jun 19, 2024
@justinmk
Copy link
Member

justinmk commented Jun 19, 2024

Hashing the filepath is indirection which makes troubleshooting/debugging more cumbersome. Is that the only reason we don't hash the filepaths? Maybe it's worth the tradeoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior lua stdlib
Projects
None yet
Development

No branches or pull requests

4 participants