Skip to content
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

Unable to cargo search against panamax mirror #129

Open
alexjbuck opened this issue Apr 7, 2024 · 2 comments
Open

Unable to cargo search against panamax mirror #129

alexjbuck opened this issue Apr 7, 2024 · 2 comments

Comments

@alexjbuck
Copy link

When trying to use the cargo search command, I get this error:

$ cargo search <crate>
error: crates-io is replaced with non-remote-registry source registry `panamax`;
include `--registry crates-io` to use crates.io

I have set both environment variables:

RUSTUP_DIST_SERVER=http://127.0.0.1:8080"
RUSTUP_UPDATE_ROOT=http://127.0.0.1:8080/rustup"

This is my .cargo/config.toml:

[source.panamax]
registry = "http://127.0.0.1:8080/git/crates.io-index"
[source.panamax-sparse]
registry = "sparse+http://127.0.0.1:8080/index/"

[source.crates-io]
replace-with = "panamax"

And I edited mirror.toml to have the base_url be http://127.0.0.1:8080/crates.

Despite that, cargo search <crate> doesn't seem like it will search against the local panamax instance.

I couldn't find anything in the Readme or elsewhere that indicated whether or not cargo search should work with Panamax, but it seems like it would be a useful feature to have if its not yet supported.

@k3d3
Copy link
Member

k3d3 commented Apr 7, 2024

Hey,

Unfortunately cargo search does not work with the mirror.

Implementing it, while useful, would be a pretty big endeavour that I unfortunately don't have the bandwidth to take on right now.

I'd happily accept a PR for it though.

@alexjbuck
Copy link
Author

Okay! I can't say I'll look into it soon, but good to know that it doesn't. At a minimum I might push a docs PR that states that cargo search doesn't work with this mirror.

Thanks for the super quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants