Commit graph

549 commits

Author SHA1 Message Date
Michael Sloan
ac8220bb2e
Overwrite gzip output without prompting in bundling scripts (#23340)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Linux x86_x64 release bundle (push) Blocked by required conditions
CI / Linux arm64 release bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Release Notes:

- N/A
2025-01-18 22:30:50 +00:00
Peter Tripp
a2385eb0fc
issues: Add new core label 'discussion' (#23304)
Release Notes:

- N/A
2025-01-17 17:10:16 -05:00
张小白
70db427fc8
windows: Make collab run on Windows (#23117)
I’ve also updated the documentation in
`development\local-collaboration.md` and
`docs\src\development\windows.md`.

Testing collab on my Windows machine:

![屏幕截图 2025-01-14
162021](https://github.com/user-attachments/assets/28b4a36a-e156-4012-981a-5d0a23dcc613)


Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2025-01-17 09:39:13 +02:00
Mikhail Filippov
614eaec278
Add mold dependency to fix build on Ubuntu 24.10 (#23230)
Co-authored-by: Peter Tripp <peter@zed.dev>
2025-01-16 13:43:47 -05:00
Marshall Bowers
3af09bbae1
ci: Remove zero-width whitespace in job name (#23238)
This PR removes some zero-width whitespace characters from one of the CI
job names.

Release Notes:

- N/A
2025-01-16 14:50:40 +00:00
Cole Miller
a41d72ee81
Represent git statuses more faithfully (#23082)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Linux x86_x64 release bundle (push) Blocked by required conditions
CI / Linux arm64 release bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
First, parse the output of `git status --porcelain=v1` into a
representation that can handle the full "grammar" and doesn't lose
information.

Second, as part of pushing this throughout the codebase, expand the use
of the existing `GitSummary` type to all the places where status
propagation is in play (i.e., anywhere we're dealing with a mix of files
and directories), and get rid of the previous `GitSummary ->
GitFileStatus` conversion.

- [x] Synchronize new representation over collab
  - [x] Update zed.proto
  - [x] Update DB models
- [x] Update `GitSummary` and summarization for the new `FileStatus`
- [x] Fix all tests
  - [x] worktree
  - [x] collab
- [x] Clean up `FILE_*` constants
- [x] New collab tests to exercise syncing of complex statuses
- [x] Run it locally and make sure it looks good

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
2025-01-16 00:01:38 +00:00
Peter Tripp
ebc4688c2a
Fix script/bump-zed-minor-versions. Revert #22834 Revert #22614 (#22837)
Fixes an incorrect error message.
Turns out it is impossible to set remote tracking to a branch that doesn't exist on the remote, so let's not even try.

Reverts #22834
Reverts #22614
2025-01-08 10:59:30 -05:00
Peter Tripp
7f0e13258c
Fix upstream branch tracking error in script/bump-zed-minor-versions (#22834)
Follow-up to: https://github.com/zed-industries/zed/pull/22614
2025-01-08 10:38:56 -05:00
Yasin
8317c9215a
python: Detect pixi environments automatically (#22635)
Goal: Allow zed to locate [`pixi`](https://github.com/prefix-dev/pixi)
environments

Changes:
- Uses a newer release of
[`python-environment-tools`](https://github.com/microsoft/python-environment-tools)
with the new `pet-pixi` create
- Adds `PythonEnvironmentKind::Pixi` as a possible environment kind, to
allow the rest of the code to detect the environment

I tested the changes locally. It found the correct pixi environment and
I was able to run `pytest` through the UI icon.


Release Notes:

- Added detection for pixi-environments

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-01-08 11:06:33 +00:00
Kirill Bulatov
eae88a5c47
Include generate-licenses into bundle-mac script (#22800)
Closes https://github.com/zed-industries/zed/issues/21613

Same as `bundle-linux`, to avoid panicking on missing licenses for
homegrown-built releases when `Help -> View dependency licenses` menu
action is triggered.

Release Notes:

- Altered bundle-mac script to generate licenses
2025-01-07 22:22:57 +00:00
Mikayla Maki
9613084f59
Move git status out of Entry (#22224)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
- [x] Rewrite worktree git handling
- [x] Fix tests
- [x] Fix `test_propagate_statuses_for_repos_under_project`
- [x] Replace `WorkDirectoryEntry` with `WorkDirectory` in
`RepositoryEntry`
- [x] Add a worktree event for capturing git status changes
- [x] Confirm that the local repositories are correctly updating the new
WorkDirectory field
- [x] Implement the git statuses query as a join when pulling entries
out of worktree
- [x] Use this new join to implement the project panel and outline
panel.
- [x] Synchronize git statuses over the wire for collab and remote dev
(use the existing `worktree_repository_statuses` table, adjust as
needed)
- [x] Only send changed statuses to collab

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.com>
Co-authored-by: Nathan <nathan@zed.dev>
2025-01-04 01:00:16 +00:00
Hossein Khosravi
8c253af451
linux: Fix regex patterns for detecting Fedora in script/linux (#22611)
In `script/linux` file, in order to install build dependencies we check
ID and VERSION_ID fields of `/etc/os-release` file for installing
os-specific packages. The regex patterns for those fields are wrong
because there's no `"` character after `ID=` or `VERSION_ID=`. This
causes `grep` to fail.
So I extended the pattern by adding `"?` after each `"` character to
bypass the cause of failure.

Release Notes:

- N/A

Signed-off-by: thehxdev <hossein.khosravi.ce@gmail.com>
2025-01-03 16:28:07 +00:00
Peter Tripp
663f5244ca
Deploy script: Specify remote for new Preview branch (#22614)
Set the git remote tracking branch when the new Preview branch is
created by `script/bump-zed-minor-versions`. This only impacts the local
git branch configuration of the user who runs this script.

Release Notes:

- N/A
2025-01-03 15:25:15 +00:00
Cole Miller
7903f4ea58
Fix the install-linux fix (#22466)
Follow-up fix to #22465, forgot my shell fundamentals!

Release Notes:

- N/A
2024-12-28 16:50:29 +00:00
Cole Miller
a3dec643a1
Fix script/install-linux in non-CI settings (#22465)
Closes #22456 

Release Notes:

- N/A
2024-12-28 15:59:54 +00:00
Cole Miller
a2022d7da3
Improve Linux panic reporting (#22202)
- [x] Upload separate debug symbols for Linux binaries to DigitalOcean
- [x] Send raw offsets with panic report JSON on Linux
- [x] Update `symbolicate` script to handle Linux crashes
- [x] Demangle backtraces 🎉 
- [x] Check that it works
- [x] Improve deduplication (?)
 
Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-12-22 08:20:17 +00:00
Peter Tripp
4fbb568f42
Improve script/bump-zed-minor-version (#22199)
- Follow up to: https://github.com/zed-industries/zed/pull/22170

CC: @mgsloan 

Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2024-12-20 21:02:57 +00:00
Michael Sloan
f3fc4d6279
Add a CI check for todo! and FIXME comments (#21950)
Motivation for this is to support writing comments that will certainly
be revisited before merge.

Release Notes:

- N/A
2024-12-20 08:38:50 +00:00
Michael Sloan
433cb99170
Remove main push from bump-zed-minor-versions script (#22170)
Motivation for this is to allow the `main` branch to be protected. This will enable use of auto-merge and merge queue.

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-12-18 11:32:58 -05:00
Conrad Irwin
94bfb93d35
More telemetry events (#22171)
- **Convert more events to telemetry::event**
- **And call events**

Closes #ISSUE

Release Notes:

- N/A
2024-12-17 22:16:59 -07:00
Connor Tsui
62a6a755ec
Add musl package for Arch Linux (#21830)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
It seems like `musl` is required to build on Arch Linux, but it is not included in the dependencies list.
2024-12-10 21:05:53 -05:00
Mikayla Maki
de939e718a
Simplify livekit config so that cargo check Just Works (#21661)
Supersedes https://github.com/zed-industries/zed/pull/21653

This enables us to use `cargo test -p workspace` on macOS and Linux.

Note that the line diffs in `shared_screen.rs` are spurious, I just
re-ordered the `macos` and `cross-platform` modules to match the order
in the call crate.

Release Notes:

- N/A
2024-12-06 13:50:59 -08:00
Michael Sloan
6a4cd53fd8
Use LiveKit's Rust SDK on Linux while continue using Swift SDK on Mac (#21550)
Similar to #20826 but keeps the Swift implementation. There were quite a
few changes in the `call` crate, and so that code now has two variants.

Closes #13714

Release Notes:

- Added preliminary Linux support for voice chat and viewing
screenshares.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-12-05 15:06:17 -08:00
Conrad Irwin
1fccda7b8d
Add text objects to extensions (#21488)
Release Notes:

- Adds textobject support to erlang, haskell, lua, php, prisma, proto,
toml, and zig
2024-12-03 13:56:25 -07:00
Conrad Irwin
463c99b503
Fix script/get-released-version (#21489)
Release Notes:

- N/A
2024-12-03 13:56:01 -07:00
Peter Tripp
165d50ff5b
Add openbsd netcat to script/linux (#21478)
- Follow-up to: https://github.com/zed-industries/zed/pull/20751

openbsd-netcat is required for interactive SSH Remoting prompts
(password, passphrase, 2fa, etc).
2024-12-03 15:27:12 -05:00
Peter Tripp
41a973b13f
Publish theme json schema v0.2.0 (#21428)
Fix theme json schema so `./script/import-themes print-schema` works again
Update schema to reflect current structs
([diff](https://gist.github.com/notpeter/26e6d0939985f542e8492458442ac62a/revisions?diff=unified&w=))

https://zed.dev/schema/themes/v0.2.0.json
2024-12-03 12:57:39 -05:00
Agustin Gomes
c2cd84a749
Add musl-gcc as dependency (#21366)
This addition comes after attempting building Zed from source.

As part of the process, one of the components (a crate I presume) called
`ring` failed to compile due to the following sequence of console
messages:

```log
warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `musl-gcc` installed?
warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `musl-gcc` installed?

error: failed to run custom build command for `ring v0.17.8`
```

Adding this library should help fix the issue on Fedora 41 at least, and
possibly will help fixing it for other RedHat based distributions as
well.

Closes #ISSUE

Release Notes:

- Add musl-gcc as dependency

Signed-off-by: Agustin Gomes <me@agustingomes.com>
2024-11-30 13:20:31 -08:00
tims
5f29f214c3
linux: Fix file not opening from file explorer (#21137)
Closes #20070

Release Notes:

- Fixed issue where files wouldn't open from the file explorer.
- Fixed "Open a new workspace" option on the desktop entry right-click
menu.

Context:

Zed consists of two binaries:

- `zed` (CLI component, located at `crates/cli/main.rs`)
- `zed-editor` (GUI component, located at `crates/zed/main.rs`)

When `zed` is used in the terminal, it checks if an existing instance is
running. If one is found, it sends data via a socket to open the
specified file. Otherwise, it launches a new instance of `zed-editor`.
For more details, see the `detect` and `boot_background` functions in
`crates/cli/main.rs`.

Root Cause:

Install process creates directories like `.local/zed.app` and
`.local/zed-preview.app`, which contain desktop entries for the
corresponding release. For example, `.local/zed.app/share/applications`
contains `zed.desktop`.

This desktop entry includes a generic `Exec` field, which is correct by
default:

```sh
Comment=A high-performance, multiplayer code editor.
TryExec=zed
StartupNotify=true
```

The issue is in the `install.sh` script. This script copies the above
desktop file to the common directory for desktop entries
(.local/share/applications). During this process, it replaces the
`TryExec` value from `zed` with the exact binary path to avoid relying
on the shell's PATH resolution and to make it explicit.

However, replacement incorrectly uses the path for `zed-editor` instead
of the `zed` CLI binary. This results in not opening a file as if you
use `zed-editor` directly to do this it will throw `zed is already
running` error on production and open new instance on dev.


Note: This PR solves it for new users. For existing users, they will
either have to update `.desktop` file manually, or use `install.sh`
script again. I'm not aware of zed auto-update method, if it runs
`install.sh` under the hood.
2024-11-29 23:01:29 +02:00
Stanislav Alekseev
a4584c9d13
Add an uninstall script (#21213)
Closes #14306

This looks at what #16660 did and install.sh script as a base for the
uninstall.sh script. The script is bundled with the cli by default
unless the cli/no-bundled-uninstall feature is selected which is done,
so package managers could build zed without bundling a useless feature
and increasing binary size.

I don't have capabilities to test this right now, so any help with that
is appreciated.

Release Notes:

- Added an uninstall script for Zed installations done via zed.dev. To
uninstall zed, run `zed --uninstall` via the CLI binary.
2024-11-28 10:31:12 +02:00
Piotr Osiewicz
5ee5a1a51e
chore: Do not produce universal binaries for our releases (#21014)
Closes #ISSUE

Release Notes:

- We no longer provide universal binaries for our releases on macOS.
2024-11-21 23:16:49 +01:00
Conrad Irwin
02447a8552
Use our own git clone in draft release notes (#20956)
It turns out that messing with the git repo created by the github action
is
tricky, so we'll just clone our own.

On my machine, a shallow tree-less clone takes <500ms

Release Notes:

- N/A
2024-11-21 11:55:22 -07:00
Peter Tripp
8c342ef706
Bump JSON schemas: package.json, tsconfig.json (#20910)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Add script/update-json-schemas
Updated JSON schemas to
[SchemaStore/schemastore@569a343](569a343137)
(2024-11-19)
2024-11-20 13:35:00 -05:00
Conrad Irwin
ad6a07e574
Remove comments from discord release announcements (#20888)
Release Notes:

- N/A
2024-11-19 20:00:03 -07:00
Conrad Irwin
c2668bc953
Fix draft-releaase-notes (#20885)
Turns out this was broken because (a) we didn't have tags fetched,
and (b) because the gh-release action we use is buggy.

Release Notes:

- N/A
2024-11-19 19:08:33 -07:00
Peter Tripp
5b9916e34b
ci: Add shellcheck for scripts (#20631)
Fixes shellcheck errors in script/*
Adds a couple trailing newlines.
Adds `script/shellcheck-scripts` and associated CI machinery.
Current set ultra-conservative, does not output warnings, only errors.
2024-11-18 16:41:22 -05:00
Peter Tripp
5b317f60df
Improve install-cmake script (#20836)
- Don't output junk to stderr when cmake unavailable
- Kitware PPA does not include up to date bins for all distros (e.g.
Ubuntu 24 only has 3.30.2 although 3.30.4 has been out for a while) so
don't try to force install a specific version. Take the best we can get.
2024-11-18 16:39:57 -05:00
Peter Tripp
ad31aacb7a
Fix bad quote in script/determine-release-channel (#20613) 2024-11-13 12:41:50 -05:00
Kirill Bulatov
e62d60c84c
Cleanup Framework directory when re-bundling for macOS (#20342)
Release Notes:

- N/A
2024-11-07 11:34:27 +02:00
Kirill Bulatov
b526d69387
Allow Unicode-3.0 license in checks (#20339)
Part of https://github.com/zed-industries/zed/pull/20334

The license is on par with other licenses in the list:
https://www.unicode.org/license.txt

Release Notes:

- N/A
2024-11-07 09:59:41 +02:00
Jeevitha Kannan K S
4f06f5b8fe
Refactor scripts to use command -v instead of which (#20306)
`which` is not a core package is some distributions.
Included changes from #20309 

Release Notes:

- N/A
2024-11-07 09:34:56 +02:00
Lars Diederich
eca3424cb5
Update openSUSE dependencies to build on fresh Tumbleweed installation (#20298) 2024-11-06 11:05:13 -05:00
Patrick Decat
c2cf4c45c0
Fix path to install-mold script in linux script (#20286)
Release Notes:

- N/A
2024-11-06 12:18:31 +02:00
Conrad Irwin
cfce6a8fbf
Potentially fix invocation of draft-release-notes (#20265)
Release Notes:

- N/A
2024-11-05 21:46:05 -07:00
Peter Tripp
db11a3b554
ci: Update issue templates. Rename defect to bug and improve log formatting (#20246) 2024-11-05 12:07:17 -05:00
Yury Zhuravlev
08b124c8d4
Add possibility to build without musl (#19813)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Closes #19803 

Ad



Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2024-11-01 09:25:45 +02:00
Bennet Bo Fenner
f7b2b41df9
ssh remoting: Check nightly version correctly by comparing commit SHA (#19884)
This ensures that we detect if a new nightly version of the remote
server is available.
Previously we would always mark a version as matching if they had the
same semantic version.
However, for nightly versions we also need to check if they have the
same commit SHA.

Co-Authored-by: Thorsten <thorsten@zed.dev>

Release Notes:

- N/A

---------

Co-authored-by: Thorsten <thorsten@zed.dev>
2024-10-29 11:32:55 +01:00
Piotr Osiewicz
cdddb4d360
Add language toolchains (#19576)
This PR adds support for selecting toolchains for a given language (e.g.
Rust toolchains or Python virtual environments) with support for SSH
projects provided out of the box. For Python we piggy-back off of
[PET](https://github.com/microsoft/python-environment-tools), a library
maintained by Microsoft.
Closes #16421
Closes #7646

Release Notes:

- Added toolchain selector to the status bar (with initial support for
Python virtual environments)
2024-10-28 15:34:03 +01:00
Kirill Bulatov
1acebb3c47
Remove another false-positive Danger message (#19769)
Follow-up of https://github.com/zed-industries/zed/pull/19151

Ignores any URLs aftrer `Release Notes:` (if present) and after
`Follow-up of` and `Part of` words.


Release Notes:

- N/A
2024-10-26 01:55:46 +03:00
Kirill Bulatov
d40ea8fc81
Make macOS bundle script compatible with GNU sed (#19745)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Closes https://github.com/zed-industries/zed/issues/19742

Release Notes:

- N/A
2024-10-25 19:04:38 +03:00