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
fix:! Don't fork by default #2512
fix:! Don't fork by default #2512
Conversation
And, never when a tty is not attached.
355a08b
to
7a8c398
Compare
I'm going to merge this to get more feedback before the release. |
is there an idiomatic way to handle this on OSX? maybe @halostatue knows? ie like what does macvim do so on the command line it forks? |
@9mm, I think the idiomatic way of doing it would be to provide multiple entry points in the homebrew scripts like |
@9mm, I think it should be |
something definitely weird, this will take more time to look into |
i did find their binary here as well: https://github.com/macvim-dev/macvim/blob/master/src/MacVim/mvim |
@falcucci, do you have any ideas? For me on Linux the cd command works correctly. |
This change will prevent me from using neovide unless and until neovide starts providing its own |
@halostatue, if you really want it to fork by default you can set the environment variable As discussed in #2147, programs that fork are the exception, not the rule. Even pure GUI applications like |
And I don't want to maintain and tie any homebrew scripts to the release cycle of Neovide. They are totally independent and should be maintained elsewhere. We could consider a separate repository for it, if someone volunteers to maintain it. |
I don’t particularly care whether Neovide forks by default or not. I do care that, if there is a
I don't think you should, either. But that is different than what I have said. The fact that Homebrew provides a script is a distraction. If Neovide can be run with just If such a script were part of upstream (that is, neovide itself), I would consider look at making and maintaining a MacPorts port for Neovide (I am trying to reduce my Homebrew install to a few casks and fonts). But I’m not going to create and maintain such a script myself, and I’ll just not use Neovide if your answer is ultimately that such a launcher script is outside of neovide's responsibility, because we disagree on that. |
The Neovide command is not provided by us, we only provide |
And that is what I am saying is where Neovide is not delivering a whole experience. The Visual Studio Code provides their launch script in the The fact that the neovide team does not provide a workable macOS launch script and has allowed Homebrew maintainers to create a substandard launch script that does not provide a quality experience is immaterial to most people who will install Neovide via Homebrew. You’ll get the bug reports and you have an opportunity to improve that experience by providing a launch script in your As I said, I have too many commitments to other things to want to bother creating and maintaining such a script. But if Neovide does create such a script (and there are good examples from MacVim and VS Code that can be adapted) and include it in your bundle, I’ll take on the much lighter-weight commitment of making a MacPorts port for neovide. I don’t want Neovide through Homebrew. I want to be able to install Neovide either by downloading the ‡ MacPorts prefers source builds over downloading compiled binaries. |
Please try to remember that "the neovide team" is effectively 2 or 3 people at any given time who donate what time they can to the project for free. |
Yes agree, that was painful to read. Enough with all the italicized words my man. So @fredizzimo I don't quite understand the "solution", or tbh if there is even a problem. I agree that homebrew shouldn't really have anything to do with the release cycle. Are you saying a potential solution is to have a binary handle launching, similar to macvim? The one I linked above was the only one I found. I also looked inside their Whatever the answer is, I've just been writing my own script anyway to launch neovide, but it would be cool if it were a part of neovide itself. |
@fredizzimo i see the issue now why my script stopped working. I dont understand this, and I know this isnt a bash supprt help issue, but... can you think of some reason why my A simplified version of my script:
Will actually not fork, yet this will, if ran straight from command line:
|
@9mm, I don't really know what's being asked for either. But here's my attempt to explain, how I think it should work. There can be several entrypoints in homebrew, and they can launch scripts and add command line arguments and so on. For example, mvim declares the following executables: Then the script matches against the executable name to disable or enable forking depending on which executable you launch. Additionally, the script adds some parameters to some of the other modes This means that if you launch it through Since both the homebrew formulae and the script need to be in sync, it only makes sense to include it there. For usage outside of homebrew, which I consider advanced use cases, then the user can create the required scripts themselves. Or define |
@9mm, I will check if there's some bug with the environment variable parsing or something |
Sorry I hit enter too soon, but went back and edited. It seems it works if its on the same line of the command, but not if its in a bash script with export. I feel like I am just making a dumb mistake. i do know it used to work though |
@9mm, I see it's this condition in the code: // Never fork unless a tty is attached
if !settings.fork || !utils::is_tty() {
return;
} And because your script uses redirection |
Ahh... I see. Ok Ill try to figure out a better way to do it. Thank you! |
I think you can remove the |
My request is simple: stop relying on Homebrew to provide a macOS launcher script. The Homebrew script is not correct. Whether you like it or not, when people install neovide they expect that you are responsible for the installed programs. Neovide should be providing this launcher script like VS Code and MacVim do. |
* Don't fork by default And, never when a tty is not attached. * Update the documentation
What kind of change does this PR introduce?
Based on discussion here, we should change the defaults to not fork, so this is done here.
Additionally, this prevents any attempts to fork when a terminal isn't attached, since that would have no effect.
Did this PR introduce a breaking change?
A breaking change includes anything that breaks backwards compatibility either at compile or run time.