-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Rust Port: Part 2 - Dependencies #750
Conversation
Just checking for the package name isn't enough, since sometimes dependency names don't actually exist as real packages, only as the "provides" of others.
Keep in mind there's https://docs.rs/aur-depends/1.0.3/aur_depends/ I'm still waiting for if you're okay with this library's API before making an asyncless version. The library is very high level so I could see you maybe not wanting to use it to do stuff your self/ |
I'm not against it - I haven't looked through it yet actually. Forgive me if that's caused you a delay. The current code I'm working through now in the |
What does haskell do? |
I meant the Haskell version of dep resolution found here: https://github.com/fosskers/aura/blob/master/aura/lib/Aura/Dependencies.hs |
Side note: The AUR RPC really needs to support searching by I just hit the stupid edge-case introduced by this depending on this but with a slightly different name. |
And am I right that the AUR site itself supports multiple search terms, but the RPC does not? |
This patch got my hopes up, but I don't see an actual v6 supported here https://gitlab.archlinux.org/archlinux/aurweb/-/blob/master/doc/rpc.txt |
The trail continues: https://gitlab.archlinux.org/archlinux/aurweb/-/issues/136 |
I've given up on searching for provides because I find my hack to be sufficient to be honest. Do note though that I only do the provider search for targets and missing packages. Doing it at every level is not ideal. |
Also I pushed a threaded version of aur-fetch using crossbeam https://github.com/Morganamilo/aur-fetch.rs/blob/master/src/fetch.rs#L121 |
This allows JSON data to be fetched remotely in an abstract way.
This is now comically fast and handles |
Running your own aur mirror? Seems a bit fragile. |
Luckily it's just a data mirror of the RPC specifically. Otherwise yes, that would be a nightmare. The benefit is that it's extremely fast, and gives me multi-term search and Go nuts: https://git.sr.ht/~fosskers/faur I haven't announced it anywhere yet. I'll likely do so as a side-note when I release Aura 4. |
How does it work as a speedup then? Can it handle the traffic of many users? |
Because it doesn't use a database and holds all package data in memory, using Rust ref tricks to store |
This PR expands on #671 by rounding off much of the internals of
-A
.This is a vast improvement over the
Dependencies.hs
Haskell version in both performance and accuracy.