macvim-dev / macvim-dev/macvim

Investigate moving away from DO (Distributed Object) as IPC mechanism

Open
#1,157 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Deprecated Technology Investigation IPC
Dominant language
Vim Script
Stars
7.9k
Forks
691
PR merge metrics
No merged PRs in 30d

Description

MacVim currently uses Distributed Object as a way to communicate between individual Vim processes and MacVim but it's long been deprecated by Apple. See https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/DistrObjects/DistrObjects.html. As such, all usages of NSConnection are currently throwing deprecation warning.

Instead, Apple's preferred APIs are the XPC system: https://developer.apple.com/documentation/xpc

We should investigate whether to move off DO to either Apple's XPC or another IPC mechanism (for example, Neovim has its own IPC mechanism via msgpack). Since the DO implementation is the underlying system that we talks between MacVim GUI and Vim process, and there are a few quirks and back-and-forth messaging, we should make sure it keeps working (some edge cases includes window resizing with/without guioption-k, fullscreen, input, etc), and latency won't be affected as a result.

Also, occasionally we see error messages with DO (#1005), and I have seen issues with running unit tests locally if I have certain settings that seem to stem from DO init race connection, so hopefully we can eliminate those as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing NSConnection and Distributed Object usage between the MacVim GUI and Vim process. Read Apple's XPC documentation and compare it with the alternative IPC approach mentioned in the issue. Done means identifying a viable replacement and validating communication, window resizing, fullscreen, input, latency, and the reported connection errors and test races.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
desktop, operating-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.