Skip to content

zed-editor: 0.184.10 -> 0.185.15#404938

Closed
sachk wants to merge 1 commit intoNixOS:masterfrom
sachk:zed-editor
Closed

zed-editor: 0.184.10 -> 0.185.15#404938
sachk wants to merge 1 commit intoNixOS:masterfrom
sachk:zed-editor

Conversation

@sachk
Copy link
Contributor

@sachk sachk commented May 7, 2025

Diff

Fixes #404990

Note: this PR is currently blocked by issues with the vendoring of cargo dependencies.
See: #387337 and #282798

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label May 7, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 7, 2025
@nix-owners nix-owners bot requested review from GaetanLepage and niklaskorz May 7, 2025 14:31
@sachk
Copy link
Contributor Author

sachk commented May 7, 2025

Oh, looks like we need #387337? Not sure why that didn't show up locally.

@GaetanLepage
Copy link
Contributor

Eval has failed for some reason. Can you please rebase and force-push?

@GaetanLepage
Copy link
Contributor

Thanks, but you have introduced a merge commit instead of rebasing. Can you properly rebase and then force-push so as to have a single commit on your branch?.

@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 404938


x86_64-linux

❌ 3 packages failed to build:
  • zed-editor
  • zed-editor-fhs
  • zed-editor.remote_server

aarch64-linux

❌ 3 packages failed to build:
  • zed-editor
  • zed-editor-fhs
  • zed-editor.remote_server

x86_64-darwin

❌ 2 packages failed to build:
  • zed-editor
  • zed-editor.remote_server

aarch64-darwin

❌ 2 packages failed to build:
  • zed-editor
  • zed-editor.remote_server

@sachk
Copy link
Contributor Author

sachk commented May 7, 2025

Thanks, but you have introduced a merge commit instead of rebasing. Can you properly rebase and then force-push so as to have a single commit on your branch?.

Yeah, sorry I assumed github wouldn't do that with the UI and then it took me a moment to fetch nixpkgs master to fix it. I'm not sure it'll fix the issue given I was only about 20 commits behind though.

I assume it's the issue fixed by #387337 given this seems to be the issue in the logs.

       > FileExistsError: [Errno 17] File exists: '/nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/reqwest-0.12.15'

Copy link
Contributor

@drupol drupol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff LGTM, thanks for this !

@drupol
Copy link
Contributor

drupol commented May 7, 2025

What is this build issue ?

Unpacking to /nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/reqwest-0.11.27
Unpacking to /nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/reqwest-0.12.15
Copying to /nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/reqwest-0.12.15
Traceback (most recent call last):
  File "/nix/store/j8vmynm6m361ai674awq2l43gqyjqh8j-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 349, in <module>
    main()
  File "/nix/store/j8vmynm6m361ai674awq2l43gqyjqh8j-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 345, in main
    subcommand_func()
  File "/nix/store/j8vmynm6m361ai674awq2l43gqyjqh8j-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 337, in <lambda>
    "create-vendor": lambda: create_vendor(vendor_staging_dir=Path(sys.argv[2]), out_dir=Path(sys.argv[3]))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/j8vmynm6m361ai674awq2l43gqyjqh8j-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 294, in create_vendor
    copy_and_patch_git_crate_subtree(git_tree, pkg["name"], crate_out_dir)
  File "/nix/store/j8vmynm6m361ai674awq2l43gqyjqh8j-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 233, in copy_and_patch_git_crate_subtree
    shutil.copytree(crate_tree, crate_out_dir, ignore=ignore_func)
  File "/nix/store/kjvgj2n3yn70hmjifg6y0bk9m4rf7jba-python3-3.12.10/lib/python3.12/shutil.py", line 600, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/kjvgj2n3yn70hmjifg6y0bk9m4rf7jba-python3-3.12.10/lib/python3.12/shutil.py", line 498, in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)
  File "<frozen os>", line 225, in makedirs
