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

wait_* methods deprecated with no alternative #242

Closed
MolotovCherry opened this issue Feb 5, 2024 · 2 comments · Fixed by #243
Closed

wait_* methods deprecated with no alternative #242

MolotovCherry opened this issue Feb 5, 2024 · 2 comments · Fixed by #243

Comments

@MolotovCherry
Copy link

MolotovCherry commented Feb 5, 2024

The wait_for* methods are deprecated, and offer client.wait().on(...) as a solution, but this on() function does not exist, making it impossible to achieve a custom wait condition without using deprecated code

(Of course, naturally, one could custom implement this, but it would be nice if it was part of the library again)

Edit: This message has come to my attention:

I actually ended up removing the generic interface, and stuck with just the concrete methods for Url and Locator. My thinking is that for those we may be able to provide smarter retries over time (e.g., using JavaScript event observers). The same isn't true for general-purpose asynchronous closures, so I'd rather not give users that impression. It's pretty easy to implement one's own loop (it's really just a loop with a tokio::time::sleep), so I'd rather keep that in the caller's code.

Could we update the deprecation notices on the functions? It gave me a false expectation/impression that this functionality was supposed to be here but is missing

@jonhoo
Copy link
Owner

jonhoo commented Feb 17, 2024

Ah, yes, you're entirely right. The history here is that #134 landed the .wait().on() interface, and then in 8ac0f90 I got rid of the general-purpose variant because it gave the illusion that we'd be handling these calls in some kind of efficient way. Totally agree with you that the deprecation notices are wrong. Will update shortly!

@jonhoo
Copy link
Owner

jonhoo commented Feb 17, 2024

#243

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

Successfully merging a pull request may close this issue.

2 participants