cargo vendor
can't vendor reqwest
dependency with different sources
#32800
Replies: 17 comments
-
It looks like cargo currently does not support this: |
Beta Was this translation helpful? Give feedback.
-
I was able to use |
Beta Was this translation helpful? Give feedback.
-
Where is the need for |
Beta Was this translation helpful? Give feedback.
-
@probably-neb I use Yes, it is possible to enable internet access during build for specific repositories. But I thought that it will be nice to have a somewhat reproducible build process, so that any src.rpm is guaranteed to build again in the same environment. |
Beta Was this translation helpful? Give feedback.
-
I see. I think it's unlikely that we do anything about this, at least anytime soon. Glad the cargo patch is working for you. I recommend others maintain a custom patch for zed to fix this for themselves, or use the patched cargo (or just cargo if the PR is merged!) |
Beta Was this translation helpful? Give feedback.
-
I've added But to my surprise, that fails to build with:
In my case, I can't bypass the offline restriction, or patch cargo. Suggestions? |
Beta Was this translation helpful? Give feedback.
-
@PedroHLC are you 100% sure that you can not use patched cargo? Patch is needed solely for |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, it does not solely impact Cargo in my system. Since Nix likes to patch and hash all the sources, we use a utility called EDIT: In parallel, Nixpkgs maintainers seem to be searching for a workaround NixOS/nixpkgs#404938 |
Beta Was this translation helpful? Give feedback.
-
This is because Zed's fork of Hence, the blocking client which is built on top of the async one no longer compiles. The rename seems unnecessary though. Or if deemed required, it should be renamed also in the blocking module. I am pretty sure the issue can be produced if you try to build https://github.com/zed-industries/reqwest/tree/0.12.8-per-request-redirect with all features. That could be submitted as a PR in order to fix that branch (which is what Zed internally depends on). |
Beta Was this translation helpful? Give feedback.
-
I need this for building RPM packages for ALT Linux Sisyphus. We have strict requirements for build sandbox: no internet, no root permissions, only system packages. This is needed to provide integrity of Sisyphus repository. |
Beta Was this translation helpful? Give feedback.
-
The same issue with |
Beta Was this translation helpful? Give feedback.
-
Checkout NixOS/nixpkgs#407051. It includes a patch that removes the duplicate dependency and then fixes the compile error by also renaming the function in the blocking client. This should allow you to make your build work until the problem is fixed in the |
Beta Was this translation helpful? Give feedback.
-
Did a little more digging to figure out where the 2nd Removing that feature: - jsonschema = "0.30.0"
+ jsonschema = { version = "0.30.0", default-features = false } And regenerating the lockfile allows Replacing the default EDIT: This would still hit the function rename bug mentioned above however, unless the async version of |
Beta Was this translation helpful? Give feedback.
-
Thanks for looking into this @CathalMullan. For the nixpkgs case it seems fine to wait for #387337 to land and use the patch for the meantime. Interestingly the zed package in our flake still builds successfully without patches, I assume because crane is using a different method than buildRustPackage to fetch the deps. @im-0 is using |
Beta Was this translation helpful? Give feedback.
-
There is (almost) no workaround needed in Zed :) All that needs to happen is that the fork of Once that is complete, you can replace |
Beta Was this translation helpful? Give feedback.
-
@P1n3appl3 |
Beta Was this translation helpful? Give feedback.
-
I also ran into this issue with Chimera Linux and a fork of cports with an updated zed package 😕
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Can't vendor crates for v0.185.9.
Description
cargo vendor
can't vendorreqwest
dependency with different sources.Vendoring crates is required for reproducible builds.
Steps to reproduce:
git clone https://github.com/zed-industries/zed && cd zed
git checkout v0.185.9
cargo vendor
Zed Version and System Specs
v0.185.9
Beta Was this translation helpful? Give feedback.
All reactions