FileExistsError: [Errno 17] File exists: '/nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/reqwest-0.12.15'
error: builder for '/nix/store/8505v76g1swshr3fh0gwrzl0gngrcm40-zed-editor-0.185.10-vendor.drv' failed with exit code 1;
       last 25 log lines:
       > Unpacking to /nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/regex-syntax-0.6.29
       > Unpacking to /nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/regex-syntax-0.8.5
       > Unpacking to /nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/rend-0.4.2
       > Unpacking to /nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/reqwest-0.11.27
       > Unpacking to /nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/reqwest-0.12.15
       > Copying to /nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/reqwest-0.12.15
       > Traceback (most recent call last):
       >   File "/nix/store/j8vmynm6m361ai674awq2l43gqyjqh8j-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 349, in <module>
       >     main()
       >   File "/nix/store/j8vmynm6m361ai674awq2l43gqyjqh8j-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 345, in main
       >     subcommand_func()
       >   File "/nix/store/j8vmynm6m361ai674awq2l43gqyjqh8j-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 337, in <lambda>
       >     "create-vendor": lambda: create_vendor(vendor_staging_dir=Path(sys.argv[2]), out_dir=Path(sys.argv[3]))
       >                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >   File "/nix/store/j8vmynm6m361ai674awq2l43gqyjqh8j-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 294, in create_vendor
       >     copy_and_patch_git_crate_subtree(git_tree, pkg["name"], crate_out_dir)
       >   File "/nix/store/j8vmynm6m361ai674awq2l43gqyjqh8j-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 233, in copy_and_patch_git_crate_subtree
       >     shutil.copytree(crate_tree, crate_out_dir, ignore=ignore_func)
       >   File "/nix/store/kjvgj2n3yn70hmjifg6y0bk9m4rf7jba-python3-3.12.10/lib/python3.12/shutil.py", line 600, in copytree
       >     return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
       >            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >   File "/nix/store/kjvgj2n3yn70hmjifg6y0bk9m4rf7jba-python3-3.12.10/lib/python3.12/shutil.py", line 498, in _copytree
       >     os.makedirs(dst, exist_ok=dirs_exist_ok)
       >   File "<frozen os>", line 225, in makedirs
       > FileExistsError: [Errno 17] File exists: '/nix/store/a7b10d819rsr329czk7473600gw9j835-zed-editor-0.185.10-vendor/reqwest-0.12.15'
       For full logs, run 'nix log /nix/store/8505v76g1swshr3fh0gwrzl0gngrcm40-zed-editor-0.185.10-vendor.drv'.
error: 1 dependencies of derivation '/nix/store/4rqin9xh90ndd9jvsrgx0pwg8l8bh9d8-zed-editor-0.185.10.drv' failed to build
error: 1 dependencies of derivation '/nix/store/blhkg43sgxyl0sqwkp9rjl0wvgbj5zkk-zed-editor-0.185.10.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c14sqxlmmnk5s30mpa3pxabcgcyzicim-zed-editor-0.185.10-test-version.drv' failed to build
error: build of '/nix/store/4rqin9xh90ndd9jvsrgx0pwg8l8bh9d8-zed-editor-0.185.10.drv', '/nix/store/blhkg43sgxyl0sqwkp9rjl0wvgbj5zkk-zed-editor-0.185.10.drv', '/nix/store/c14sqxlmmnk5s30mpa3pxabcgcyzicim-zed-editor-0.185.10-test-version.drv' failed

@sachk
Copy link
Contributor Author

sachk commented May 7, 2025

What is this build issue ?

Has to be #359340 right? Due to changes in dependencies in this new zed version.

@HPsaucii
Copy link

HPsaucii commented May 7, 2025

Can confirm i get the same issue with my own local version bump - my line of research has also led to what @sachk linked. I haven't found any info on how to directly get around this without #282798 unfortunately

@nyabinary
Copy link
Contributor

