Commit Graph

246 Commits

Author SHA1 Message Date
Marshall Bowers
6319ae0b4a
extension_cli: Allow building without dynamically linking WebRTC (#13080)
This PR fixes an issue where the `zed-extension` CLI could no longer be
run as a static binary due to the following error:

```
dyld[36964]: Library not loaded: @rpath/WebRTC.framework/WebRTC
  Referenced from: <56332E1D-292E-3F9B-97B9-8A9962D21599> /Users/maxdeviant/projects/zed-extensions/zed-extension
  Reason: no LC_RPATH's found
fish: Job 1, './zed-extension --scratch-dir .…' terminated by signal SIGABRT (Abort)
```

This is the result of the addition of a dependency on `workspace` to the
`extension` crate (and thus, the `extension_cli` crate) in #12360.

Since we don't actually _need_ WebRTC in the extension CLI, we don't
care about dynamically linking it.

To resolve this, a new `no-webrtc` feature has been added to the
`live_kit_client` client crate and threaded through all of the crates
between it and the `extension_cli`.

Enabling the `no-webrtc` feature will prevent linking to the LiveKit
Swift SDK as well as linking the WebRTC framework.

Release Notes:

- N/A
2024-06-14 20:13:31 -04:00
Conrad Irwin
1ad8d6ab1c
Don't show backtraces in prompts (#12699)
Release Notes:

- N/A
2024-06-05 15:00:23 -06:00
Conrad Irwin
5515ba6043
Extract http from util (#11680)
This avoids the CLI linking libssl etc...

Release Notes:

- N/A
2024-05-10 15:50:20 -06:00
Conrad Irwin
9bac64a9c1
Rename RemoteProject -> DevServerProject (#11301)
Co-Authored-By: Mikayla <mikayla@zed.dev>

In a fit of ill-advisedness I called these things remote projects;
forgetting that remote project is also what we call collaboratively
shared projects.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
2024-05-02 11:00:08 -06:00
Conrad Irwin
e0c83a1d32
remote projects per user (#10594)
Release Notes:

- Made remote projects per-user instead of per-channel. If you'd like to
be part of the remote development alpha, please email hi@zed.dev.

---------

Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
Co-authored-by: Bennet <bennetbo@gmx.de>
Co-authored-by: Nate Butler <1714999+iamnbutler@users.noreply.github.com>
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2024-04-23 15:33:09 -06:00
Conrad Irwin
f6c85b28d5
WIP: remoting (#10085)
Release Notes:

- Added private alpha support for remote development. Please reach out to hi@zed.dev if you'd like to be part of shaping this feature.
2024-04-11 15:36:35 -06:00
Joseph T. Lyons
eb6f7c1240
Remove if-not-else patterns (#10402) 2024-04-11 03:48:06 -04:00
Marshall Bowers
7c5bc3c26f
Add the ability for extensions to provide language settings (#10296)
This PR adds the ability for extensions to provide certain language
settings via the language `config.toml`.

These settings are then merged in with the rest of the settings when the
language is loaded from the extension.

The language settings that are available are:

- `tab_size`
- `hard_tabs`
- `soft_wrap`

Additionally, for bundled languages we moved these settings out of the
`settings/default.json` and into their respective `config.toml`s .

For languages currently provided by extensions, we are leaving the
values in the `settings/default.json` temporarily until all released
versions of Zed are able to load these settings from the extension.

---

Along the way we ended up refactoring the `Settings::load` method
slightly, introducing a new `SettingsSources` struct to better convey
where the settings are being loaded from.

This makes it easier to load settings from specific locations/sets of
locations in an explicit way.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-04-08 19:17:12 -04:00
Bennet Bo Fenner
5b4ff74dca
collab ui: Dismiss project shared notifications when leaving room (#10160)
When leaving a call/room in which a project was shared, the shared
project notification was not getting dismissed when the person that
shared the project left the room.
Although there was a `cx.emit(Event::Left)` call inside room, the event
was never received in the `project_shared_notification` module, because
the room is dropped before the event can be dispatched. Moving the
`cx.emit(Event::Left)` to the active call fixed the problem. Also
renamed `Event::Left` to `Event::RoomLeft` because the room join
equivalent is also called `Event::RoomJoined`.


Release Notes:

- Fixed project shared notification staying open, when the user that
shared the project left the room
2024-04-04 13:43:14 +02:00
Marshall Bowers
22fe03913c
Move Clippy configuration to the workspace level (#8891)
This PR moves the Clippy configuration up to the workspace level.

We're using the [`lints`
table](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table)
to configure the Clippy ruleset in the workspace's `Cargo.toml`.

Each crate in the workspace now has the following in their own
`Cargo.toml` to inherit the lints from the workspace:

```toml
[lints]
workspace = true
```

This allows for configuring rust-analyzer to show Clippy lints in the
editor by using the following configuration in your Zed `settings.json`:

```json
{
  "lsp": {
    "rust-analyzer": {
      "initialization_options": {
        "check": {
          "command": "clippy"
        }
      }
    }
  }
```

Release Notes:

- N/A
2024-03-05 12:01:17 -05:00
Conrad Irwin
27c5343707
hosted projects (#8627)
- **Allow joining a hosted project**

You can't yet do anything in a hosted project, but you can join it and
look how empty it is.

Release Notes:

- N/A
2024-03-04 19:17:40 -07:00
Marshall Bowers
9735912965
Enable clippy::clone_on_copy (#8728)
This PR enables the
[`clippy::clone_on_copy`](https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_copy)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 17:37:48 -05:00
Conrad Irwin
c31626717f
channel projects (#8456)
Add plumbing for hosted projects. This will currently show them if they
exist
but provides no UX to create/rename/delete them.

Also changed the `ChannelId` type to not auto-cast to u64; this avoids
type
confusion if you have multiple id types.


Release Notes:

- N/A
2024-02-26 22:15:11 -07:00
Dzmitry Malyshau
35bec9803a
Clean up dependencies of call,lsp,project,settings,vim,welcome, and workspace (#8330)
Based on the product of
[cargo-machete](https://blog.benj.me/2022/04/27/cargo-machete/):

[dependencies.txt](https://github.com/zed-industries/zed/files/14392213/dependencies.txt)

Release Notes:
- N/A
2024-02-25 00:41:28 +02:00
Conrad Irwin
c6826a61a0
talkers (#8158)
Release Notes:

- Added an "Unmute" action for guests in calls. This lets them use the
mic, but not edit projects.
2024-02-22 10:07:36 -07:00
Conrad Irwin
2294d99046
revert single channel click (#7738)
- Revert "collab tweaks (#7706)"
- Revert "2112 (#7640)"
- Revert "single click channel (#7596)"
- Reserve protobufs
- Don't revert migrations

Release Notes:

- N/A

**or**

- N/A
2024-02-13 12:53:49 -07:00
Conrad Irwin
0304edd8ab
2112 (#7640)
It's still slow, but should now work reliably

Release Notes:

- N/A
2024-02-09 18:33:28 -07:00
Conrad Irwin
efe23ebfcd
single click channel (#7596)
- Open channel notes and chat on channel click
- WIP
- Fix compile error
- Don't join live kit until requested
- Track in_call state separately from in_room



Release Notes:

- Improved channels: you can now be in a channel without joining the
audio call automatically

**or**

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2024-02-09 14:18:27 -07:00
Piotr Osiewicz
743f9b345f
chore: Move workspace dependencies to workspace.dependencies (#7454)
We should prefer referring to local deps via `.workspace = true` from
now on.

Release Notes:

- N/A
2024-02-06 20:41:36 +01:00
Conrad Irwin
074acacdf7
Do more on channel join (#7268)
This change makes it so that if you are the first to join a channel,
your project is automatically shared.

It also makes it so that if you join a channel via a link and there are
no shared projects, you open the notes instead of an empty workspace
with nothing.

This is to try and address the discoverability of project sharing: we've
had
two reviews that have talked about channels, but not talked about
sharing
projects into them, which makes me suspect they didn't know about the
feature.

Release Notes:

- Added a setting `share_on_join` (defaulting to true). When set, and
you join an empty channel, your project is automatically shared.
2024-02-02 09:52:30 -07:00
Marshall Bowers
e338f34097
Sort dependencies in Cargo.toml files (#7126)
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.

This should make them easier to visually scan when looking for a
dependency.

Apologies in advance for any merge conflicts 🙈 

Release Notes:

- N/A
2024-01-30 21:41:29 -05:00
Piotr Osiewicz
e6ebe7974d
gpui: Add Global marker trait (#7095)
This should prevent a class of bugs where one queries the wrong type of
global, which results in oddities at runtime.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-30 14:08:20 -05:00
Marshall Bowers
0cb8b0e451
Clean up Cargo.toml files (#7044)
This PR cleans up some inconsistencies in the `Cargo.toml` files that
were driving me crazy.

Release Notes:

- N/A
2024-01-29 23:47:20 -05:00
Piotr Osiewicz
0a0a866dd5
Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535)
Release Notes:
- N/A
2024-01-27 13:51:16 +01:00
Piotr Osiewicz
f2ff7fa4d5
chore: Change AGPL-licensed crates to GPL (except for collab) (#4231)
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?

Release Notes:
- N/A
2024-01-24 00:26:58 +01:00
Piotr Osiewicz
21e6b09361
Remove license-file from Cargo.toml as it is apparently redundant (#4218)
Release Notes:

- N/A
2024-01-23 17:40:30 +01:00
Piotr Osiewicz
678bdddd7d
chore: Add crate licenses. (#4158)
- GPUI and all dependencies: Apache 2
- Everything else: AGPL

Here's a script that I've generated for it:
https://gist.github.com/osiewicz/6afdd6626e517da24a2092807e6f0b6e

Release Notes:
- N/A

---------

Co-authored-by: David <david@zed.dev>
2024-01-23 16:56:22 +01:00
Piotr Osiewicz
6c82380232 chore: Fix clippy::needless_borrow up to an editor 2024-01-21 15:03:24 +01:00
Max Brunsfeld
e57c32effb
Avoid playing newly published audio tracks when deafened (#4040)
Release Notes:

- Fixed a bug where the 'deafen' button would only apply to audio from
the call's current participants, but not any participants who joined
after the button was pressed.
- Fixed a bug where after being granted write access to a channel, the
microphone icon appeared non-muted, even though audio was not shared.
2024-01-15 14:08:49 -08:00
Max Brunsfeld
e90794d3ec Add and enhance tests for muting/deafening, fix exposed logic errors 2024-01-15 14:03:38 -08:00
Max Brunsfeld
c2cf28804a Don't run newly published audio tracks when deafened
Also, simplify the management of the muted and deafened state in Room.
2024-01-12 15:12:29 -08:00
Conrad Irwin
50f3bbbc8b Open chat when joining a channel with guests
(and close it when leaving a channel again)
2024-01-12 15:08:14 -07:00
Conrad Irwin
f0d490c671 Open chat panel for guests 2024-01-12 10:34:24 -07:00
Conrad Irwin
dc158f708f Update chat panel with current channel 2024-01-12 10:23:30 -07:00
Conrad Irwin
f418bd907d Stop following when project is unshared
Before this change the views would continue to update in the background
of the "disconnected" dialogue, which was disconcerting.
2024-01-10 23:09:09 -07:00
Mikayla Maki
44969460cd
Remove remaining port related todos (#3994)
TODO:
- [x] Audit all TODO comments in Zed source and mark port related ones
with a !
- [x] Resolve all todos written as `todo!`

Release Notes:

- N/A
2024-01-10 17:31:05 -08:00
Max Brunsfeld
cb5d4edc4b
Handle reconnects to the livekit server in which local tracks are unpublished (#3992)
Release notes:

* Fixed a bug where network interruptions could cause audio and screen
sharing to stop working without indicating that they were stopped, and
there was no way to restart the audio stream.
2024-01-10 16:34:11 -08:00
Max Brunsfeld
75fdaeb56f Detect when a track is unpublished due to reconnecting to livekit
Co-authored-by: Julia <julia@zed.dev>
2024-01-10 16:12:26 -08:00
Max Brunsfeld
2d1eb0c56c Expose a single updates stream from live_kit_client::Room
Co-authored-by: Julia <julia@zed.dev>
2024-01-10 16:10:52 -08:00
Kirill Bulatov
2e9c9adfbe Remove active call data when it was accepted
That hopefully helps with call notifications sometimes not being closed

co-authored-by: Max <max@zed.dev>
2024-01-11 00:35:00 +02:00
Mikayla
c98d7adf83
Audit all TODOs in Zed and mark port related todos 2024-01-10 11:26:11 -08:00
Conrad Irwin
276bfa0fab Merge branch 'main' into guest-promotion 2024-01-09 16:28:42 -07:00
Conrad Irwin
4da9d61a42 Implement live kit promotion/demotion 2024-01-09 16:10:12 -07:00
Piotr Osiewicz
29ed067b26
Add a missing default value to docs (#3973)
Release Notes:

- N/A
2024-01-09 12:20:52 +01:00
Conrad Irwin
8669b08161 Failing test for unmuting microphone 2024-01-08 22:30:03 -07:00
Conrad Irwin
844d161c40 Allow adding write access to guests 2024-01-08 22:02:56 -07:00
Piotr Osiewicz
e4b1c76895
Display setting documentation in settings.json (#3936)
Let this screenshot of settings.json speak for itself: 

![image](https://github.com/zed-industries/zed/assets/24362066/fca60383-1788-43f9-803b-00f083394c8a)

Release Notes:
- Added code completion & on-hover documentation to Zed's settings.json
file.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-08 19:30:18 +01:00
Joseph T. Lyons
800c9958a3 Clean up code 2024-01-06 15:31:16 -05:00
Joseph T. Lyons
cdd5cb16ed WIP 2024-01-06 14:41:35 -05:00
Conrad Irwin
3c0052850c Merge branch 'main' into channel-guests 2024-01-05 10:05:59 -07:00