Commit Graph

241 Commits

Author SHA1 Message Date
Max Brunsfeld
8a6264d933
Provide wasm extensions with APIs needed for using pre-installed LSP binaries (#9085)
In this PR, we've added two new methods that LSP extensions can call:
* `shell_env()`, for retrieving the environment variables set in the
user's default shell in the worktree
* `which(command)`, for looking up paths to an executable (accounting
for the user's shell env in the worktree)

To test this out, we moved the `uiua` language support into an
extension. We went ahead and removed the built-in support, since this
language is extremely obscure. Sorry @mikayla-maki. To continue coding
in Uiua in Zed, for now you can `Add Dev Extension` from the extensions
pane, and select the `extensions/uiua` directory in the Zed repo. Very
soon, we'll support publishing these extensions so that you'll be able
to just install it normally.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-03-08 17:18:06 -05:00
Marshall Bowers
be953b78ef
Add script for setting up WASI dependencies (#9078)
This PR adds a script for setting up the WASI dependencies needed for
extensions.

These already get downloaded when needed when using Zed, but in the
tests the HTTP client is faked out, so if you don't already have them
installed the `test_extension_store_with_gleam_extension` test will
fail.

Release Notes:

- N/A
2024-03-08 14:05:29 -05:00
Max Brunsfeld
51ebe0eb01
Allow wasm extensions to do arbitrary file I/O in their own directory to install language servers (#9043)
This PR provides WASM extensions with write access to their own specific
working directory under the Zed `extensions` dir. This directory is set
as the extensions `current_dir` when they run. Extensions can return
relative paths from the `Extension::language_server_command` method, and
those relative paths will be interpreted relative to this working dir.

With this functionality, most language servers that we currently build
into zed can be installed using extensions.

Release Notes:

- N/A
2024-03-08 08:49:27 -08:00
Kirill Bulatov
ffebe2e4a6
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.

* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:

1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.

2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.

3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb 
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop         0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop         0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop       153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop         0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop         0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop         0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop         0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop    716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop         0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop         0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop    239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop         0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```

But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.

So, this structure can be considered temporary and changed, if needed.

4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.

5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
      - name: Cache dependencies
        uses: swatinem/rust-cache@v2
        with:
          save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.

Release Notes:

- N/A
2024-03-07 23:22:53 +02:00
L
9481b346e2
Fix issue template formatting (#8866)
Release Notes:
- N/A

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
2024-03-06 22:11:48 -05:00
Antonio Scandurra
c8383e3b18 Use a string for ZED_LOAD_BALANCER_SIZE_UNIT in k8s template
Co-Authored-By: Thorsten <thorsten@zed.dev>
2024-03-06 11:03:14 +01:00
Antonio Scandurra
334c3c670b Use a string for ZED_LOAD_BALANCER_SIZE_UNIT
Co-Authored-By: Thorsten <thorsten@zed.dev>
2024-03-06 10:52:35 +01:00
Antonio Scandurra
e3a7192c11
Give a name to load balancers and increase node count for production (#8939)
Release Notes:

- N/A

Co-authored-by: Thorsten <thorsten@zed.dev>
2024-03-06 10:38:17 +01:00
Joseph T. Lyons
ad0c5731e5 Update config.yml 2024-03-05 13:23:17 -05:00
Marshall Bowers
bf666af3a2
Deny all Clippy warnings (#8720)
This PR makes Clippy deny all warnings across the workspace.

We now enumerate all of the rules that have violations and temporarily
allow them, with the goal being to drive the list down over time.

On Windows we don't yet use `--deny warnings`, as the Windows build
still has some warnings.

Release Notes:

- N/A
2024-03-02 15:51:01 -05:00
Max Brunsfeld
268fa1cbaf
Add initial support for defining language server adapters in WebAssembly-based extensions (#8645)
This PR adds **internal** ability to run arbitrary language servers via
WebAssembly extensions. The functionality isn't exposed yet - we're just
landing this in this early state because there have been a lot of
changes to the `LspAdapter` trait, and other language server logic.

## Next steps

* Currently, wasm extensions can only define how to *install* and run a
language server, they can't yet implement the other LSP adapter methods,
such as formatting completion labels and workspace symbols.
* We don't have an automatic way to install or develop these types of
extensions
* We don't have a way to package these types of extensions in our
extensions repo, to make them available via our extensions API.
* The Rust extension API crate, `zed-extension-api` has not yet been
published to crates.io, because we still consider the API a work in
progress.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-03-01 16:00:55 -08:00
Nathan Sobo
4cc4f08a53
Remove ! from todo!() in comments (#8643)
This practice makes it difficult to locate todo!s in my code when I'm
working. Let's take out the bang if we want to keep doing this.

Release Notes:

- N/A
2024-02-29 18:19:05 -07:00
Conrad Irwin
198dfe0097 Maybe make cherry-pick-bot better 2024-02-28 15:26:30 -07:00
Conrad Irwin
16eb17e2f8
Enable cherry-pick-bot (#8561)
You will now be able to say `/cherry-pick v0.123.x` to cherry-pick to a
different branch.

Release Notes:

- N/A
2024-02-28 15:19:16 -07:00
Marshall Bowers
89caf06dbe
Move note about screenshots up in the PR template (#8501)
This PR rearranges the PR template to move the line about including
screenshots or media up underneath the `Added/Fixed/Improved` section.

This makes it easier to delete one section or the other depending on
what kind of change you're making.

Release Notes:

- N/A
2024-02-27 14:19:18 -05:00
Dzmitry Malyshau
cb75c57fc0
Cleanup dependencies (part 4) (#8468)
Follow-up to #8425 . Final part - adds the CI check.

Release Notes:
- N/A
2024-02-27 20:41:49 +02:00
Marshall Bowers
83bc24b480
Adjust Cargo caching in CI (#8494)
This PR adjusts the way we cache Cargo dependencies in CI.

We're trying out
[swatinem/rust-cache](https://github.com/swatinem/rust-cache) to see if
it can improve our caching strategy such that we're able to get more
cache hits on PRs.

We'll only write to the cache on `main` in the hopes that it will
mitigate the amount of thrashing of the cache.

Release Notes:

- N/A
2024-02-27 11:35:17 -05:00
Joseph T. Lyons
e01a606616 Update 2_crash_report.yml 2024-02-26 15:30:35 -05:00
Joseph T. Lyons
510f4328f2 Create 2_crash_report.yml 2024-02-26 15:28:57 -05:00
Joseph T. Lyons
4b7bd03db7 Update bug report issue template 2024-02-26 15:28:33 -05:00
Joseph T. Lyons
935938a27c Format feature request issue template 2024-02-26 15:28:24 -05:00
Joseph T. Lyons
f54bb32a7f Point requests for languages to extension repository 2024-02-26 01:04:54 -05:00
Joseph T. Lyons
d8902ca5d6 Rename bug report issue template 2024-02-26 01:04:39 -05:00
Joseph T. Lyons
b575fbb449 Delete 1_language_support.yml 2024-02-26 01:04:15 -05:00
白山風露
aef299be3d
CI: Enable clippy on Windows (#8240)
Release Notes:

- N/A
2024-02-23 16:23:42 -08:00
Marshall Bowers
522176d414
Adjust Kubernetes manifests for deploying API service (#8281)
This PR adjusts our Kubernetes manifests for deploying the new API
service.

Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-02-23 12:14:40 -05:00
Conrad Irwin
6e897d9969
buf-version (#8154)
Release Notes:

- N/A
2024-02-21 15:29:11 -07:00
Kirill Bulatov
c97ecc7326
Add initial CI job for Windows target (#8088)
Clippy is disabled for now, due to many warnings in both `gpui` and
other code, see
https://github.com/zed-industries/zed/actions/runs/7980269779/job/21789529800
for more details.

Also, due to `#!/usr/bin/env bash` shebang in the `script/clippy`, it
starts in Windows CI with `shell: C:\Program Files\Git\bin\bash.EXE
-euxo pipefail {0}`

https://github.com/zed-industries/zed/actions/runs/7980269779/job/21789529800#step:4:3
It seems more appropriate to use PowerShell instead.

See `todo!("windows")` for all stubbed places currently.

Release Notes:

- N/A
2024-02-21 00:35:29 +02:00
Kirill Bulatov
37f6a706cc
Invalidate Linux build caches more agressively (#8031)
We run Linux CI on regular GitHub Action runners, which have ~30GB of
disk space. This is nothing for Rust builds and, due to Cargo.lock
perturbations, we tend to accumulate enough artifacts to fill the disk
entirely since `restore-keys` alowed to keep the cache for different
lockfiles.

Instead, try to invalidate the cache more aggressively (which will cost
us more frequent ~30min Linux CI runs) to see how this will work in
comparison.

Release Notes:

- N/A
2024-02-19 14:16:39 -08:00
Dzmitry Malyshau
9ad1862f2f
Enable Blade on MacOS via "macos-blade" feature (#7669)
Depends on https://github.com/zed-industries/font-kit/pull/2 and
https://github.com/kvark/blade/pull/77

This change enables Blade to be also used on MacOS. It will also make it
easier to use it on Windows.

What works: most of the things. Zed loads as fast and appears equally
responsive to the current renderer.
<img width="306" alt="Screenshot 2024-02-11 at 12 09 15 AM"
src="https://github.com/zed-industries/zed/assets/107301/66d82f45-5ea2-4e2b-86c6-5b3ed333c827">

Things missing:
- [x] video streaming. ~~Requires a bit of plumbing on both Blade and
Zed sides, but all fairly straightforward.~~
  -  verified with a local setup
- [x] resize. ~~Not sure where exactly to hook up the reaction on the
window size change. Once we know where, the fix is one line.~~
- [ ] fine-tune CA Layer
- this isn't a blocker for merging the PR, but it would be a blocker if
we wanted to switch to the new path by default
- [ ] rebase on latest, get the dependency merged (need review/merge of
https://github.com/zed-industries/font-kit/pull/2!)

Update: I implemented resize support as well as "surface" rendering on
the Blade path (which will be useful on Linux/Windows later on). I
haven't tested the latter though - not sure how to get something
streaming. Would appreciate some help! I don't think this should be a
blocker to this PR, anyway.

The only little piece that's missing for the Blade on MacOS path to be
full-featured is fine-tuning the CALayer configuration. Zed does a lot
of careful logic in configuring the layer, such as switching the
"present with transaction" on/off intermittently, which Blade path
doesn't have yet.

Release Notes:
- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-02-16 13:39:40 -08:00
Marshall Bowers
a161a7d0c9
Format YAML files (#7887)
This PR formats the YAML files in the repo with Prettier.

Release Notes:

- N/A
2024-02-15 22:04:57 -05:00
Joseph T. Lyons
32fdff0285 Update issue template configuration (again) 2024-02-15 19:35:23 -05:00
Joseph T. Lyons
4094562321 Update issue template configuration 2024-02-15 18:47:01 -05:00
Joseph T. Lyons
21a7421ee0 Update 1_language_support.yml 2024-02-15 18:25:13 -05:00
Max Brunsfeld
e1ae0d46da
Add an extensions API to the collaboration server (#7807)
This PR adds a REST API to the collab server for searching and
downloading extensions. Previously, we had implemented this API in
zed.dev directly, but this implementation is better, because we use the
collab database to store the download counts for extensions.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
2024-02-15 12:53:57 -08:00
Antonio Scandurra
c6626627c2
Remove existing gzip files before compressing dSYMs (#7818)
This should fix the build.

Release Notes:

- N/A
2024-02-15 11:32:08 +01:00
Conrad Irwin
cbbc8cad84
Try and make collab deploys faster (#7746)
Use github machines and build on host instead of in container

Release Notes:

- N/A
2024-02-14 15:11:57 -07:00
Joseph T. Lyons
ac59b9b02f
Add a line instructing users to include media screenshots (#7790)
Making media up for release notes / tweets is becoming very time
consuming. I spoke to Max and suggested we ask users to submit media for
their features, to reduce what we need to produce for tweets and such. I
dont know if this is the best way to signal it; I don't like adding more
to the PR template, but I'm not sure of a better way at the moment.


Release Notes:

- N/a
2024-02-14 15:36:56 -05:00
Conrad Irwin
7a6d01e113
debug symbol upload (#7783)
This will let it become slowly eaasier to debug crashes

Release Notes:

- N/A
2024-02-14 10:55:37 -07:00
Kirill Bulatov
25c4cfe1d0 Bump action runners versions 2024-02-09 15:25:16 +02:00
Kirill Bulatov
702393af59 Use proper key for Linux rust cache 2024-02-09 15:25:16 +02:00
Conrad Irwin
1da5241ef7
Try to buf harder (#7591)
Release Notes:

- N/A
2024-02-08 13:59:15 -07:00
Mikayla Maki
ad88e9754e
Add Linux build CI (#7581)
Release Notes:

- N/A
2024-02-08 12:56:29 -08:00
Conrad Irwin
eaadf56db9
Testing buf breaking (#7475)
Release Notes:

- N/A
2024-02-07 13:55:36 -07:00
Kirill Bulatov
b59f925933
Upgrade GH actions to reduce CI warnings (#7403)
Deals with one of the warnings GH shows on our actions run:

https://github.com/zed-industries/zed/actions/runs/7790218555
<img width="1383" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/e523ec7c-bf43-4b0d-8c36-8540aef6fae9">

bufbuild/* actions seem to have no new major versions so there's nothing
new to upgrade to.

Release Notes:

- N/A
2024-02-05 22:26:56 +02:00
Dairon M
91303a5021
Do not run scheduled CI jobs on forks (#7394)
Runs scheduled CI jobs only on the main repository, not on forks. These
jobs fail on forks and generate unnecessary noise on contributor emails.



Release Notes:

- N/A
2024-02-05 10:12:29 -08:00
Marshall Bowers
6f6cb53fad
Tweak pull request template to (hopefully) make it clearer (#7287)
I keep seeing people leave the wrapping parentheses, like `(Added)` in
their release notes.

This PR tries making it clearer that we only want *one* of "Added",
"Fixed", or "Improved".

Release Notes:

- N/A
2024-02-02 11:41:47 -05:00
Max Brunsfeld
b35a7223b6 Add missing secret in release nightly workflow 2024-02-01 15:45:53 -08:00
Conrad Irwin
7b9d51929d
Deploy collab like nightly (#7174)
After this change we'll be able to push a tag to github to deploy to
collab.

The advantages of this are that there's no longer a separate step to
first
build the image, and then deploy it.

In the future I'd like to make this happen more automatically (maybe as
part of
bump nightly).

Release Notes:

- N/A
2024-02-01 11:54:49 -07:00
Conrad Irwin
5b7b5bfea5
Add a checksum telemetry request (#7168)
We're seeing a bit of nonsense on telemetry. Although the checksum seed
isn't secret per-se, it does make sending nonsense a little more effort.

Release Notes:

- N/A
2024-01-31 15:44:38 -07:00