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

Fixed runtimepath resolving #752

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Milly
Copy link

@Milly Milly commented Oct 7, 2021

Vim-polyglot changes runtimepath, but...

  • In Windows, resolve() does not do full normalization.
    Therefore, the path of vim-polyglot is not filtered, and registered more than once.
    ex.) runtimepath =>
    C:\Users\alice\.config\vim
    C:/Users/alice/.vimplugins/vim-polyglot
    C:\Users\alice\.vimplugins\vim-polyglot
    C:\tools\vim\vim82
    C:\Users\alice\.vimplugins\vim-polyglot/after
    C:/Users/alice/.vimplugins/vim-polyglot/after
    C:\Users\alice\.config\vim/after
    
    Fix) Substitute \ to / after resolved.
  • Rewriting the runtimepath has too many side effects.
    ex.) Conflicts occur when the plugin-manager manages the paths.
    Fix) Resolved paths are used only for matching, and the original path representation is preserved.

@rene-descartes2021
Copy link

rene-descartes2021 commented Jul 18, 2022

  • Rewriting the runtimepath has too many side effects.
    ex.) Conflicts occur when the plugin-manager manages the paths.
    Fix) Resolved paths are used only for matching, and the original path representation is preserved.

I ran into this issue when using the Shougo/dein.vim package manager. dein.vim needs the index of its cache in the rtp to manage things. As soon as vim-polyglot is sourced (editing the rtp) dein.vim breaks as it no longer is able to find the index of its cache.

In my case I symlinked the cache to a tmpfs. vim-polyglot's resolve() rtp editing changes /home/browser/.vim/plugged/.cache/vimrc/.dein to /tmp/.vimcachebrowser/vimrc/.dein and dein.vim can't index /home/browser/.vim/plugged/.cache/vimrc/.dein within the rtp anymore and critical functionality breaks.

This PR fixes the issue on my Debian system.

I think this PR also fixes #769, who questions:

Is it necessary to resolve() each of the paths in the runtime path?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants