Commit graph

15 commits

Author SHA1 Message Date
Julia Ryan
4a7c84f490
Fix nix build (#26270)
This PR includes lots of small fixes to get our `build.nix` and
`shell.nix` back to a working state.

I've tested this by running `cargo run` (inside the devshell) and `nix
run` on x86 nixos and arm64 darwin machines. I'd appreciate it if others
could test building inside the devshell to double-check that it's not
just working because I happen to have some system-level packages
installed, as well as seeing if it works on other platforms (non-nixos
linux, arm linux, x86 darwin).

I couldn't get the full test suite (`cargo nextest run --workspace`)
passing in the devshell on darwin, but they _are_ all passing on nixos.
nixpkgs [disables some of our
tests](92d11f06d5/pkgs/by-name/ze/zed-editor/package.nix (L226-L234))
that apparently fail or are flakey on hydra, but they don't know why.
I'm going to punt on debugging those for now, especially given that they
seem to be working for me. I'm also unsure of whether we actually want
the nix checkPhase to run the full test suite (it's currently not
passing `--workspace`) given that we have separate CI that should
enforce that those pass on all PRs.

Here's an overview of the changes made:
- Fix our `generate-licenses` script
- Relaxes the `cargo-about` version requirement slightly so it doesn't
try to install an older binary when the nixpkgs one is newer than our
requirement
- Add a workaround for [this cargo-about
issue](https://github.com/zed-industries/zed/issues/19971) obviating the
need for the patching done in the nixpkgs package
- Set the new `--frozen` flag to avoid network access/mutating the
lockfile
- Use dynamic webrtc lib from nixpkgs, and fixes up the build script in
webrtc-sys that hardcodes it to be statically linked.
- Use `inputsFrom` in `shell.nix` and avoid duplicating everything from
`build.nix`
- Add a temporary workaround for an [upstream crane
bug](https://github.com/ipetkov/crane/issues/808).
- Fix shebangs in our `script` dir to not hard-code `/bin/bash`

There are still a bunch of issues that aren't resolved here, I'll make a
tracking issue for those and try to land this first just to get back to
an unbroken state. Eventually among other things I'd like to use a
`libgit2` from `staticPkgs` and musl cross compilation to build the
remote server under nix, and then add that as a separate flake output
and include it in the shell's `inputsFrom` list.

Thanks @niklaskorz, @GaetanLepage, @bbigras and all the other nixpkgs
maintainers that have kept the `zed-editor` package working and up to
date! I seriously considered just making our flake `overrideAttrs` the
package in nixpkgs given how well maintained it is.

Thanks @WeetHet for your volunteer maintinance of this flake. I
referenced #24953 while working on these fixes, and I'd love to
collaborate on adding some of those pieces like treefmt and a github
action. If you're interested I'd really appreciate some help debugging
why crane's `buildDepsOnly` isn't working for us. I'm assuming it'd make
our `nix build` times go way down from the improved dep caching if we
could get it working.

Thanks @rrbutani for all the help on this PR 💙.

Release Notes:

- N/A

---------

Co-authored-by: Rahul Butani <rrbutani@users.noreply.github.com>
Co-authored-by: Rahul Butani <rr.butani@gmail.com>
2025-03-10 01:06:11 -07: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
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
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
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
Joseph T. Lyons
6876ea44ac Remove 0-patch requirement on main in bump-zed-minor-versions 2024-02-14 13:13:44 -05:00
Kirill Bulatov
92953fb53d If enabled, search in ignored files during project search 2023-11-22 16:41:02 +02:00
Kirill Bulatov
6680e1e9fe Create new Zed release channel: nightly 2023-11-17 12:13:32 +02:00
Joseph T. Lyons
5b5c232cd1 Revert "Temporarily comment out cargo check commands"
This reverts commit 29e35531af.
2023-09-06 12:54:53 -04:00
Joseph T. Lyons
29e35531af Temporarily comment out cargo check commands 2023-09-06 12:53:50 -04:00
Max Brunsfeld
9355d501bc Fetch release branches before bumping zed minor versions 2022-11-09 14:02:46 -08:00
Max Brunsfeld
c9ba41d002 Fix errors in bump-zed-minor-versions script
Co-authored-by: Joseph Lyons <joseph@zed.dev>
2022-11-02 10:25:20 -07:00
Max Brunsfeld
9cbb698b96 Fix panic when hitting tab at the beginning of a line with mixed tab/space indent 2022-10-31 10:51:20 -07:00
Max Brunsfeld
9e55051811 Tweak version-bumping scripts 2022-10-27 12:10:09 -07:00
Renamed from script/railcar (Browse further)