-
Notifications
You must be signed in to change notification settings - Fork 90
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
adds AWC as client option. Need test work for Document #426
Conversation
Hey, could you explain how it is helpful for this project? |
The primary benefit is that it works 😀 where the current does not. After that, it reduces complexity, dependencies, and binary size for users. Updating the tests would also allow other drop in replacements like reqwest, which is already used in most rust web projects. "This pr allows users to drop isahc as a dependency when using actix_web and run in environments where the current isahc configuration does not support tls" |
Hey, I see you took the time to update your PR, and thanks for that, but there are a few blockers to merging your PR.
|
Hey, I think it's all covered already, but since you're confused:
I only synced this to backfill a missing api, not to progress this pr, I didn't realize this sdk wasn't complete when I suggested using it. I generated a reqwest client from the oai spec, but it was pretty ugly, so it seemed easiest path forward is to just add missing features here as needed. But thanks to everyone for their work on meilisearch and congrats on getting to 1.0! Do ping me if you decide you want to support other clients or make this library on par with your js client ( which is what we have been using ). |
Sorry, I don't have a lot of time to allocate to this repository, nor do I know much about the state of frontend in rust currently, so it's quite hard to make a decision. What I was saying for 3️⃣ is that one day, we're going to update the From what I see of the rust ecosystem, isahc seems like a pretty bad option for everyone, but moving everyone to awc doesn't seem like the best option either. What do you think? Another question, if we were to continue with your PR. |
Yeah, reqwest is ( by a massive margin ) the most common client in rust, awc is more common than most ( like isahc or surf ), due to actix being the leading framework, but is also being supplanted by reqwest. So, if you're only going to support one client, reqwest is an easy choice. I haven't used surf, but it seems to be a wrapper around isahc and hyper, with wasm support, so as long as you export the feature flags, that would also cover a lot of options. As far as adding functions, I don't think that's significant since for any rfc compliant client, you would only need a single bridge implementation to this lib per client and all clients would be feature gated. A simple solution for everyone ( though I understand not wanting to do it ) would be to split this into two crates: This would allow anyone to use any client they want without extra burden on MS team as new clients become popular or change. It's fairly common in js sdks, so that one can consume it with browser, node, react-native, etc http clients. The first crate simply guarantees req/resp/error types. As far as feature flag testing, its not very pretty yet, using a script/action in ci to call each feature test is the most common way I'm aware of. But really, a test on each client's implementation and whole test suite on whichever client is default would be enough-ish, since any legitimate client is already tested in their own crates. |
That would be really nice, but I don’t think it’s going to happen in a reasonable time scale since it impacts meilisearch (the oai we provide is updated by hand and might miss a bunch of things) 😰 Do you think it would be reasonable to make the Where by default, the SDK uses and guarantees the support of only one crate (ideally reqwest if most people already have it in their workflow). And with the help of a feature flag, you can get rid of reqwest, but we don’t provide and maintain anything else. tbh I would really like to avoid;
|
This PR solves the issue you raised: #459. Closing this issue for now, thanks a lot for the time you spend to improve this library. Sorry it did not resulted in a merge. |
Pull Request
Related issue
documents
will need to be rewritten to work with other clients before mainlining. Can also add a feature for reqwest if interest ( and work on tests is done ).What does this PR do?
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!