This is seriously starting to get be a PITA, we got to get that merged as soon as possible atp.

@linuxmobile
Copy link
Contributor

v0.185.11 is out

@drupol
Copy link
Contributor

drupol commented May 8, 2025

0.185.12 now

@drupol drupol changed the title zed-editor: 0.184.10 -> 0.185.10 zed-editor: 0.184.10 -> 0.185.12 May 8, 2025
@sachk
Copy link
Contributor Author

sachk commented May 8, 2025

looks like that hasn't fixed it :(

@HPsaucii
Copy link

HPsaucii commented May 8, 2025

looks like that hasn't fixed it :(

Yeah, im currently working on a flake that uses the patched rustPlatform, but i'm having issues with dependency patching (the way the new rustPlatform does dependencies breaks the current solution to the webrtc-sys dependency)

@HPsaucii
Copy link

HPsaucii commented May 8, 2025

For anyone who want's to test out the latest version before the breaking change gets pushed (or this pull request gets resolved through some other means), I've made https://github.com/HPsaucii/zed-editor-flake

I haven't had the time to fully build it yet, but everything should work fine :)

@TomaSajt
Copy link
Contributor

TomaSajt commented May 8, 2025

(the way the new rustPlatform does dependencies breaks the current solution to the webrtc-sys dependency)

FYI: in theory, you just have to swap out $cargoDepsCopy/webrtc-sys-* to $cargoDepsCopy/*/webrtc-sys-* when using my PR.

@TomaSajt
Copy link
Contributor

TomaSajt commented May 8, 2025

Also:

this patch should fix the duplication issue without my fix PR:

diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix
index 09d3748497dd..82b1adb52b70 100644
--- a/pkgs/by-name/ze/zed-editor/package.nix
+++ b/pkgs/by-name/ze/zed-editor/package.nix
@@ -121,6 +121,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
     ./0001-linux-linker.patch
   ];
 
+  cargoPatches = [
+    # reqwest 0.12.15 is present both as a git-based crate and as the plain crates.io crate
+    ./remove-duplicate-dep.patch
+  ];
+
   postPatch =
     # Dynamically link WebRTC instead of static
     ''
@@ -129,7 +134,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
     '';
 
   useFetchCargoVendor = true;
-  cargoHash = "sha256-VPg7gSfGO7WM/1NFEZqTaVZKzcOwkwHrA2CjnW0bevY=";
+  cargoHash = "sha256-K/cK90Y1hfFl0kFw/G+6z/4GnSpx/38SwwtoEervGHk=";
 
   nativeBuildInputs =
     [
diff --git a/pkgs/by-name/ze/zed-editor/remove-duplicate-dep.patch b/pkgs/by-name/ze/zed-editor/remove-duplicate-dep.patch
new file mode 100644
index 000000000000..6d6dd619cb53
--- /dev/null
+++ b/pkgs/by-name/ze/zed-editor/remove-duplicate-dep.patch
@@ -0,0 +1,48 @@
+diff --git a/Cargo.lock b/Cargo.lock
+index 22427fb..75a924a 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -12162,43 +12162,6 @@ dependencies = [
+  "winreg 0.50.0",
+ ]
+ 
+-[[package]]
+-name = "reqwest"
+-version = "0.12.15"
+-source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb"
+-dependencies = [
+- "base64 0.22.1",
+- "bytes 1.10.1",
+- "futures-channel",
+- "futures-core",
+- "futures-util",
+- "http 1.3.1",
+- "http-body 1.0.1",
+- "http-body-util",
+- "hyper 1.6.0",
+- "hyper-util",
+- "ipnet",
+- "js-sys",
+- "log",
+- "mime",
+- "once_cell",
+- "percent-encoding",
+- "pin-project-lite",
+- "serde",
+- "serde_json",
+- "serde_urlencoded",
+- "sync_wrapper 1.0.2",
+- "tokio",
+- "tower 0.5.2",
+- "tower-service",
+- "url",
+- "wasm-bindgen",
+- "wasm-bindgen-futures",
+- "web-sys",
+- "windows-registry 0.4.0",
+-]
+-
+ [[package]]
+ name = "reqwest"
+ version = "0.12.15"

@nyabinary
Copy link
Contributor

0.185.12 now

.13 now

@TomaSajt
Copy link
Contributor

TomaSajt commented May 8, 2025

Also:

this patch should fix the duplication issue without my fix PR:

Nevermind, doesn't work...

@HPsaucii
Copy link

HPsaucii commented May 8, 2025

(the way the new rustPlatform does dependencies breaks the current solution to the webrtc-sys dependency)

FYI: in theory, you just have to swap out $cargoDepsCopy/webrtc-sys-* to $cargoDepsCopy/*/webrtc-sys-* when using my PR.

yup, figured that one out on my own, as seen in the flake i linked above

@HPsaucii
Copy link

HPsaucii commented May 8, 2025

also @TomaSajt i experimented with patching the cargo.lock / cargo.toml directly, and couldn't get it to work. Either way, it would be pretty bad form to include that sort of fix to nixpkgs.

@TomaSajt
Copy link
Contributor

TomaSajt commented May 8, 2025

also @TomaSajt i experimented with patching the cargo.lock / cargo.toml directly, and couldn't get it to work. Either way, it would be pretty bad form to include that sort of fix to nixpkgs.

I agree it's very hacky, but I don't think it's necessarily wrong to include in nixpkgs, IMO.
(There are already other patches like this, all of which my fix PR gets rid of)

If we're lucky, the git based crate only contains changes compared to the crates-io crate that don't change the API.
Sadly, we were not lucky in this case.

@HPsaucii
Copy link

HPsaucii commented May 8, 2025

fair enough, either way, this probably isn't getting merged. Im just working on the version bump to v0.185.13, a binary package (done), and exposed FHS packages, and then i'll push to my flake again

@HPsaucii
Copy link

HPsaucii commented May 8, 2025

new changes to https://github.com/HPsaucii/zed-editor-flake have been pushed, has v0.185.13, fhs, and binary build support. It should be in a state usable by most people. (except maybe mac users)

@itpropro
Copy link

itpropro commented May 8, 2025

new changes to https://github.com/HPsaucii/zed-editor-flake have been pushed, has v0.185.13, fhs, and binary build support. It should be in a state usable by most people. (except maybe mac users)

Used that before the last commit on NixOS. Took 20 minutes, but compiled and resulted in a up to date version, thank you!

@ngn999

This comment has been minimized.

@drupol

This comment has been minimized.

@itpropro
Copy link

itpropro commented May 11, 2025

.14 and .15 also released in the meantime. Just keeping this up to date.
We are now at 0.185.15 0.185.16

EDIT (2025-05-12): Updated to 0.185.16

@WeetHet

This comment was marked as resolved.

@WeetHet

This comment was marked as resolved.

@sachk sachk changed the title zed-editor: 0.184.10 -> 0.185.12 zed-editor: 0.184.10 -> 0.185.15 May 12, 2025
@Tebro
Copy link
Contributor

Tebro commented May 13, 2025

I just checked this PR out and tried to build with nix-build -A zed-editor and I get an error FileExistsError: [Errno 17] File exists: '/nix/store/sl33abmiggzv72scik2xb598wkbyq0v2-zed-editor-0.185.15-vendor/reqwest-0.12.15'

Edit: never mind, I just now see that it is the same error posted above.

@HPsaucii
Copy link

@Tebro yeah, in the meantime I'd suggest https://github.com/HPsaucii/zed-editor-flake

@niklaskorz
Copy link
Member

Superseded by #407051

@niklaskorz niklaskorz closed this May 14, 2025
@TomaSajt TomaSajt mentioned this pull request May 14, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Request: zed-editor 0.184.8 → 0.185.10