rogual / neovim-dot-app

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

Compatability for msgpack-c 2.0 #272

Closed jrolfs closed 8 years ago

jrolfs commented 8 years ago

The current version of msgpack on Homebrew is now 2.0 which deprecates the unpack API used in this project. This pull request updates the calls to the reference version of the API.

I noticed this when I was no longer able to build from source on OS X after upgrading msgpack via Homebrew.

See: Changelog and Commit

jrolfs commented 8 years ago

For the record, I tried on another machine and this branch still compiles fine against msgpack-c 1.4.1

r3bo0t commented 8 years ago

Any plans for merging this commit to master, as this seems to be working?

vinitkumar commented 8 years ago

Please merge this. Else build is broken.

stewartpark commented 8 years ago

If this PR fixes the problem below, we should definitely merge this.

$ brew install neovim-dot-app
==> Installing neovim-dot-app from rogual/neovim-dot-app
==> Downloading https://github.com/rogual/neovim-dot-app/archive/0.1.4.tar.gz
Already downloaded: /Users/stewart/Library/Caches/Homebrew/neovim-dot-app-0.1.4.tar.gz
==> make NVIM=/usr/local/opt/neovim/bin/nvim
Last 15 lines from /Users/stewart/Library/Logs/Homebrew/neovim-dot-app/01.make:
WARNING: Could not determine exact Neovim version. If your Neovim is not up to date, there may be incompatibilities.
Install file: "res/Info.plist" as "build/Neovim.app/Contents/Info.plist"
clang++ -o build/client.o -c -std=c++11 -stdlib=libc++ -g -Wno-deprecated-register -I/usr/local/Cellar/msgpack/2.0.0/include -Ibuild -Isrc src/client.cc
src/client.cc:48:20: error: no matching member function for call to 'next'
    while(unpacker.next(&unpacked)) {
          ~~~~~~~~~^~~~
/usr/local/Cellar/msgpack/2.0.0/include/msgpack/v2/unpack.hpp:1335:23: note: candidate function not viable: no known conversion from 'msgpack::unpacked *' (aka 'msgpack::v1::object_handle *') to 'msgpack::object_handle &' for 1st argument; remove &
inline bool unpacker::next(msgpack::object_handle& result) {
                      ^
/usr/local/Cellar/msgpack/2.0.0/include/msgpack/v2/unpack.hpp:1320:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline bool unpacker::next(msgpack::object_handle& result, bool& referenced) {
                      ^
1 error generated.
scons: *** [build/client.o] Error 1
make: *** [all] Error 2

EDIT: Also confirmed that this PR builds fine on my Mac OSX and homebrew setup. Thank you @jrolfs

rogual commented 8 years ago

Sorry I took so long to merge this — I was on holiday.

Since this project is getting popular I will look at giving some other contributors merge rights.

jrolfs commented 8 years ago

Thanks! Happy you were able to take a break :)