google / google/vim-maktaba

Symlinked plugin with addon-info.json "name" may be added to the runtimepath twice

Open
#61 9 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
588
Forks
41
PR merge metrics
No merged PRs in 30d

Description

This happens on an old MacVim 7.3, but not on newer versions of Vim.

Create a plugin with an `addon-info.json` file with an explicit `"name"`, for example `~/code/vim-linked/addon-info.json`:

```
{
"name": "linked.vim",
"version": "0.0.0",
"dependencies": {
"maktaba": {}
}
}
```

Create a symlink to the plugin location, then start Vim with a vimrc that `#GetOrInstall`s the symlink location. (Here I used locations with different leaf dir names, but the same thing happens when the leaf dir names are the same.)

```
set nocompatible
source ~/.vim/maktaba/maktaba/bootstrap.vim
call maktaba#plugin#GetOrInstall('~/.vim/maktaba/linked')
```

Result. `&rtp`:

```
~/.vim,
~/code/vim-linked/,
~/.vim/maktaba/linked/,
/Applications/MacVim.app/Contents/Resources/vim/vimfiles,
/Applications/MacVim.app/Contents/Resources/vim/runtime,
/Applications/MacVim.app/Contents/Resources/vim/vimfiles/after,
~/.vim/after,
~/.vim/maktaba/maktaba
```

`:echo maktaba#plugin#RegisteredPlugins()`:

```
['linked.vim', 'maktaba']
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.