Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Hidden state with vim_configurable package #220

Closed
Davorak opened this Issue Dec 17, 2012 · 4 comments

Comments

Projects
None yet
3 participants
Contributor

Davorak commented Dec 17, 2012

What I expected:
I installed vim_configurable and I should have expected python to work arrording shlevy it is on by default.

What I got:
What I got was pythong did not work either :python print "hi" or plugins that needed python.

What I expected:
After getting python working by adding vim.python=true; to .nixpkgs/config.nix. I expected removing vim.python=true; would remove vim's access to python after nix-env -i vim_configurable.

What I got:
Vim still had access to python.

The step below demonstrate the above and an additional difference between my nixos 1.1pre2714... and nix 1.1 on ubuntu.

Nixpkgs "remembers" vim.python=true; after it is removed form .nixpkgs/config.nix

Reproduced in NixOS on VMware and nix on Ubuntu:
Each invocation of vim happens in a new shell created after the nix-env install is finished.

  • nix-env -i vim_configurable.
    ** Vim can not access python test by :python print "Hi" in vim. Should result in error.
  • Add vim.python=true; to .nixpkgs/config.nix
  • nix-env -i vim_configurable.
    ** Vim can now access python test by :python print "Hi" in vim.
  • nix-env -e vim_configurable.
  • Remove vim.python-true; in .nixpkgs/config.nix
  • nix-env -i vim_configurable
    ** Vim can still access python test by :python print "Hi" in vim.
  • Add vim.python=false; to .nixpkgs/config.nix
  • nix-env -i vim_configurable.
    ** Vim can not access python test by :python print "Hi" in vim. -> "Sorry, the command is not available in this version
  • remove vim.python=false; in .nixpkgs/config.nix
  • nix-env -i vim_configurable.
    ** :python print "Hi" in vim. ->
    (ubuntu nix 1.0: vim crashes and gives error report)
    (nixos 1.1pre2714_2f3f413: vim has acces to python)
  • Add vim.python=true; to .nixpkgs/config.nix
  • nix-env -i vim_configurable.
    ** :python print "Hi" in vim. ->
    (ubuntu nix 1.0: vim crashes and gives error report)
    (nixos 1.1pre2714_2f3f413: vim has acces to python)

There is some some state that is saved in-between installs which seems undesirable.

Member

shlevy commented Dec 17, 2012

There's something strange happening here, but I don't think it's due to vim.python (and it's definitely not due to nixpkgs config being saved somewhere). https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/configurable.nix#L49 has: pythonSupport = config.vim.python or true;, which means that if vim.python is not set it defaults to true. Perhaps vim_configurable needs some other flag for python support to be on? @MarcWeber ?

I'll try to reproduce this later.

@ghost ghost assigned shlevy Dec 17, 2012

Contributor

Davorak commented Dec 17, 2012

I will document here as I did on irc that I could not get my test of :python print "hi", or a pandoc extension that called on python, to work before either adding "python" to the flags in all-packages or setting vim.python=true; in .nixpkgs/config.nix. on nixos 1.1pre2714... or on my ubuntu nix 1.1 install.

Member

shlevy commented Mar 9, 2013

@Davorak Do I remember correctly that we resolved this?

Contributor

Davorak commented Mar 9, 2013

The symptom has been resolved with this merge:

#218

There is still probably an under lying problem/issue. I don't know if it is
worth keeping open though.

On Fri, Mar 8, 2013 at 6:39 PM, Shea Levy notifications@github.com wrote:

@Davorak https://github.com/Davorak Do I remember correctly that we
resolved this?


Reply to this email directly or view it on GitHubhttps://github.com/NixOS/nixpkgs/issues/220#issuecomment-14654262
.

Patrick Wheeler
Patrick.John.Wheeler@gmail.com
Patrick.J.Wheeler@rice.edu
Patrick.Wheeler@colorado.edu

@bjornfor bjornfor closed this Jul 18, 2013

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