rogual / neovim-dot-app

Mac OS X GUI for Neovim
1.13k stars 62 forks source link

needs to be rebuilt after neovim upgrade #210

Closed hakamadare closed 8 years ago

hakamadare commented 8 years ago

After an upgrade to the neovim Homebrew recipe, Neovim.app still shows the previous version of Neovim in the output of :version. Uninstalling and reinstalling neovim-dot-app brings the internal Neovim up to date.

rogual commented 8 years ago

Correct. Is this a problem?

Edit: To expand on this a bit, I'm treating the neovim project like any other dependency: if you update the dependency, you need to rebuild the app.

PixelPirate commented 8 years ago

I think I encountered the same, but I'm not quite sure what the right course of action is.

→ pA ⚡ brew install --HEAD neovim-dot-app
==> Installing neovim-dot-app from rogual/neovim-dot-app
==> Cloning https://github.com/rogual/neovim-dot-app.git
Updating /Library/Caches/Homebrew/neovim-dot-app--git
==> Checking out branch master
==> make NVIM=/usr/local/opt/neovim/bin/nvim
Last 15 lines from /Users/pA/Library/Logs/Homebrew/neovim-dot-app/01.make:
2016-02-16 12:22:13 +0100

make
NVIM=/usr/local/opt/neovim/bin/nvim

VIM= NVIM=/usr/local/opt/neovim/bin/nvim scons -Q
Please set VIM to Neovim's $VIM directory.
make: *** [all] Error 255
hakamadare commented 8 years ago

@rogual: It's only a problem because Homebrew doesn't automatically perform the rebuild for me :) I've looked through the documentation for specifying dependencies and I'm not sure how to make this work, other than to keep neovim-dot-app and neovim package versions in lockstep with neovim-dot-app depending on a specific version of neovim, and that sounds like a lot of work.

@PixelPirate: try brew remove neovim-dot-app && brew install --HEAD neovim-dot-app, that worked for me.

rogual commented 8 years ago

I suppose we could add a build option that makes neovim.app use your own installed neovim binary rather than using its own copy. I'd merge a PR that did that.

PixelPirate commented 8 years ago

Removing and installing again did not help my case. Are there any files created by homebrew that I should remove manually?

rogual commented 8 years ago

@PixelPirate it looks like maybe nvim isn't on your PATH. The Makefile needs to be able to find nvim to ask it where its runtime directory is.

PixelPirate commented 8 years ago
→ pA ⚡ which nvim
/usr/local/bin/nvim
→ pA ⚡ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Looks good to me, I installed neovim via brew reinstall neovim --HEAD

rogual commented 8 years ago

Difficult to diagonse without knowing your environment. What's supposed to happen is the Makefile finds your nvim and uses that to set the environment vars VIM (vim runtime dir) and NVIM (nvim binary), which the SCons script uses during build.

From your output the VIM var isn't getting set though, now I look again, the NVIM is, so nvim must be on your path (sorry). I can't investigate this right now but I hope this info can point you in the right direction.

PixelPirate commented 8 years ago

Thanks for your help so far, I solved it doing export VIM=/usr/local/bin/vim before brew install neovim-dot-app --HEAD

Looking at the makefile: https://github.com/rogual/neovim-dot-app/blob/097ea8d5a1c5e8e1664f3b1d40d80f89936ea218/Makefile#L4

VIM?=$(shell $(NVIM) --version | grep 'fall-back' | cut -d '"' -f 2)

seems to fail for me, because nvim --version does not contain the string "fall-back". Since I'm just installing the current HEAD of neovim, I'm wondering how anybody else could have "fall-back" in there?

rogual commented 8 years ago

Grepping for “fall-back” seemed to be the easiest way to ask nvim for its runtime dir. If it's not consistent across installations I'll have to find another way.

I just updated my neovim and my output from --version is:

$ nvim --version
NVIM v0.1.3-100-g5af9ae9
Build type: Dev
Compilation: /usr/local/Library/ENV/4.3/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim20160216-15049-xdk10i/build/config -I/tmp/neovim20160216-15049-xdk10i/src -I/tmp/neovim20160216-15049-xdk10i/deps-build/usr/include -I/tmp/neovim20160216-15049-xdk10i/deps-build/usr/include -I/tmp/neovim20160216-15049-xdk10i/deps-build/usr/include/luajit-2.0 -I/tmp/neovim20160216-15049-xdk10i/deps-build/usr/include -I/tmp/neovim20160216-15049-xdk10i/deps-build/usr/include -I/tmp/neovim20160216-15049-xdk10i/deps-build/usr/include -I/tmp/neovim20160216-15049-xdk10i/deps-build/usr/include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim20160216-15049-xdk10i/build/src/nvim/auto -I/tmp/neovim20160216-15049-xdk10i/build/include
Compiled by me@Robins-MacBook-Pro.local

Optional features included (+) or not (-): +acl   +iconv    +jemalloc 
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/HEAD/share/nvim"

Could you post yours?

PixelPirate commented 8 years ago

hahahaha, I see. The output is localized on my system. The last two lines read

          System-vimrc-Datei: "$VIM/sysinit.vim"
     Voreinstellung für $VIM: "/usr/local/Cellar/neovim/HEAD/share/nvim"
rogual commented 8 years ago

LOL! Oh dear. OK, I suppose I will fix this somehow.

PixelPirate commented 8 years ago

But the localized output must be a new thing from neovim, I used Neovim.app for quite a while now and this build error just came up recently.

rogual commented 8 years ago

https://github.com/rogual/neovim-dot-app/issues/212

PixelPirate commented 8 years ago

👍

mikew commented 8 years ago

Edit: To expand on this a bit, I'm treating the neovim project like any other dependency: if you update the dependency, you need to rebuild the app.

I'm just curious as to why Neovim.app does this? No other neovim clients seem to, and after stripping those parts out (and removing the re-loading of $MYVIMRC), Neovim.app still works just the same.

rogual commented 8 years ago

I guess Neovim.app is more of a NeoVim “distribution” than a client. That is, it's an .app bundle, you run it, you get Neovim.

As for the reloading of $MYVIMRC, it's possible that isn't necessary anymore — I did notice some work on that area in Neovim upstream.

mikew commented 8 years ago

Yeah I thought about it some more after making this comment and it makes sense. Especially if you want to get Neovim.app into the MAS. I guess what I'd like is the ability to specify the $VIM and path to nvim binary at runtime, that way people could use their own build if they want, without having to rebuild Neovim.app.

I've got a branch that removes the need for so $MYVIMRC, but since it calls nvim -u it prevents people from specifying their own, so I didn't submit a PR.