6 ms·
> To install Zed on most Linux distributions, run the shell script below. This is not an acceptable way to install anything on Linux. If you want to target Lin
by AndyKelley 2y ago
> To install Zed on most Linux distributions, run the shell script below.
This is not an acceptable way to install anything on Linux. If you want to target Linux users you can't distribute with a shell script for installation.
I get that the idea is to reduce friction to installation and trying it out, but most Linux users - the ones you want filing bug reports anyway - are ones who will do due diligence and inspect the shell script to see what kind of opinions it makes about how to install the software.
For example, I see that the shell script downloads a tarball and unpacks it to `~/.local`, then tries to mess with my PATH variable.
Well, my local directory is `~/local`. So that's not where I want it. Actually, I would want it in `~/local/zed`, isolated from the rest of the installations in there. Then the PATH variable stuff just creates junk files since I don't use zsh. So I end up having to figure out the URL to the tarball and install it myself.
My point is that if you just listed the download link to the tarball, it would actually be closer to your own goal of reducing installation friction. The shell script is so much more friction because I have to read bash code instead of just clicking a download link.
- pkage 2y agoThis is a fairly common way to install tools on Linux. Tailscale, Homebrew, Pi-hole and many others offer installations in this way.
- AndyKelley 2y agoThe same criticisms apply to Tailscale, Homebrew, Pi-hole and all those others.
- usr942568903890 2y ago> The same criticisms apply to Tailscale No it doesn't. Tailscale's shell script is entirely optional and installs a distro/package manager specific package. It also doesn't mess with your PATH variable. They maintain packages for most popular distros as you can see here https://pkgs.tailscale.com/stable/ https://pkgs.tailscale.com/stable/. The sibling comments are just spreading misinformation because those people were too lazy to actually look anything up.
- lagniappe 2y agoNot an argument.
- nicce 2y agoWhile it is fairly common way, it does not mean that it is good way.
- hypeatei 2y ago> you can't distribute with a shell script for installation Why not? It worked for me.
- drdaeman 2y agoThere are two schools of thought. One strives for correctness, even if that requires extra effort. Another is "anything goes as long as it somehow kind of works more than it doesn't." (Actually it's most probably a spectrum rather than a binary division, but I'm no philosopher or sociologist, so for example's sake I'll operate with this simplified model here.) The world en masse is generally preferring the latter (picking the easiest solutions, no matter how shitty they are - that's how we ended up with what we have today*), but among the engineers there are a significant number of people who believe that's how things should be. There are numerous issues with copying and pasting `curl | bash` invocations from random webpages: all sorts of potential security issues, the installed software (if it works) could be installed in a way different from how your OS/distribution does things (or from your personal preferences), leading to all sorts of future issues, etc etc. Someone probably has a good write-up on this already. But - yeah - on the other hand, it works for number of people. ___ *) And, of course, the opinions if what we have today is "good progress" or "unbearable crap" also vary.
- RamRodification 2y ago>There are two schools of thought. One strives for correctness, even if that requires extra effort. Another is "anything goes as long as it somehow kind of works more than it doesn't." ... The world en masse is generally preferring the latter (picking the easiest solutions, no matter how shitty they are - that's how we ended up with what we have today), but among the engineers there are a significant number of people who believe that's how things should be.* I often have trouble articulating this at work. I will steal this and use something like it when advocating for correctness as opposed to shitty short sighted solutions. Thanks
- TiredOfLife 2y agoHere is .tar for correct way: https://zed.dev/api/releases/stable/latest/zed-linux-x86_64.tar.gz https://zed.dev/api/releases/stable/latest/zed-linux-x86_64.... And here is even more correct one: https://zed.dev/docs/development/linux https://zed.dev/docs/development/linux
- igorguerrero 2y agoIt's on NixOS and Arch I'm sure you just wait a little to get it on your Distro... I don't think they have bad intentions.
- nmstoker 2y agoI agree they probably don't have bad intentions. But other options still seen better than the one liner. Even just as a two liner leaves people a copy of what they ran if something goes awry.
- odo1242 2y agoSee https://zed.dev/docs/linux#other-ways-to-install-zed-on-linux https://zed.dev/docs/linux#other-ways-to-install-zed-on-linu... for distro packages.
- LocalGauge 2y agoThis also includes the link to the tar files, so, you dont need to read the bash file to download tar file. The ones who are interested in this issue will spot this page, anyways. Maybe, they can make it more convenient for visitors to check this page.
- vanviegen 2y agoThis comes across as rather entitled. They offer an easy installation path that works for most people. They also went out of their way to provide alternative installation methods and instructions [1]. All while gifting you and the world free and open source software. [1] https://zed.dev/docs/linux https://zed.dev/docs/linux
- AndyKelley 2y agoMy interest is not in using this text editor as a consumer, but in guiding software development culture in general, particularly when it comes to installation of Linux applications. Some talks I have given on this topic: https://www.youtube.com/watch?v=pq1XqP4-qOo https://www.youtube.com/watch?v=pq1XqP4-qOo https://www.youtube.com/watch?v=CwXixVcliP0 https://www.youtube.com/watch?v=CwXixVcliP0 So, I think "entitled" is the wrong insult. "arrogant" would be more accurate.
- jayde2767 2y ago"Opinionated" is more appropriate. Ignorance often accompanies arrogance. Opinion, to me, at least contains a degree of knowledge.
- jarule 2y agoYou've dedicated your adult life to massaging ABIs and openly admit your "non-polished" solution is an idealistic holy grail, and yet you expect some text editor with a non-existent path to profitability to have hewn to your every private thought about Linux binary versatility, and that sir is bullshit.
- maxbrunsfeld 2y agoAs a point of clarification, the script does not edit your zshrc file, it just prints a suggested edit that you may want to make to that file in order to add zed to your PATH.
- NormenKD 2y agoThey aren't happy with this, either: "[...]And of course, the journey isn't over yet-we'd love your help, particularly if you're excited about: - Helping bring Zed to your distro. Either by packaging Zed or by making Zed work the way it should in your environment (we know many people want to manage language servers by themselves).[...]" Give them a hand ;) https://zed.dev/docs/development/linux#notes-for-packaging-zed https://zed.dev/docs/development/linux#notes-for-packaging-z...
- AndyKelley 2y agoI sympathize with the situation that Zed developers are in. They are thinking of the user experience first and foremost, and when trying to distribute on Linux, faced with an overgrown, chaotic landscape that utterly fails to provide the basic needs of application developers, such as the ability to distribute a binary that has no dependencies on any one particular distribution and can open a window and interact with the graphics driver, or the ability to require permissions from the user to do certain things. I do think that my work contributes to help with this use case. Looking elsewhere on this thread I see that they are having problems fetching and running a nodejs binary successfully. Fortunately, nodejs is a piece of software that can be built and distributed statically. I have not packaged up this one in such a manner but I have done a proof of concept with CPython: https://github.com/allyourcodebase/cpython https://github.com/allyourcodebase/cpython That said, if they want to allow users to install Zed through a system package manager, they will need to cooperate with the system and rely on system nodejs instead of trying to fetch it at runtime. Fetching and running software at runtime is fundamentally incompatible with the core mission of Linux distributions (curation, vetting, and compatibility patching of all software that is to be run on the system).
- logicprog 2y ago> I sympathize with the situation that Zed developers are in. They are thinking of the user experience first and foremost, and when trying to distribute on Linux, faced with an overgrown, chaotic landscape that utterly fails to provide the basic needs of application developers, such as the ability to distribute a binary that has no dependencies on any one particular distribution and can open a window and interact with the graphics driver, or the ability to require permissions from the user to do certain things. But Linux does provide a very simple and easy way to do this — Flatpaks. They're completely distro-independent, allow you to package up and distribute exactly the dependencies and environment your program needs to run with no distro maintainers fucking with it, allow you to request permission to talk to the graphics drivers and anything else you need, and you can build it and distribute it directly yourself without having to go through a million middlemen. It's pretty widely used and popular, and has made the silent majority of Linux users' lives much better, although there's a minority of grognards that complain endlessly about increased disk usage.
- charles_f 2y agoHonestly, I still take that as an improvement over having to recompile it
- agilob 2y ago>This is not an acceptable way to install anything on Linux. If you think this is not acceptable, check out what they did last week: https://news.ycombinator.com/item?id=40902826 https://news.ycombinator.com/item?id=40902826
- DEADMINCE 2y ago> Well, my local directory is `~/local`. So that's not where I want it. You can just move it after. .local is different from local so there is no clash.
- janalsncm 2y agoI disagree. I’m on Linux for my main installation and I know I can inspect the bash script if I want to. It’s impossible to please everyone. Pipe to sh is simple, transparent, and easy to do. If reading through 200 lines of installation script is too much then reading through thousands of lines of Zed’s code base will certainly be too much. They also list other ways of installing https://zed.dev/docs/linux https://zed.dev/docs/linux
- deadbunny 2y ago> Pipe to sh is simple, transparent Not so transparent[1]. Packages from a package repo are signed, usually with keys not stored on the same server so if someone nefarious breached a server they can easily replace a bash script, they can't re-sign and replace a package. Sure it's safe if you download the script then review it then install it, but hey, you reviewed it last time, it's probably unchanged, what's the harm of piping it directly to bash next time you need to get set https://web.archive.org/web/20240228190305/https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/ https://web.archive.org/web/20240228190305/https://www.idont...
- the_duke 2y ago> This is not an acceptable way to install anything on Linux You might want to tell the rest of the software world how unnacceptable it is, because a huge amount of software, and especially dev tooling, is installed in this exact way. It's especially hard for young or fast moving projects, most distro packaging just isn't very compatible with this velocity. I'm personally on NixOS , which usually makes it easy to always get the latest and greatest, but eg would I really want to add a third party apt repository for Zed, which introduces complications and also can make changes to my whole system, rather than just having zed install itself in a local user-owned directory? I don't want to end up with 15 different third party apt repositories... adding those actually provides a higher amount of trust than shell scripts that only run with user permissions. And there are similar considerations for most other distros. Arch is probably the only other one, next to nix, where it's quite easy to stay up to date. (zed is already an official Arch package, btw, and before that it already was in aur, and of course it is in nixpkgs already) It's not ideal, but whenever some pattern propagates across the ecosystem, there are probably valid reasons why.
- Palomides 2y ago>I don't want to end up with 15 different third party apt repositories I would love to add 15 different third party apt repositories, I wish more projects used them, you're running whatever binary they give you anyway I guess this is just another example of how hard it is to please all linux users!
- the_duke 2y agoRunning a binary in userspace is quite different from giving a third party unconstrained root access to your system though. To be fair though, with the lack of security and isolation on Linux a malicious binary can already do a huge amount of damage.
- correct-horse 2y agoAlmost 70% of the male population in my country smokes. Should I take up smoking because everybody else does it?
- logicprog 2y agoMy question is why they didn't just make a Flatpak. Then they and their users wouldn't need to go through any of this hassle and distro fragmentation at all. Even if they didn't want to publish it on Flathub, Flatpak supports single file packages people can directly install as well.
- insane_dreamer 2y agoBecause then you have a dozen other people who say "why didn't they just make a ___"
- logicprog 2y agoBut that's literally already true, and at least with Flatpak they'd only need to make a single package to support all distributions and system configurations, whereas what they're already doing is supporting 15 different packaging systems and distributing a fragile install script that more people will have problems with. So this objection makes literally zero sense.
- figomore 2y agoThere is already some support to flatpak, but it's not distributed on flathub yet. You have to build by yourself https://github.com/zed-industries/zed/blob/main/docs/src/development/linux.md#flatpak https://github.com/zed-industries/zed/blob/main/docs/src/dev...
- logicprog 2y agoWere they not aware of `flatpak build-bundle`? They could have just built it once and ran that command on the result and then put that on the archives of their repository and been done with it. It's not like a regular package build where there are different system conditions to keep an eye on. It would work no matter what.
- kelnos 2y agoFlatpak is just yet another form of fragmentation though.
- usr942568903890 2y ago> My point is that if you just listed the download link to the tarball, it would actually be closer to your own goal of reducing installation friction. The shell script is so much more friction because I have to read bash code instead of just clicking a download link. It's there https://zed.dev/docs/linux#downloading-manually https://zed.dev/docs/linux#downloading-manually, it just doesn't show up as the default installation method.
- deleted 2y ago[deleted]