This is not backwards compatible with the old protocol, but I think it is worth it. Using JSON is much simpler instead of trying to understand a custom binary protocol.
https://github.com/vim/vim/pull/19782
(11 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 3 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 2 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 2 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 7 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 7 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 2 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman commented on this pull request.
> + if (mch_access((char *)buf, F_OK) != 0)
+ got = true;
+ else
+ {
+ emsg_silent++;
+ channel = channel_open_unix((char *)buf, NULL);
+ emsg_silent--;
+
+ if (channel != NULL)
+ {
+ channel_close(channel, false);
+ channel_clear(channel);
+ }
+ else
+ {
+ mch_remove(buf);
Fixed
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 2 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@pemensik Can you test if this PR fixes your issue? Thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 2 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Note: JSON has a binary alternative in standardized CBOR protocol. It might be better suited for some binary blobs exchange. It can even represent JSON.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 2 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Note: JSON has a binary alternative in standardized CBOR protocol. It might be better suited for some binary blobs exchange. It can even represent JSON.
Well there is no need to exchange binary blobs so JSON works fine
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 16 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 16 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 2 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra Would this PR be accepted/OK? Thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 20 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 22 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra just checking if you didn't see the previous comment
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 23 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 2 commits.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
Yes I think this makes sense, even so this would be slightly backwards compatible. But I doubt this is a problem in practice as I have mentioned before
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 27 commits.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
I think this is ready
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@64-bitman commented on this pull request.
> @@ -237,45 +241,51 @@ absolute or relative path. If the server id starts with either a "/" Otherwise the server id will be the filename of the socket which will be placed in the above common directories. Note that a server id/name can only contain slashes "/" if it is taken as a path, so names such as "abc/dir" will -be invalid. +be invalid. This feature is only available on Unix. + + *socketserver-address* +In addition, the socketserver can also be created as a |channel-address|. To +do this, prefix the address with "a/" (which will be ignored). This is
Any other way? Ths is the only I could think of while preserving support for the uppercase style server names
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman commented on this pull request.
> + }
+ else
+ {
+ vim_snprintf((char *)buf, MAXPATHL, "%s/vim", dir);
+ if (vim_mkdir(buf, 0700) == -1 && errno != EEXIST)
+ continue;
+
+ vim_snprintf((char *)buf, MAXPATHL, "%s/vim/%s", dir, name);
+ }
+
+ // If looking for a new socket path, and "buf" currently exists, check
+ // if it is a dead socket, if it is then remove it.
+ if (new)
+ {
+ emsg_silent++;
+ channel = channel_open_unix((char *)buf, NULL);
Im not sure how to catch it, without creating a bunch of code to speak the old protocol, which I don't think is worth it. Also it seems that this new protocol actually makes the Vim using old socketserver crash (segfault) when it tries to communicate with it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman commented on this pull request.
In src/main.c:
> else if (STRICMP(arg, "x11") == 0) clientserver_method = CLIENTSERVER_METHOD_X11; +# endif +# ifdef MSWIN + else if (STRICMP(arg, "mswin") == 0)
I've updated the manpages
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra commented on this pull request.
> @@ -237,45 +241,51 @@ absolute or relative path. If the server id starts with either a "/" Otherwise the server id will be the filename of the socket which will be placed in the above common directories. Note that a server id/name can only contain slashes "/" if it is taken as a path, so names such as "abc/dir" will -be invalid. +be invalid. This feature is only available on Unix. + + *socketserver-address* +In addition, the socketserver can also be created as a |channel-address|. To +do this, prefix the address with "a/" (which will be ignored). This is
How about we build on your suggestions and introduce the concept of a type: like this: servername [type:]server where type by default is the old legacy name, but we can also use channel to explicitly define a channel address?
vim --servername MYVIM # implicit: name:MYVIM
vim --servername name:MYVIM # explicit legacy mode
vim --servername channel:unix:/tmp/vim.sock
vim --servername channel:127.0.0.1:12345
That should be backwards compatible and makes the intent clearer.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()