-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patching dependencies does not work if it's for the same location but a different branch #5478
Comments
Ah yeah this is sort of an unfortunate side-effect of the implementation of |
For GitHub repositories, one can work around this by |
Nice workaround hack! Further ways to change the URL string include adding |
The above workaround doesn't work for us, because what we patch has dependencies as well which need to be patched by the workspace patch. However, as the url now changed, it won't be patched.
but that won't work:
also linking it back to the original url won't work:
because:
|
this bug has been open for a long time. is there hope? we're stuck with a suboptimal setup due to this. |
Any progress on this issue? |
this could IMO be fixed by #7497 |
I've definitely been confused by this because I didn't understand how the |
These workarounds no longer do it for me (using |
@est31 FYI that hack seems to ignore |
Because of a change in how Cargo normalizes dependency URLs, we are now unable to change the `ut-utp/core` branch that this crate depends On from a dependent. Our old lock files from May of 2020 were also no help because they referred to branches that have since been merged and deleted. So, just to get unstuck while we work on newer more robust peripheral implementations, we're taking the `feat-non-generic` branch as it was in May of 2020 and changing it to use the latest `ut-utp/core` from `master`. See: rust-lang/cargo#5478 (comment)
Because of a change in how Cargo normalizes dependency URLs, we are now unable to change the `ut-utp/core` branch that this crate depends On from a dependent. Our old lock files from May of 2020 were also no help because they referred to branches that have since been merged and deleted. So, just to get unstuck while we work on newer more robust peripheral implementations, we're taking the `feat-non-generic` branch as it was in May of 2020 and changing it to use the latest `ut-utp/core` from `master`. See: rust-lang/cargo#5478 (comment)
If anyone is having trouble with overriding SSH URLs, and can't use HTTPS for whatever reason (eg. private git repo) I found another workaround is to add the port number to the URL, like |
I think this workaround fails with ethers-rs = { git = "https://github.com:443/gakonst/ethers-rs.git?rev=test", branch = "test" } |
This comment was marked as off-topic.
This comment was marked as off-topic.
I think that's sufficiently different to have its own GitHub issue. |
Ah, I think my problem is already covered by #9227 |
211: Prebuilt Godot artifacts r=Bromeon a=Bromeon Closes #12 Closes #107 From now on, gdext by default fetches pre-generated versions of these files, published in the [`godot4-prebuilt`](https://github.com/godot-rust/godot4-prebuilt) repo: * `extension_api.json` (from Godot binary) * `gdextension_interface.h` (from Godot binary) * `gdextension_interface.rs` (through bindgen -- currently supports 3 platforms) This has several benefits: 1. Significantly fewer dependencies, as bindgen is no longer needed, and thus smaller compile times. 2. Most CI jobs no longer need the Godot binary (clippy, test), speeding up CI _in addition_ to (1). 3. It's possible to change the Godot API behind gdext without manually rebuilding the artifacts. 4. Easy comparison between the Godot APIs of different released versions. ### Using a custom Godot binary It is still possible to generate those files locally like before, through the use of the `custom-godot` feature on the `godot` crate. This is necessary for any platform/configuration different from the 3 main supported ones (because bindgen generates different Rust bindings), as well as any in-development or modified Godot versions. ### Changing the Godot release By default, the latest Godot release is used as input to gdext. Switching between different Godot versions is easily possible, although a bit cumbersome. If you want to use an older version `4.0`, add this to your **workspace** (not sub-crate) `Cargo.toml`: ```toml # We need to trick Cargo into seeing a different URL; rust-lang/cargo#5478 [patch."https://github.com/godot-rust/godot4-prebuilt"] godot4-prebuilt = { git = "https://github.com//godot-rust/godot4-prebuilt", branch = "4.0"} ``` We're looking into ways to simplify this. In a crates.io release (#2), we would need to rethink this anyway, mapping Godot versions to Rust release versions (which is not trivial). Co-authored-by: Jan Haller <bromeon@gmail.com>
This worked for me (www and .git) : [patch.'https://github.com/foo/bar']
baz = { git = "https://www.github.com/foo/bar.git", branch = "test" } |
Note that the `http://` is really intended, as it works around rust-lang/cargo#5478
Conversation on prerequisites to addressing this issue: https://internals.rust-lang.org/t/how-to-assist-with-bug-5478/21819/1 |
E.g.
This gives
The text was updated successfully, but these errors were encountered: