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

Change owner of and update vimPlugins.nerdtree-git-plugin: init at 2020-09-11 #97985

Merged
merged 1 commit into from Sep 14, 2020
Merged

Change owner of and update vimPlugins.nerdtree-git-plugin: init at 2020-09-11 #97985

merged 1 commit into from Sep 14, 2020

Conversation

unclechu
Copy link
Member

@unclechu unclechu commented Sep 14, 2020

https://github.com/albfan/nerdtree-git-plugin is an outdated (last commit was made more than year an a half ago) fork of the original plugin https://github.com/Xuyuanp/nerdtree-git-plugin (last commit on 11 September 2020).

In the nixos-20.09 release the vimPlugins.nerdtree doesn’t work with the vimPlugins.nerdtree-git-plugin failing with this error:

Error detected while processing function 210[2]..211[14]..194[20]..197[8]..161[25]..159[15]..271[5]..NERDTreeGitStatusRefreshListener[5]..NERDTreeGetGitStatusPrefix:                                                                                                                                                                                                        
line    6:                                                                                                                                                                                                                                                                                                                                                                   
E716: Key not present in Dictionary: Slash()                                                                                                                                                                                                                                                                                                                                 
E15: Invalid expression: b:NERDTree.root.path.str() . a:path.Slash()                                                                                                                                                                                                                                                                                                         
Error detected while processing function 210[2]..211[14]..194[20]..197[8]..161:                                                                                                                                                                                                                                                                                              
line   25:                                                                                                                                                                                                                                                                                                                                                                   
E171: Missing :endif                                                                                                                                                                                                                                                                                                                                                         
Error detected while processing function 210[2]..211:                                                                                                                                                                                                                                                                                                                        
line   14:                                                                                                                                                                                                                                                                                                                                                                   
E171: Missing :endif                                                                                                                                                                                                                                                                                                                                                         
Press ENTER or type command to continue 

When you try to call :NERDTree.

This merge request fixes this bug. Or probably not a bug but just an incompatibility with newer NERDTree.

I called ./update --add Xuyuanp/nerdtree-git-plugin but it does a lot of extra commits I didn’t want for this small patch. So I rolled back to master and cherry-picked only the last commit. After that I had to manually remove the old one since ./update.py doesn’t do this. And I committed the deletion with --amend.

Tested it by this command:

nix-shell -E 'let pkgs=import ~/dev/nix/nixpkgs {}; in pkgs.mkShell {buildInputs=[(import nix/apps/neovim.nix {inherit pkgs;})];}' --run 'nvim +NERDTree'

against my Neovim config: unclechu/neovimrc@2c40e11 where ~/dev/nix/nixpkgs is:

λ (cd ~/dev/nix/nixpkgs && git rev-parse @)
6b75695c9ade9363847217a3c6b781a273ca290a

@jonringer
Copy link
Contributor

The update commit is nice to have as vim plugins should be "as up to date as possible", but the diff looks fine

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Result of nixpkgs-review pr 97985 1

1 package built:
  • vimPlugins.nerdtree-git-plugin

@jonringer jonringer merged commit 68896cd into NixOS:master Sep 14, 2020
@unclechu
Copy link
Member Author

@johringer So next time I would keep all the updates of all Vim plugins? As ./udpated.py does it?

@unclechu unclechu deleted the update-vim-plugin-nerdtree-git-plugin branch September 14, 2020 17:18
@jonringer
Copy link
Contributor

yea, essentially the vim "add new plugins" section applies to new plugin additions https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/vim.section.md#adding-new-plugins-to-nixpkgs

@ilkecan
Copy link
Member

ilkecan commented Oct 31, 2020

Hi @jonringer , as @unclechu mentioned, nerdtree-git-plugin version released with nixos-20.09 is incompatible with the version of the main plugin, nerdtree. Shouldn't this change be backported to 20.09 to fix the issue?

@unclechu
Copy link
Member Author

unclechu commented Nov 2, 2020

@ilkecan Why do you think it’s incompatible? Works for me:
2020-11-02 23-08-36
My Neovim config (specific commit) with a pick of release-20.09 branch: unclechu/neovimrc@0212fda
Command I used to run my Neovim setup to test it:

nix-shell -E '(import <nixpkgs> {}).mkShell {buildInputs=[(import nix/apps/neovim.nix {})];}' --run nvim

@ilkecan
Copy link
Member

ilkecan commented Nov 3, 2020

Hi @unclechu , I am a nix newbie, so I might have misunderstood things. I am using the release-20.09 channel and it is still using the albfan fork. As you said in your initial post, it is very out of date and incompatible with the 'nerdtree' plugin in the same channel. I think this merge should fix the problem for the unstable channel, but the issue still persists for the 20.09 stable.

I was wondering, shouldn't we also apply this changes to the 'release-20.09' branch, to fix the issue in the latest stable channel. Because I would expect the packages in a stable channel to be compatible with each other.

@unclechu
Copy link
Member Author

unclechu commented Nov 5, 2020

@ilkecan Ah, you’re actually right. I just forgot I have my own override:
https://github.com/unclechu/neovimrc/blob/0212fda3509592d4ee10b166c13eff3070d68da2/nix/plugins.nix#L11-L17

@unclechu
Copy link
Member Author

unclechu commented Nov 5, 2020

@jonringer Any ideas when can this get to the stable release?

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

Successfully merging this pull request may close these issues.

None yet

4 participants