-
Notifications
You must be signed in to change notification settings - Fork 12
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
Crates rename doesn't work with features (package = ...
)
#36
Comments
Forgot to mention, I use the latest version https://github.com/mcorbin/meuse/releases/tag/v1.1.2 |
Hello, I can reproduce the issue. it's weird because everything works as expected if I remove the I will investigate more this evening. |
Cargo first looks at the registry index (the git repository), and only after Meuse is reached to download the dep. Here, Cargo fails to find the crate in the index, which is weird because it exists (and as I said, without features it works). |
I compared almost the same packages on crates.io index and on our private registry index and I guess I found out what's the issue: on "meuse" {
"features":[
],
"package":"bit-vec6",
"name":"bit-vec",
"registry":"https://github.com/rust-lang/crates.io-index",
"req":"^0.6",
"optional":true,
"kind":"normal",
"target":null,
"default_features":true
}, on "crates.io" {
"name":"bit-vec6",
"req":"^0.6",
"features":[
],
"optional":true,
"default_features":true,
"target":null,
"kind":"normal",
"package":"bit-vec"
}, So I guess meuse swaps "name" and "package".. |
Thank you for your investigations, I will reread the doc/RFC and fix that this evening (it should not be difficult to fix). |
Thanks! Unfortunately I'm not familiar with clojure so I'm not able to make a fix and test it.. but if you could point me at the place where I can swap the things I will happily test if it helps :) |
it's somewhere in https://github.com/mcorbin/meuse/blob/master/src/meuse/crate.clj#L27 In the meantime you can also maybe update your git index manually with the right values if you need a quick fix for today. |
Somehow I've missed this straightforward opportunity %) will give it a try, thanks |
Swapping |
I created a new release which should solve the issue. |
Hi and thanks for the great custom registry! :)
I've come over an issue that i don't know how to handle: it's impossible to use a crate that renames a crate and uses it as a feature.
Step to reproduce:
$ cargo init --lib test-crate
and$ cargo init --lib use-test-crate
.test-crate
(test-crate/Cargo.toml
):use-test-crate
(use-test-crate/Cargo.toml
):test-crate
:$ cd test-crate && cargo publish --registry REGISTRY-NAME
use-test-crate
:$ cd use-test-crate && cargo check
cargo search
however returns the expected results though:Any ideas how to fix the issue? :)
The text was updated successfully, but these errors were encountered: