-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
libs: vendor libmpack and libmpack-lua #15566
Conversation
5cc8d38
to
2d73054
Compare
…95728511f9525d29520a8c82
…e1d18e2e2d55f9fa53a6
This should be pretty much done as a MVP ( |
6881c0a
to
ad8eda3
Compare
The *vim.mpack* module provides packing and unpacking of lua objects to | ||
msgpack encoded strings. |vim.NIL| and |vim.empty_dict()| are supported. | ||
|
||
vim.mpack.pack({obj}) *vim.mpack.pack* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the "pack"/"unpack" a distinct concept from "encode"/"decode"? We have already msgpackparse
/msgpackdump
(Python convention) and json_ecode
/json_decode
.
If the distinction is not important it might make sense to call this vim.mpack.encode
/decode. Or perhaps from_lua
/to_lua
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it's not, I suspect msgpack libs always use "pack" and "unpack" as it rhymes with "msgpack". I don't think from_lua
and to_lua
makes sense as (1) lua is implied by the context of lua code (2) later we need the nouns such as the Packer and the Unpacker, where the Encoder/Decoder works if there's a strong preference to change it to that, though my honest opinion would be to err at the side of lazyness and keep the msgpack conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where the Encoder/Decoder works if there's a strong preference to change it to that, though my honest opinion would be to err at the side of lazyness and keep the msgpack conventions.
if you just want to avoid the chore, I am willing to do it :) Consistency (in the scope of our system) helps users a lot.
is it needed to do this now? marcos.h seems to encode nvim-specific desicions what c compilers we support, and it would make more sense to figure this out when extracting/upstreaming code later (if ever). |
`neovim`: - removed `lua51-mpack` as a dependency since it's [no longer required][0] - removed `libtermkey` as a dependency since it's [no longer required][1] [0]: neovim/neovim#15566 [1]: neovim/neovim#25870 `neovim-devel`: - removed `msgpack` as a dependency since it's [no longer required][2] - removed `libvterm` as a dependency since it's [no longer required][3] [2]: neovim/neovim#29540 [3]: neovim/neovim#30011 Also note that `neovim-devel` is not progressing passed 2024-08-31 until `utf8proc` sees its next release. Versions after this date will fail with a compile error due to a type mismatch. Fixes: https://trac.macports.org/ticket/70028
`neovim`: - removed `lua51-mpack` as a dependency since it's [no longer required][0] - removed `libtermkey` as a dependency since it's [no longer required][1] [0]: neovim/neovim#15566 [1]: neovim/neovim#25870 `neovim-devel`: - removed `msgpack` as a dependency since it's [no longer required][2] - removed `libvterm` as a dependency since it's [no longer required][3] [2]: neovim/neovim#29540 [3]: neovim/neovim#30011 Also note that `neovim-devel` is not progressing past 2024-08-31 until `utf8proc` sees its next release. Versions after this date will fail with a compile error due to a type mismatch. Fixes: https://trac.macports.org/ticket/70028
`neovim`: - removed `lua51-mpack` as a dependency since it's [no longer required][0] - removed `libtermkey` as a dependency since it's [no longer required][1] [0]: neovim/neovim#15566 [1]: neovim/neovim#25870 `neovim-devel`: - removed `msgpack` as a dependency since it's [no longer required][2] - removed `libvterm` as a dependency since it's [no longer required][3] [2]: neovim/neovim#29540 [3]: neovim/neovim#30011 Also note that `neovim-devel` is not progressing past 2024-08-31 until `utf8proc` sees its next release. Versions after this date will fail with a compile error due to a type mismatch. Fixes: https://trac.macports.org/ticket/70028
vim.mpack
for plugins Lua: expose mpack #15452Alternative: bundle these as separate cmake dependencies. This could be done but then someone must write the necessary cmake logic, and my suspicion is that these libs aren't used much outside neovim anyway (msgpack-c is the "official" c bindings).