Commit Graph

13 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
Thorsten Ball
7f54935324
Add git blame (#8889)
This adds a new action to the editor: `editor: toggle git blame`. When
used it turns on a sidebar containing `git blame` information for the
currently open buffer.

The git blame information is updated when the buffer changes. It handles
additions, deletions, modifications, changes to the underlying git data
(new commits, changed commits, ...), file saves. It also handles folding
and wrapping lines correctly.

When the user hovers over a commit, a tooltip displays information for
the commit that introduced the line. If the repository has a remote with
the name `origin` configured, then clicking on a blame entry opens the
permalink to the commit on the code host.

Users can right-click on a blame entry to get a context menu which
allows them to copy the SHA of the commit.

The feature also works on shared projects, e.g. when collaborating a
peer can request `git blame` data.

As of this PR, Zed now comes bundled with a `git` binary so that users
don't have to have `git` installed locally to use this feature.

### Screenshots

![screenshot-2024-03-28-13 57
43@2x](https://github.com/zed-industries/zed/assets/1185253/ee8ec55d-3b5e-4d63-a85a-852da914f5ba)

![screenshot-2024-03-28-14 01
23@2x](https://github.com/zed-industries/zed/assets/1185253/2ba8efd7-e887-4076-a87a-587a732b9e9a)
![screenshot-2024-03-28-14 01
32@2x](https://github.com/zed-industries/zed/assets/1185253/496f4a06-b189-4881-b427-2289ae6e6075)

### TODOs

- [x] Bundling `git` binary

### Release Notes

Release Notes:

- Added `editor: toggle git blame` command that toggles a sidebar with
git blame information for the current buffer.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-03-28 18:32:11 +01:00
Marshall Bowers
3f5f64a044
Wrap extension schema version in a newtype (#9872)
This PR wraps the extension schema version in a newtype, for some
additional type safety.

Release Notes:

- N/A
2024-03-27 12:11:12 -04:00
Max Brunsfeld
b0409ddd68
Consolidate more extension API structs that were duplicated btwn client and server (#9797)
Release Notes:

- N/A
2024-03-25 21:28:18 -07:00
Max Brunsfeld
5adc51f113
Add telemetry events for loading extensions (#9793)
* Store extensions versions' wasm API version in the database
* Share a common struct for extension API responses between collab and
client
* Add wasm API version and schema version to extension API responses

Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-03-25 17:30:48 -04:00
Marshall Bowers
0981c97a22
extension_cli: Clear out existing manifest collections for old extension.json (#9780)
This PR fixes an issue in the extension CLI when building extensions
using the old manifest schema (`extension.json`).

If there were values provided for the `languages`, `grammars`, or
`themes` collections, these could interfere with the packaging process.

We aren't expecting these fields to be set in the source
`extension.json` (just in the generated one), so we can clear them out
when building up the manifest.

Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
2024-03-25 12:44:32 -04:00
Marshall Bowers
adcb591629
extension_cli: Populate grammars from grammars directory for legacy extension formats (#9650)
This PR makes the extension CLI populate the grammars in the manifest
from the contents of the `grammars` directory for legacy extensions
using the `extension.json` format (`schema_version == 0`).

This allows us to continue packaging these older extensions until they
can be migrated to the new schema version.

Release Notes:

- N/A
2024-03-21 12:31:53 -04:00
Marshall Bowers
3831088251
extension_cli: Don't propagate errors caused by trying to read Cargo.toml (#9641)
This PR fixes an issue where the extension CLI would error if a
`Cargo.toml` didn't exist when we were trying to check for its
existence. Since we're just checking if it exists for the purposes of
detecting a Rust extension, we can safely ignore the errors.

Also improved the logging/error handling in a few spots to make other
errors easier to troubleshoot in the future.

Release Notes:

- N/A
2024-03-21 11:29:35 -04:00
Max Brunsfeld
585e8671e3
Add a schema to extensions, to prevent installing extensions on too old of a Zed version (#9599)
Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-03-20 17:33:26 -04:00
Marshall Bowers
3a2eb12f68
Fix binary name for extension CLI (#9591)
This PR fixes the binary name for the extension CLI.

This was originally done in #9541, but got accidentally reverted in
#9549.

Release Notes:

- N/A
2024-03-20 14:16:23 -04:00
Max Brunsfeld
fd11bd68f2
Perform extension packaging in extension-cli (#9549)
Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-03-19 17:26:06 -04:00
Marshall Bowers
8d515a620f
Update binary name for extension CLI (#9541)
This PR updates the binary name used by the extension CLI from
`extension_cli` to `zed-extension`.

Release Notes:

- N/A
2024-03-19 12:36:53 -04:00
Max Brunsfeld
868616d62e
Introduce extension-cli binary, for packaging extensions in CI (#9523)
This will be used in the
[extensions](https://github.com/zed-industries/extensions) repository
for packaging the extensions that users submit.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-03-19 10:50:21 -04:00