Add a Setting for Zed lake service listening address #3116
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background is in #1105.
I adopted some naming conventions from the Zed CLI tooling.
i.e., I'm referring to the optional listening address portion as "addr".
The following video shows the feature in action such that the
zed serve
is launched with-l localhost:9867
by default and just-l :9867
when the setting is changed. I've also confirmed via the separate Zui running on my Windows laptop on the same LAN that changing the setting determines whether I can remotely access the lake behind my Macbook's Zui or not.Demo.mp4
As the video shows, right now the app needs to be exited and restarted for the change to have effect, since
zed serve
is launched at startup time. @jameskerr and I discussed an early draft of this change and how we could take an approach similar to what we did with the "watch" functionality in #3049 such that when this setting is changed we immediately stop the launched lake service and restart it with the new settings. However, @jameskerr recognized that some code will probably need to be moved around to make that possible/clean and that exceeds my current skills, so I'll leave it to him to push commits to enable that functionality, if possible.Closes #1105