-
Notifications
You must be signed in to change notification settings - Fork 47
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
Comments
Hey, Unfortunately 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. |
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! |
Found this issue the other day while looking for the same functionality... and have been working locally on a potential fix... So far, I've made an as-of-yet unpublished crate with library and CLI that parses the The CLI enables loading from the cache file, performing a search, and then produces output similar to This is what it looks like now: And for comparison: I'm also thinking to use this library from panamax itself... particularly to enable it to create and update the cache file during sync and hopefully more efficiently than this CLI tool, and to load it during serve and provide a warp route/handler so that When these are ready, I'll publish to crates.io and send a PR linked to this issue. Also, please let me know if you have any other thoughts, concerns, etc. |
Rewrote it with a better approach/design and have it down to a ~14 MB file in ~2 seconds, with update capability and no updates ~1 second. |
Note that this still requires one to add |
Also note that the panamax-search CLI utility exists now, and runs directly against the local panamax mirror versus going through cargo and requiring a separate copy of that git repository. In all cases, except for searching a non-local panamax mirror, I think it is probably better. |
Configuration: Set the correct listening
|
When trying to use the
cargo search
command, I get this error:I have set both environment variables:
This is my .cargo/config.toml:
And I edited
mirror.toml
to have the base_url behttp://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.The text was updated successfully, but these errors were encountered: