Skip to content
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

Signals (inter-instance communication) #825

Closed

Conversation

savetheclocktower
Copy link
Contributor

@savetheclocktower savetheclocktower commented Dec 6, 2023

Fixes #822.

Description of the Change

Implements a simplified API for one window to send a signal to all windows, optionally including itself. (#822 explores scenarios where this could be needed.) We use the main process to act as a broker.

Alternate Designs

I started out envisioning that this would combine reactivity and storage, much like atom.config. But we can already use localStorage for the storage side, and I didn’t feel like reimplementing the whole thing when what’s most urgently needed is the signaling.

Possible Drawbacks

I can’t really think of any. This is a pretty thin layer over Electron’s built-in tools for communicating between the main process and the individual renderer processes.

Verification Process

None yet! This PR is in draft mode while I figure out exactly how I’m gonna test this thing.

Release Notes

  • Added atom.signal, an API for sending messages between different Pulsar windows.

* Destructured variable assignments are now scoped as `variable`
* Namespaced decorators are now highlighted properly
…when some amount of text is deleted at the beginning of a file.

When this happens, the “affected range” of the buffer is an empty range from (0, 0) to (0, 0). Tree-sitter's `descendantsOfType` function incorrectly returns results when querying this specific range, so we'll sidestep this by explicitly returning early whenever the affected range is empty instead of trying to (re-)populate injections for a range that can't have any.
@savetheclocktower savetheclocktower changed the title Signals (inter-instance communication Signals (inter-instance communication) Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sharing values across Pulsar windows
1 participant