mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 21:32:40 +00:00
Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ca2eb275de
Closes #10782 In some cases, during the auto-update process, the update can fail and leave a dangling disk image in macOS. If the auto-update fails again, a new dangling mounted volume will be left behind. To avoid polluting the system with these dangling mounted disk images, implement [the `Drop` trait](https://doc.rust-lang.org/std/ops/trait.Drop.html) for the `MacOSUnmounter` struct. This will ensure that the disk image is unmounted when the `install_release_macos` function exits regardless of its result. ## How to test this locally Unfortunately, I was a bit too lazy to find a smarter way to test this, so I simply commented out a bunch of lines to emulate the auto-update process. To replicate the linked issue (#10782), you can apply the attached patch. Build the Zed binary and run it. The auto-update should fail, leaving the dangling mounted disk image in the system: ```shell >diskutil list /dev/disk5 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +220.6 MB disk5 Physical Store disk4s1 1: APFS Volume Zed 190.6 MB disk5s1 ``` Run the Zed binary again to create another mounted disk image: ```shell >diskutil list /dev/disk5 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +220.6 MB disk5 Physical Store disk4s1 1: APFS Volume Zed 190.6 MB disk5s1 /dev/disk7 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +220.6 MB disk7 Physical Store disk6s1 1: APFS Volume Zed 190.6 MB disk7s1 ``` [simulate_zed_autoupdate.patch](https://github.com/user-attachments/files/16787955/simulate_zed_autoupdate.patch) Please let me know if the fix is good; otherwise, I am happy to implement it differently. Thanks! Release Notes: - Fixed #10782 |
||
---|---|---|
.cargo | ||
.cloudflare | ||
.config | ||
.github | ||
.zed | ||
assets | ||
crates | ||
docs | ||
extensions | ||
legal | ||
nix | ||
script | ||
tooling/xtask | ||
.dockerignore | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
Cargo.lock | ||
Cargo.toml | ||
CODE_OF_CONDUCT.md | ||
compose.yml | ||
CONTRIBUTING.md | ||
debug.plist | ||
default.nix | ||
docker-compose.sql | ||
Dockerfile | ||
flake.lock | ||
flake.nix | ||
LICENSE-AGPL | ||
LICENSE-APACHE | ||
LICENSE-GPL | ||
livekit.yaml | ||
Procfile | ||
Procfile.postgrest | ||
README.md | ||
renovate.json | ||
rust-toolchain.toml | ||
shell.nix | ||
typos.toml |
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS and Linux you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Windows (tracking issue)
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about
to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specified
error for a crate you've created? If so, addpublish = false
under[package]
in your crate's Cargo.toml. - Is the error
failed to satisfy license requirements
for a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theaccepted
array inscript/licenses/zed-licenses.toml
. - Is
cargo-about
unable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml
, as specified in the cargo-about book.